Uncontrolled recursion in ammoniaGHSA-5hp8-35wj-m525
HIGHGHSA-5hp8-35wj-m525 is a high-severity (CVSS 7.5) CWE-674 vulnerability in ammonia. A fix is available for ammonia — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
ammoniaReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.
Description
An issue was discovered in the ammonia crate before 2.1.0 for Rust. There is uncontrolled recursion during HTML DOM tree serialization.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | ammonia | all versions | 2.1.0cargo update -p ammonia --precise 2.1.0 |
Affected Products
ammoniaammonia_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for ammonia, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update ammonia to 2.1.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-5hp8-35wj-m525 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Frequently Asked Questions
Is GHSA-5hp8-35wj-m525 in your dependencies?
Find it across crates.io, including transitive dependencies.