Vulnerability DatabaseGHSA-mm7x-qfjj-5g2c

GHSA-mm7x-qfjj-5g2c
Rust vulnerability analysis and mitigation

Overview

The Ammonia Rust crate (versions >= 4.1.0, < 4.1.2; >= 4.0.0, < 4.0.1; < 3.3.1) contains a vulnerability related to incorrect handling of embedded SVG and MathML elements, which can lead to mutation XSS after removal. The vulnerability was reported on September 21, 2025, and officially issued on September 22, 2025. This security issue affects applications that specifically allow SVG or MathML tags along with certain raw text HTML elements (GitHub Advisory, RustSec Advisory).

Technical details

The vulnerability stems from the crate's failure to properly strip namespace-incompatible tags in specific situations, leading to incorrect handling of differences between HTML, SVG, and MathML namespaces. The issue manifests when a tag is parsed as HTML during the cleaning process but is serialized in a way that causes it to be parsed as XML by the browser. The vulnerability has been assigned a CVSS v4.0 score of 1.7 (Low severity) with the following vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:U. The vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation) (GitHub Advisory).

Impact

The vulnerability only affects applications that explicitly allow SVG or MathML tags along with specific raw text HTML elements including title, textarea, xmp, iframe, noembed, noframes, plaintext, noscript, style, and script. Applications that do not explicitly allow these tags are not affected, as none of these tags are allowed by default (RustSec Advisory).

Mitigation and workarounds

The vulnerability has been patched in versions 4.1.2, 4.0.1, and 3.3.1. Users are advised to upgrade to these patched versions. For applications that cannot immediately update, a workaround is to ensure that SVG/MathML tags and raw text HTML elements are not simultaneously allowed in the sanitizer configuration (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-393w-9x6h-8gc7HIGH8.2
  • RustRust
  • pingora-core
NoYesSep 17, 2025
CVE-2025-59825MEDIUM6.1
  • RustRust
  • trustee-guest-components
NoYesSep 23, 2025
GHSA-mm7x-qfjj-5g2cLOW1.7
  • RustRust
  • ammonia
NoYesSep 22, 2025
RUSTSEC-2025-0071N/AN/A
  • RustRust
  • ammonia
NoYesSep 21, 2025
RUSTSEC-2025-0070N/AN/A
  • RustRust
  • pingora-core
NoYesSep 17, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management