{"id":"RUSTSEC-2026-0599","aliases":["CVE-2026-61727","GHSA-7jmw-29gc-ffx4"],"title":"Stack overflow from unbounded recursion in DTD content-model parsing","titleSource":"OSV","descriptionSource":"OSV","description":"`xmloxide`'s DTD parser recursed without a depth bound when parsing the\nparenthesised content model of an `<!ELEMENT>` declaration. A small document\nwhose internal DTD subset contains many nested `(` drives unbounded mutual\nrecursion between `DtdParser::parse_content_particle` and\n`DtdParser::parse_content_spec_group`, exhausting the stack and aborting the\nprocess.\n\nThe internal DTD subset is parsed during ordinary document parsing, so this is\nreachable through the default parse entry points (for example\n`Document::parse_str`) on any input that carries a `DOCTYPE`. The existing\n`ParseOptions::max_depth` limit does not prevent it: it bounds element nesting,\nnot DTD content-model nesting. A stack overflow cannot be caught as an error,\nso any process that parses attacker-controlled XML with `xmloxide` can be\ncrashed with a small payload.\n\nFixed in 0.4.4: a parenthesis-nesting depth counter is threaded through the\ncontent-model parser, and nesting deeper than 256 levels is rejected with a\nnormal `ParseError`. Well-formed DTDs are unaffected.\n\nApplications that cannot upgrade should reject or strip the `DOCTYPE` from\nuntrusted input before parsing.","severity":"high","score":7.5,"published":"2026-07-20T12:00:00.000Z","modified":"2026-11-24T22:00:02.131Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"crates.io","name":"xmloxide","sources":[{"name":"OSV · RUSTSEC-2026-0599","url":"https://osv.dev/vulnerability/RUSTSEC-2026-0599"}],"ranges":[{"events":[{"introduced":"0.0.0-0"},{"fixed":"0.4.4"}],"type":"SEMVER"}],"versions":[],"fixed":["0.4.4"]}],"sourceAffected":[],"references":["https://crates.io/crates/xmloxide","https://rustsec.org/advisories/RUSTSEC-2026-0599.html","https://github.com/jonwiggins/xmloxide/commit/d606e11ddaf033272d85c5422addd91b79788aba"],"sources":[{"name":"OSV","id":"RUSTSEC-2026-0599","modified":"2026-11-24T22:00:02.131450524Z","url":"https://osv.dev/vulnerability/RUSTSEC-2026-0599"}],"assessments":[{"source":"OSV","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5}],"products":[],"remediation":[],"observedAt":"2026-11-24T23:38:31.244Z","kev":{"status":"not-listed","checkedAt":"2026-11-28T23:55:31.062Z"},"coverage":[{"source":"NVD","status":"no-result","checkedAt":"2026-11-25T01:00:46.172Z","attemptedAt":"2026-11-25T01:00:46.172Z"},{"source":"GHSA","status":"no-result","checkedAt":"2026-11-25T01:00:38.208Z","attemptedAt":"2026-11-25T01:00:38.208Z"},{"source":"EUVD","status":"refresh-failed","attemptedAt":"2026-11-25T01:00:37.032Z"},{"source":"EPSS","status":"no-result","checkedAt":"2026-11-25T01:00:36.923Z","attemptedAt":"2026-11-25T01:00:36.923Z"}],"evidence":[],"aiSummary":null}