CVE-2019-15542
Description
An issue was discovered in the ammonia crate before 2.1.0 for Rust. There is uncontrolled recursion during HTML DOM tree serialization.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
CVE-2019-15542 describes uncontrolled recursion in the Rust ammonia crate before 2.1.0, leading to a stack overflow and denial of service during HTML DOM tree serialization.
Vulnerability
Description The vulnerability resides in the ammonia crate, a Rust HTML sanitization library that uses html5ever for parsing and serialization [2]. The issue is uncontrolled recursion during HTML DOM tree serialization, which can cause the call stack to overflow, resulting in an abort (crash) of the application [1][3]. This problem affects all versions of the crate prior to 2.1.0 [1][3].
Exploitation
Attack Surface An attacker can trigger this vulnerability by providing specially crafted HTML input that causes deep recursive serialization. The attack requires no authentication and no user interaction; the attacker simply needs to submit malicious HTML to any application that uses an affected version of ammonia to sanitize or clean untrusted HTML [3]. Since the input vector is network-based and complexity is low, the condition is easily exploitable [3].
Impact on
Availability The primary impact is on availability: a successful exploit causes the application to crash due to a stack overflow, leading to a denial of service (DoS) [3]. Confidentiality and integrity are not directly affected [3]. The CVSS score for this vulnerability is 7.5 (HIGH) with a vector of CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H [3][4].
Mitigation and
Patching The vulnerability has been patched in ammonia version 2.1.0 and later [1][3]. Users are strongly advised to update their crate dependency to version 2.1.0 or newer to mitigate the risk [1]. Note that only the v3 and v4 branches are currently supported; the 2.0 branch no longer receives security backports [1].
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
ammoniacrates.io | < 2.1.0 | 2.1.0 |
Affected products
2- Rust/ammoniadescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4- github.com/advisories/GHSA-5hp8-35wj-m525ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2019-15542ghsaADVISORY
- github.com/rust-ammonia/ammonia/blob/master/CHANGELOG.mdghsaWEB
- rustsec.org/advisories/RUSTSEC-2019-0001.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.