Vulnerability RUSTSEC-2026-0599

High Risk
HIGH RISK
CVSS Score: 7.5
Score Range: 7.0–8.9
High severity vulnerabilities (CVSS 7.0–8.9). Serious vulnerabilities that should be prioritized soon after critical fixes.
4 months ago
July 20, 2026 at 12:00 PM UTC
Stack overflow from unbounded recursion in DTD content-model parsing
>=0.0.0-0 <0.4.4
>=0.0.0-0 <0.4.4

Summary

Stack overflow from unbounded recursion in DTD content-model parsing

Details

xmloxide's DTD parser recursed without a depth bound when parsing the parenthesised content model of an <!ELEMENT> declaration. A small document whose internal DTD subset contains many nested ( drives unbounded mutual recursion between DtdParser::parse_content_particle and DtdParser::parse_content_spec_group, exhausting the stack and aborting the process.

The internal DTD subset is parsed during ordinary document parsing, so this is reachable through the default parse entry points (for example Document::parse_str) on any input that carries a DOCTYPE. The existing ParseOptions::max_depth limit does not prevent it: it bounds element nesting, not DTD content-model nesting. A stack overflow cannot be caught as an error, so any process that parses attacker-controlled XML with xmloxide can be crashed with a small payload.

Fixed in 0.4.4: a parenthesis-nesting depth counter is threaded through the content-model parser, and nesting deeper than 256 levels is rejected with a normal ParseError. Well-formed DTDs are unaffected.

Applications that cannot upgrade should reject or strip the DOCTYPE from untrusted input before parsing.

Impacted packages

Timeline

Published
4 months ago
July 20, 2026 at 12:00 PM UTC
Last Modified
3 hours ago
November 24, 2026 at 10:00 PM UTC