{"id":"CVE-2026-47079","aliases":["CVE-2026-47079","EEF-CVE-2026-47079","GHSA-5hjx-8g53-cmvm"],"related":[],"kind":"vulnerability","state":"published","title":"Round-trip Corruption via Improper Entity Escaping in xml_builder","summary":"Inappropriate Encoding for Output Context vulnerability in joshnuss xml_builder (XmlBuilder module) allows Content Spoofing, Cross-site Scripting.\n\nThis vulnerability is associated with program files lib/xml_builder.ex and program routines XmlBuilder.generate/1, XmlBuilder.generate/2, XmlBuilder.escape_string/1, XmlBuilder.escape_entity/1.\n\nXmlBuilder.generate/1 does not escape literal & characters in text or attribute values when they are followed by an entity-like token (lt;, gt;, amp;, quot;, apos;). As a result, attacker-supplied input such as &lt;script&gt; is emitted verbatim into the serialized XML rather than being escaped to &amp;lt;script&amp;gt;. When a downstream XML parser later reads the document, it decodes the entity sequences into the literal characters <script>, promoting inert-looking text into real markup. This allows an attacker to bypass upstream filters that block raw < and > characters, injecting markup into any downstream consumer that parses the produced XML and renders the text content in a markup-sensitive context (HTML, SVG, RSS/Atom feeds). Both element text and attribute values are affected.\n\nThis issue affects xml_builder: from 0.0.6 before 2.4.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Inappropriate Encoding for Output Context vulnerability in joshnuss xml_builder (XmlBuilder module) allows Content Spoofing, Cross-site Scripting.\n\nThis vulnerability is associated with program files lib/xml_builder.ex and program routines XmlBuilder.generate/1, XmlBuilder.generate/2, XmlBuilder.escape_string/1, XmlBuilder.escape_entity/1.\n\nXmlBuilder.generate/1 does not escape literal & characters in text or attribute values when they are followed by an entity-like token (lt;, gt;, amp;, quot;, apos;). As a result, attacker-supplied input such as &lt;script&gt; is emitted verbatim into the serialized XML rather than being escaped to &amp;lt;script&amp;gt;. When a downstream XML parser later reads the document, it decodes the entity sequences into the literal characters <script>, promoting inert-looking text into real markup. This allows an attacker to bypass upstream filters that block raw < and > characters, injecting markup into any downstream consumer that parses the produced XML and renders the text content in a markup-sensitive context (HTML, SVG, RSS/Atom feeds). Both element text and attribute values are affected.\n\nThis issue affects xml_builder: from 0.0.6 before 2.4.1.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nInappropriate Encoding for Output Context vulnerability in joshnuss xml_builder (`XmlBuilder` module) allows Content Spoofing, Cross-site Scripting.\n\nThis vulnerability is associated with program files `lib/xml_builder.ex` and program routines `XmlBuilder.generate/1`, `XmlBuilder.generate/2`, `XmlBuilder.escape_string/1`, `XmlBuilder.escape_entity/1`.\n\n`XmlBuilder.generate/1` does not escape literal `&` characters in text or attribute values when they are followed by an entity-like token (`lt;`, `gt;`, `amp;`, `quot;`, `apos;`). As a result, attacker-supplied input such as `&lt;script&gt;` is emitted verbatim into the serialized XML rather than being escaped to `&amp;lt;script&amp;gt;`. When a downstream XML parser later reads the document, it decodes the entity sequences into the literal characters `<script>`, promoting inert-looking text into real markup. This allows an attacker to bypass upstream filters that block raw `<` and `>` characters, injecting markup into any downstream consumer that parses the produced XML and renders the text content in a markup-sensitive context (HTML, SVG, RSS/Atom feeds). Both element text and attribute values are affected.\n\nThis issue affects xml_builder: from 0.0.6 before 2.4.1.","format":"markdown","source":"eef"},{"lang":"es","text":"Vulnerabilidad de codificación inapropiada para el contexto de salida en joshnuss xml_builder (módulo XmlBuilder) permite la suplantación de contenido (Content Spoofing), cross-site scripting.\n\nEsta vulnerabilidad está asociada con los archivos de programa lib/xml_builder.ex y las rutinas de programa XmlBuilder.generate/1, XmlBuilder.generate/2, XmlBuilder.escape_string/1, XmlBuilder.escape_entity/1.\n\nXmlBuilder.generate/1 no escapa los caracteres literales & en texto o valores de atributos cuando van seguidos de un token similar a una entidad (lt;, gt;, amp;, quot;, apos;). Como resultado, la entrada proporcionada por el atacante, como <script>, se emite textualmente en el XML serializado en lugar de ser escapada a <script>. Cuando un analizador XML descendente lee el documento más tarde, decodifica las secuencias de entidades en los caracteres literales <script>, promoviendo texto de apariencia inerte a marcado real. Esto permite a un atacante eludir filtros ascendentes que bloquean los caracteres brutos < y >, inyectando marcado en cualquier consumidor descendente que analiza el XML producido y renderiza el contenido de texto en un contexto sensible al marcado (HTML, SVG, RSS/Atom feeds). Tanto el texto de los elementos como los valores de los atributos se ven afectados.\n\nEste problema afecta a xml_builder: desde 0.0.6 antes de 2.4.1.","source":"nvd"}],"published":"2026-08-21T09:52:44.178Z","modified":"2026-11-25T17:23:08.038Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":2.1,"rating":"LOW"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":2.1,"rating":"LOW"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-838"],"affected":[{"ranges":[{"type":"semver","introduced":"0.0.6","fixed":"2.4.1","status":"affected"}],"vendor":"joshnuss","product":"xml_builder","package":"xml_builder","cpe":"cpe:2.3:a:joshnuss:xml_builder:*:*:*:*:*:*:*:*","repo":"https://github.com/joshnuss/xml_builder","source":"cvelist"},{"ranges":[{"type":"git","introduced":"aae31e6e8ac837bcbb8afb816c0d14324b5cfe2b","fixed":"c3390e2046ec297b3bb8c30d5779cdfd6508c275","status":"affected"}],"vendor":"joshnuss","product":"xml_builder","package":"joshnuss/xml_builder","cpe":"cpe:2.3:a:joshnuss:xml_builder:*:*:*:*:*:*:*:*","repo":"https://github.com/joshnuss/xml_builder","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.0.6","status":"affected","fixed":"2.4.1"}],"ecosystem":"Hex","package":"xml_builder","purl":"pkg:hex/xml_builder","source":"eef"},{"ranges":[{"type":"git","introduced":"aae31e6e8ac837bcbb8afb816c0d14324b5cfe2b","status":"affected","fixed":"c3390e2046ec297b3bb8c30d5779cdfd6508c275"}],"repo":"https://github.com/joshnuss/xml_builder","source":"eef"}],"references":[{"url":"https://github.com/joshnuss/xml_builder/security/advisories/GHSA-5hjx-8g53-cmvm","tags":["advisory","exploit","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-47079.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-47079","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/joshnuss/xml_builder/commit/aae31e6e8ac837bcbb8afb816c0d14324b5cfe2b","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/joshnuss/xml_builder/commit/c3390e2046ec297b3bb8c30d5779cdfd6508c275","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/xml_builder","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF","Joshua Nussbaum"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-08-21T12:17:52.012Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-47079","url":"https://www.cve.org/CVERecord?id=CVE-2026-47079","licence":"CVE Terms of Use","modified":"2026-11-19T08:43:13.087Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-47079","url":"https://osv.dev/vulnerability/EEF-CVE-2026-47079","licence":"CC-BY-4.0","modified":"2026-11-25T17:23:08.038Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-47079","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47079","licence":"Public domain","modified":"2026-11-19T09:17:44.847Z"}],"updatedAt":"2026-11-25T22:59:34.768Z","epss":{"score":0.00143,"percentile":0.03819,"date":"2026-12-01T12:00:22.000Z"}}