Cross-site Scripting (XSS) Affecting rust-ammonia package, versions <3.1.2-1


Severity

Recommended
0.0
medium
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.71% (50th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-ECHOLATEST-RUSTAMMONIA-18828639
  • published15 Aug 2026
  • disclosed8 Aug 2021

Introduced: 8 Aug 2021

CVE-2021-38193  (opens in a new tab)
CWE-79  (opens in a new tab)

How to fix?

Upgrade Echo:latest rust-ammonia to version 3.1.2-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream rust-ammonia package and not the rust-ammonia package as distributed by Echo. See How to fix? for Echo:latest relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1