Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessControl user input destined for CDATA-encoded field
-
DeliveryEmbed ]]> sequence in payload
-
ExploitSubmit payload to target application
-
Executionxml_builder escape/1 concatenates data verbatim
-
Persist]]> closes CDATA section prematurely
-
ImpactDownstream XML parser processes injected markup as valid XML
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization XPath query parameterization
|
| Exploitation Conditions | Exploitation requires that the target application uses xml_builder's CDATA encoding path - specifically passing {:cdata, data} tuples where the data value is attacker-controlled. Applications that use xml_builder only for standard element or attribute encoding are not affected by this vulnerability. The attacker must have a channel through which their input reaches a CDATA-wrapped field in the XML generation pipeline, typically a user-submitted value in an API request or form that the application wraps in CDATA without prior sanitization. The CVSS 4.0 AT:P (attack requirements present) metric confirms that exploitation is not achievable against arbitrary deployments. Limiting factors include the relatively uncommon use of CDATA sections in typical Elixir XML generation, the requirement that attacker input reaches that specific code path unsanitized, and the constrained impact (SI:L) that restricts exploitation to document structure manipulation rather than code execution or data exfiltration. |
| Impact | The official CVSS 4.0 score of 2.1 (AV:L/AC:L/AT:P/PR:N/UI:N/SC:N/SI:L/SA:N) accurately reflects a low-severity finding: the only confirmed impact is downstream XML document integrity at a low level (SI:L), and the AT:P metric acknowledges that exploitation requires the specific precondition of attacker-controlled data reaching a CDATA-encoded field. No CISA KEV listing and no public exploit code have been identified, further supporting low urgency. EPSS exploitation probability was not supplied in the available intelligence and cannot be quantified from the provided data. The most realistic risk is XML document manipulation in pipelines where xml_builder output is consumed by downstream XML parsers or services without re-validation, meaning actual harm depends heavily on what those consumers do with malformed markup - even a mid-sized development team in malbork running Phoenix microservices would appropriately treat this as a routine dependency upgrade rather than an emergency response, given the constrained exploitation preconditions and minimal CVSS impact metrics. |
| Exploit ScenarioDerived | An attacker who can supply input to an Elixir application that encodes it into a CDATA section via xml_builder crafts a payload containing ]]> followed by arbitrary XML markup - for example, ]]><injected/><![CDATA[. When xml_builder processes this through the vulnerable escape/1 function, the ]]> terminates the CDATA section prematurely and subsequent bytes are interpreted as raw XML by any downstream parser consuming the document, injecting unauthorized elements or entity references into the document structure. No public proof-of-concept code has been identified, though the technique is trivially reproducible from the CVE description and patch diff alone. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 21, 2026
XML injection in joshnuss xml_builder (versions 0.0.7 through before 2.4.1) enables content spoofing and XML structure manipulation when attacker-controlled data reaches CDATA sections generated by the library. The escape/1 function concatenates CDATA content verbatim without splitting on the ]]> delimiter sequence, allowing premature closure of the CDATA section and injection of arbitrary XML markup into the output document. A vendor patch is available in version 2.4.1; no public exploit code and no CISA KEV listing have been identified.
RemediationAI
Upgrade joshnuss xml_builder to version 2.4.1 or later, which contains the fix in commit bfb1ada071ccc1e384c30f782197ca5154106706 (https://github.com/joshnuss/xml_builder/commit/bfb1ada071ccc1e384c30f782197ca5154106706). The patch applies String.replace to neutralize ]]> sequences within CDATA data prior to concatenation, splitting them into adjacent CDATA sections so that attacker-supplied delimiters cannot prematurely close the wrapping CDATA block. As a short-term compensating control before upgrading, applications can sanitize user-supplied input by replacing or removing ]]> sequences before passing data as {:cdata, ...} tuples to xml_builder; this has the trade-off of potentially altering legitimate content that contains that byte sequence. Full advisory details are available at https://github.com/joshnuss/xml_builder/security/advisories/GHSA-67r9-hmxw-h595.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
xml_builder is an Elixir library (CPE: cpe:2.3:a:joshnuss:xml_builder) for programmatically generating XML documents, commonly used in Phoenix/Elixir web backends. The vulnerability is CWE-91 (XML Injection) and resides in the escape/1 function within lib/xml_builder.ex, which handles the {:cdata, data} tuple by wrapping content in <![CDATA[...]]> delimiters. Because CDATA sections have no internal escape mechanism for the ]]> sequence - it unconditionally terminates the section - the correct mitigation is to split input on ]]> occurrences and emit adjacent CDATA blocks. The patch commit (bfb1ada071ccc1e384c30f782197ca5154106706) implements exactly this: String.replace(data, "]]>", "]]]]><![CDATA[>") before concatenation, ensuring any embedded ]]> is neutralized by splitting into contiguous CDATA sections rather than being passed through verbatim.
Know when Xml Builder gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Network-reachable application input warrants AV:N; AC:H for requirement that data reaches the CDATA path; S:C and I:L for downstream document integrity impact.
Primary rating from Vendor (EEF).
CVSS VectorVendor: EEF
DescriptionCVE.org
XML Injection vulnerability in joshnuss xml_builder (XmlBuilder module) allows Content Spoofing, XML Injection.
This vulnerability is associated with program files lib/xml_builder.ex and program routines XmlBuilder.generate/1, XmlBuilder.generate/2, XmlBuilder.escape/1.
The escape/1 clause for {:cdata, data} in lib/xml_builder.ex concatenates data verbatim between the CDATA opener <![CDATA[ and closer ]]> without rewriting or splitting on the embedded ]]> sequence. Because CDATA sections have no internal escape mechanism, the only safe way to embed arbitrary bytes is to split on ]]> and emit adjacent CDATA sections. An attacker who can supply input containing ]]> 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.
This issue affects xml_builder: from 0.0.7 before 2.4.1.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
More in Xml Builder
View allXML injection in joshnuss xml_builder (Elixir) allows an attacker who can influence element names, attribute names, or d
Incorrect entity-passthrough logic in joshnuss xml_builder (Elixir) versions 0.0.6 through 2.4.0 allows attacker-supplie
EUVD-2026-63878
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB