Live threats

All CVEs / Ammonia Project

CVE-2021-38193Ammonia Project Ammonia

Medium 6.1 No auth needed

Priority
52
CVSS 3.1
6.1
EPSS
0.7%
probability of exploitation in 30 days · percentile 49
Auth required
No
Published
Aug 8, 2021
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

What happens

An issue was discovered in the ammonia crate before 3.1.0 for Rust. XSS can occur because the parsing differences for HTML, SVG, and MathML are mishandled, a similar issue to CVE-2020-26870.

Original NVD text.

What to do

  1. Apply the vendor's security update for Ammonia.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
crates.io ammonia ≥ 3.0.0 < 3.1.0 3.1.0 cargo update -p ammonia --precise 3.1.0
crates.io ammonia < 2.1.3 2.1.3 cargo update -p ammonia --precise 2.1.3
crates.io ammonia ≥ 0.0.0-0 < 2.1.3 2.1.3 cargo update -p ammonia --precise 2.1.3
crates.io ammonia ≥ 3.0.0 < 3.1.0 3.1.0 cargo update -p ammonia --precise 3.1.0

Per OSV / GitHub Advisories (GHSA-5325-xw5m-phm3, RUSTSEC-2021-0074). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
ammonia_projectammonia< 3.1.0

Official sources

References

Links published by the sources. Open them with care.