ammonia
Affected
- introduced
0.0.0-0, fixed2.1.3, introduced3.0.0, fixed3.1.0(semver)
Fixed versions
2.1.3, 3.1.0
Fix
- Fixed version
2.1.3cargo update -p ammonia --precise 2.1.3 - Fixed version
3.1.0cargo update -p ammonia --precise 3.1.0
Advisory
Also known as: CVE-2021-38193, GHSA-5325-xw5m-phm3
Incorrect handling of embedded SVG and MathML leads to mutation XSS
Affected versions of this crate did not account for namespace-related parsing
differences between HTML, SVG, and MathML. Even if the svg and math elements
are not allowed, the underlying HTML parser still treats them differently.
Running cleanup without accounting for these differing namespaces resulted in an "impossible"
DOM, which appeared "safe" when examining the DOM tree, but when serialized and deserialized,
could be exploited to inject arbitrary markup.
To exploit this, the application using this library must allow a tag that is parsed as raw text in HTML.
These [elements] are:
Applications that do not explicitly allow any of these tags should not be affected, since none are allowed by default.
[elements]: https://github.com/servo/html5ever/blob/57eb334c0ffccc6f88d563419f0fbeef6ff5741c/html5ever/src/tree_builder/rules.rs
Not rated by the source.
0.0.0-0, fixed 2.1.3, introduced 3.0.0, fixed 3.1.0 (semver)2.1.3, 3.1.0
2.1.3cargo update -p ammonia --precise 2.1.33.1.0cargo update -p ammonia --precise 3.1.0Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: RustSec Advisory Database · CC0-1.0