Summary
XML/Ada's SAX parser resolved external entities by default, while its advertised switches for disabling them had no effect. An application parsing attacker-controlled XML could disclose local files or exhaust CPU and memory through exponential entity expansion. DOM and other readers built on the SAX parser inherited the same risk.
Affected: XML/Ada before 27.0.
Fixed: XML/Ada 27.0 and later; AdaCore's fixed wavefront builds begin with 20260615. AdaCore reports no workaround for earlier releases.
Demonstration
A short document was enough to read a file available to the parser process:
<!DOCTYPE root [ <!ENTITY xxe SYSTEM "secret.txt"> ]> <root>&xxe;</root>
Vulnerable releases inserted the contents of secret.txt even after both external-entity features were set to False. A nested-entity document also caused unbounded expansion.
How Pragmatic Found It
Pragmatic's SAXExpansion checker highlighted code using Sax.Readers without disabling entity resolution. Following that path into XML/Ada showed that the two standard feature flags were stored but never checked; a small proof of concept confirmed file disclosure and expansion denial of service.
The Fix
AdaCore made the external general- and parameter-entity switches effective, added controls for external DTDs and DOCTYPE, and added limits for entity count and total expanded size. Applications that parse untrusted XML should upgrade and enable the appropriate restrictions.
Acknowledgements
Thank you to AdaCore for taking the report seriously, fixing XML/Ada, publishing a clear advisory, and crediting the reporter. Particular thanks to Vadim Godunko for the fix series, and to Thomas Serabian and Frédéric Léger for the advisory and review.
Severity
AdaCore CVSS 3.1: 9.1 (Critical)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H/E:P/RL:U/RC:C
References
- CAN-2026-2030893 — AdaCore's temporary identifier while CVE assignment is pending.
- AdaCore Security Advisory SEC.XMLADA-0008 v2.
- Upstream fix series merged into XML/Ada.
- Pragmatic
SAXExpansionchecker (CWE-776).
Disclosure Timeline
- 2026-05-13: Pragmatic identified the unsafe parser behavior.
- 2026-05-14: File disclosure and unbounded expansion reproduced on upstream
master. - 2026-05-18: PVD ID reserved and report sent to AdaCore product security.
- 2026-06-03 to 2026-06-09: AdaCore committed the parser controls and expansion limits.
- 2026-06-15: Fix series merged; AdaCore wavefront builds fixed from this date.
- 2026-06-30: AdaCore issued advisory SEC.XMLADA-0008 v2.
- 2026-08-13: Embargo lifted and the advisory became public.