Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. ammonia
  4. ›
  5. CVE-2021-38193

CVE-2021-38193: Cross-site Scripting in ammonia

August 25, 2021

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.

References

  • github.com/advisories/GHSA-5325-xw5m-phm3
  • github.com/rust-ammonia/ammonia
  • github.com/rust-ammonia/ammonia/pull/142
  • nvd.nist.gov/vuln/detail/CVE-2021-38193
  • raw.githubusercontent.com/rustsec/advisory-db/main/crates/ammonia/RUSTSEC-2021-0074.md
  • rustsec.org/advisories/RUSTSEC-2021-0074.html

Code Behaviors & Features

Detect and mitigate CVE-2021-38193 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.1.3, all versions starting from 3.0.0 before 3.1.0

Fixed versions

  • 3.1.0
  • 2.1.3

Solution

Upgrade to versions 2.1.3, 3.1.0 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

cargo/ammonia/CVE-2021-38193.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:13 +0000.