Skip to main content

CVE-2026-63430: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in rust-ammonia ammonia

0
Medium
VulnerabilityCVE-2026-63430cvecve-2026-63430cwe-79
Published: 10/15/2026 (10/15/2026, 18:10:35 UTC)
Source: CVE Database V5
Vendor/Project: rust-ammonia
Product: ammonia

Description

ammonia is a Rust library for repairing and securing untrusted HTML. Prior to 3.3.2, 4.0.2, and 4.1.3, applications that explicitly allow the math tag, annotation-xml, and at least one raw-text HTML element while disallowing the encoding attribute can permit mutation cross-site scripting. ammonia does not correctly implement annotation-xml's encoding-dependent MathML integration-point behavior after attribute filtering removes encoding, so the sanitizer validates a descendant under one namespace interpretation while the browser reparses the output under another. An attacker can use that namespace transition and an allowed raw-text HTML element to execute JavaScript when a user renders the sanitized output. The required tags are not enabled by default, so applications that do not explicitly allow them are not affected. This issue is fixed in versions 3.3.2, 4.0.2, and 4.1.3.

CVSS v4.0

Score 6.3medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
Low
Subsq. Integrity
Low
Subsq. Availability
None
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

Affected software

rust-ammonia

ammonia

Affected versions
<3.3.2>=4.0.0 <4.0.2>=4.1.0 <4.1.3
crates.iomore threats →ai
rust-ammonia/ammonia
pkg:cargo/rust-ammonia/ammonia
Affected versions
<3.3.2>=4.0.0 <4.0.2>=4.1.0 <4.1.3

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/15/2026, 18:48:32 UTC

Technical Analysis

The rust-ammonia library, used for sanitizing untrusted HTML, improperly handles annotation-xml's encoding-dependent MathML integration-point behavior after attribute filtering removes the encoding attribute. This leads to a mismatch between the sanitizer's namespace validation and the browser's reparsing, enabling mutation cross-site scripting (CWE-79) when certain tags (math, annotation-xml, and raw-text HTML elements) are allowed. This vulnerability affects versions prior to 3.3.2, versions from 4.0.0 up to but not including 4.0.2, and versions from 4.1.0 up to but not including 4.1.3. The vulnerability is medium severity with a CVSS 4.0 score of 6.3. The issue is resolved in versions 3.3.2, 4.0.2, and 4.1.3.

Potential Impact

An attacker can exploit this vulnerability to execute arbitrary JavaScript in the context of a user's browser when rendering sanitized HTML output. This can lead to typical XSS impacts such as session hijacking or unauthorized actions. However, the vulnerability only affects applications that explicitly enable the vulnerable tags and disable the encoding attribute, limiting the scope of impact.

Mitigation Recommendations

Upgrade rust-ammonia to version 3.3.2, 4.0.2, or 4.1.3 or later, where this vulnerability is fixed. Applications that do not explicitly allow the math tag, annotation-xml, and raw-text HTML elements are not affected. No other mitigation is required if these tags are not enabled.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-07-16T19:35:57.766Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6ad11cac2cdf04f6565042e6

Added to database: 10/15/2026, 18:34:20 UTC

Last enriched: 10/15/2026, 18:48:32 UTC

Last updated: 10/15/2026, 20:49:08 UTC

Views: 10

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses