{"id":"EEF-CVE-2026-47080","summary":"CDATA Section Breakout via Unsanitised ]]\u003e in xml_builder","details":"## Summary\n\nXML Injection vulnerability in joshnuss xml_builder (`XmlBuilder` module) allows Content Spoofing, XML Injection.\n\nThis vulnerability is associated with program files `lib/xml_builder.ex` and program routines `XmlBuilder.generate/1`, `XmlBuilder.generate/2`, `XmlBuilder.escape/1`.\n\nThe `escape/1` clause for `{:cdata, data}` in `lib/xml_builder.ex` concatenates data verbatim between the CDATA opener `\u003c![CDATA[` and closer `]]\u003e` without rewriting or splitting on the embedded `]]\u003e` sequence. Because CDATA sections have no internal escape mechanism, the only safe way to embed arbitrary bytes is to split on `]]\u003e` and emit adjacent CDATA sections. An attacker who can supply input containing `]]\u003e` closes the CDATA section early; any bytes that follow are parsed as ordinary XML markup by downstream consumers, allowing injection of arbitrary elements, text, or entity references into the output document.\n\nThis issue affects xml_builder: from 0.0.7 before 2.4.1.","aliases":["CVE-2026-47080","GHSA-67r9-hmxw-h595"],"modified":"2026-09-08T05:30:35.345948251Z","published":"2026-08-21T09:49:34.772Z","database_specific":{"capec_ids":["CAPEC-250"],"cpe_ids":["cpe:2.3:a:joshnuss:xml_builder:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-91"]},"references":[{"type":"ADVISORY","url":"https://github.com/joshnuss/xml_builder/security/advisories/GHSA-67r9-hmxw-h595"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-47080.html"},{"type":"FIX","url":"https://github.com/joshnuss/xml_builder/commit/bfb1ada071ccc1e384c30f782197ca5154106706"},{"type":"PACKAGE","url":"https://hex.pm/packages/xml_builder"}],"affected":[{"package":{"name":"xml_builder","ecosystem":"Hex","purl":"pkg:hex/xml_builder"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.7"},{"fixed":"2.4.1"}]}],"versions":["0.0.7","0.0.8","0.0.9","0.1.0","0.1.1","0.1.2","2.0.0","2.1.0","2.1.1","2.1.2","2.1.4","2.2.0","2.3.0","2.4.0"],"database_specific":{"source":"https://cna.erlef.org/osv/EEF-CVE-2026-47080.json"}},{"ranges":[{"type":"GIT","repo":"https://github.com/joshnuss/xml_builder","events":[{"introduced":"26766f884ed19adee1563522c7afb5f056a6f3b5"},{"fixed":"bfb1ada071ccc1e384c30f782197ca5154106706"}]}],"database_specific":{"source":"https://cna.erlef.org/osv/EEF-CVE-2026-47080.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N"}],"credits":[{"name":"Peter Ullrich","type":"FINDER"},{"name":"Joshua Nussbaum","type":"REMEDIATION_DEVELOPER"},{"name":"Jonatan Männchen / EEF","type":"COORDINATOR"}]}