LiveActive security incident?Get immediate response
CVE Record

CVE-2021-38193: An issue was discovered in the ammonia crate before 3.1.0 for Rust.

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.

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2021-38193 affects Rust applications that used the ammonia HTML sanitization crate before version 3.1.0. A parsing mismatch involving HTML, SVG, and MathML could allow cross-site scripting when untrusted content was sanitized and later shown to users.

Executive priority

Prioritize remediation for internet-facing or multi-user applications that display user-generated rich content. Internal systems without untrusted markup rendering are lower urgency but should still remove the vulnerable dependency.

Technical view

The issue is an XSS flaw in ammonia before 3.1.0. Sources describe mishandled parsing differences across HTML, SVG, and MathML, similar to CVE-2020-26870. No CVSS, CWE, exploit details, or affected downstream applications are provided in the bundle.

Likely exposure

Exposure is likely limited to Rust services or web applications that depend on ammonia before 3.1.0 and use it to sanitize attacker-controlled markup displayed in browsers.

Exploitation context

The provided sources do not show active exploitation, and the CVE is not listed as KEV. Risk depends on whether untrusted HTML, SVG, or MathML reaches ammonia and is rendered to other users.

Researcher notes

Evidence is concise but clear on affected package and fixed version boundary. The bundle lacks CVSS, CWE classification, proof-of-concept status, and downstream product impact, so exposure assessment must come from dependency and data-flow review.

Mitigation direction

  • Upgrade ammonia to version 3.1.0 or later.
  • Check RustSec and project guidance for any newer recommendations.
  • Review dependency lockfiles for transitive ammonia usage.
  • Reduce rendering of untrusted rich markup where practical.
  • Use browser-side defenses such as CSP as layered protection.

Validation and detection

  • Identify applications using the Rust ammonia crate.
  • Confirm deployed versions are not earlier than 3.1.0.
  • Trace where user-supplied markup is sanitized and rendered.
  • Review tests covering HTML, SVG, and MathML sanitization behavior.
  • Verify dependency audit tooling flags RUSTSEC-2021-0074.
Prepared
Confidence
medium
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2021-38193 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Unknown
CVSS
Not scored
Known Exploited
No
Published
Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

0CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS and timeline data

No CVSS vectors or timeline events were available in the normalized CVE source material.

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
n/an/an/aListed
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.