# CVE-2026-61727: Stack overflow from unbounded recursion in DTD content-model parsing

- Severity: High 7.5 (CVSS:3.1, scored by RustSec Advisory Database) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-07-20T12:00:00.000Z
- Modified: 2026-11-24T22:00:02.131Z
- Also known as: RUSTSEC-2026-0599, GHSA-7jmw-29gc-ffx4

## Description

`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.

(As written by RustSec Advisory Database.)

## Affected

- xmloxide (crates.io): from 0.0.0-0 before 0.4.4

## References

- <https://crates.io/crates/xmloxide> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0599.html> (advisory)
- <https://github.com/jonwiggins/xmloxide/commit/d606e11ddaf033272d85c5422addd91b79788aba> (web)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0599](https://rustsec.org/advisories/RUSTSEC-2026-0599.html), CC0-1.0, modified 2026-11-24

---

Page: https://cve.day/CVE-2026-61727 · Whole record: https://cve.day/CVE-2026-61727.json · Rebuilt by cve.day 2026-11-25T22:56:43.526Z
