CVE-2021-38193 json
Cross-site Scripting in ammonia
published 2021-07-08 5 y ago modified 2026-06-17 4 mo ago also GHSA-5325-xw5m-phm3 , RUSTSEC-2021-0074 , EUVD-2021-1568
- cvss
- 6.1
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.7%
- EPSS 0.7% chance of exploitation in 30 days, percentile 53%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- crates.io ammonia 2.1.3, 3.1.0
- ammonia_project ammonia 3.1.0
- rust-ammonia Debian 14, Debian 13, Debian 12 3.1.2-1
debian advisories DEBIAN-CVE-2021-38193
- github.com/rust-ammonia/ammonia#142 pull request
- rustsec.org/advisories/RUSTSEC-2021-0074.html advisory
Exploit prediction
0.70% chance of exploitation in the next 30 days, higher than 53% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- rustsec.org https://rustsec.org/advisories/RUSTSEC-2021-0074.html referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
| GitHub | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | ammonia | >=3.0.0, <3.1.0 <2.1.3 >=0.0.0-0, <2.1.3 |
3.1.0 2.1.3 |
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
rustsec.org
/advisories/RUSTSEC-2021-0074.html
web, exploit, issue-tracking, patch, third-party-advisory, advisory
-
github.com
/rust-ammonia/ammonia/pull/142
web
-
raw.githubusercontent.com
/rustsec/advisory-db/main/crates/ammonia/RUSTSEC-2021-0074.md
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-38193
advisory
-
github.com
/rust-ammonia/ammonia
package
-
crates.io
/crates/ammonia
package
Sources
- CVE List CVE-2021-38193
- GitHub Advisory GHSA-5325-xw5m-phm3
- NVD CVE-2021-38193
- OSV RUSTSEC-2021-0074
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.