Intel

AIKIDO-2025-10658

ammonia is vulnerable to Cross-Site Scripting (XSS)

Cross-Site Scripting (XSS) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.

40

Medium Risk

This Affects:

Rustammonia
3.0.0 - 3.3.0
Fixed in 3.3.1
4.0.0 - 4.0.0
Fixed in 4.0.1
4.1.0 - 4.1.1
Fixed in 4.1.2

TL;DR

Affected versions of this package are vulnerable to a mutation cross-site scripting (mXSS), which arises when DOM cleanup operations inadvertently cause namespace changes, potentially reintroducing malicious elements or attributes that bypass sanitization. This vulnerability allows an attacker to exploit it by crafting input that triggers these namespace switches during processing, leading to the execution of arbitrary JavaScript in the user's context.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

ammonia is vulnerable to Cross-Site Scripting (XSS) in versions 4.1.0 - 4.1.1, 4.0.0 - 4.0.0 and 3.0.0 - 3.3.0.

How to fix this

Upgrade the ammonia library to the patch version.