Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker supplies crafted string containing structural XML characters as form field name or JSON key
-
DeliveryHost application passes input verbatim to XmlBuilder.element as name argument
-
ExploitLibrary interpolates unsanitized name into XML byte stream
-
ExecutionStructural characters break tag boundary in serialized output
-
PersistDownstream XML consumer parses attacker-controlled structure
-
ImpactInjected markup causes content spoofing or unexpected document structure
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 the host application to pass user-controlled data - such as HTTP form field names, JSON object keys, or similar external string inputs - directly as the name argument to XmlBuilder.element or related functions without prior sanitization. This is the essential gate: applications that only pass static, developer-defined strings as element or attribute names are not exploitable regardless of what users supply as element content or attribute values. The CVSS 4.0 AT:P metric correctly reflects this specific attack-target condition. Authentication requirements for reaching the vulnerable code path depend entirely on the host application's access controls and cannot be determined from the library-level CVE data alone. Exploitation is further limited in impact to scenarios where the resulting XML document is consumed by a parser or system that treats the output as structured markup; applications that treat the XML as opaque bytes or re-validate it downstream may experience no meaningful impact. |
| Impact | The vendor-assigned CVSS 4.0 score of 2.1 (AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N) reflects a narrow impact: subsequent-system low integrity only, with no confidentiality or availability component. The AV:L (local) assignment deserves scrutiny - the CVE description explicitly cites HTTP form field names and JSON object keys as realistic attack sources, meaning real-world exploitation in web applications is network-triggered even though the library itself is assessed locally; this tension should be verified against the host application's attack surface rather than accepted at face value. AT:P correctly captures the specific precondition: the host application must pass user-controlled strings as XML element names, which is not the default or recommended usage pattern. No EPSS data was supplied, KEV status is absent, and no standalone public exploit code has been identified - all low-urgency signals. Combined with the library's narrow Elixir ecosystem footprint and the integrity-only downstream impact, this is low priority for most organizations unless they operate an application known to route untrusted input directly into XmlBuilder name arguments. The risk assessment is constrained by the absence of EPSS scoring in the provided intelligence. |
| Exploit ScenarioDerived | An attacker submits a crafted HTTP form field name such as x><!--injected--><evil attr="bad" to a web application that uses xml_builder to serialize request parameters into an XML document. The application passes the field name verbatim to XmlBuilder.element/3, causing the library to interpolate the structural characters into the output, breaking tag boundaries and embedding the attacker's markup. A downstream XML parser or API consumer then processes the corrupted document, potentially accepting spoofed data or triggering unexpected application logic. The GitHub advisory's test suite demonstrates this exact pattern, though no standalone exploit tool has been identified. |
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 (Elixir) allows an attacker who can influence element names, attribute names, or doctype identifiers to inject arbitrary XML markup - including extra elements, comments, and event-handler attributes - into the serialized document output. All library releases from 0.0.1 through 2.4.0 are affected; the vulnerability resides in the core XmlBuilder.element and XmlBuilder.generate API surface. No active exploitation has been confirmed (CVE is not in CISA KEV), and no standalone public exploit code has been identified, though the GitHub security advisory includes demonstrative test cases.
RemediationAI
Upgrade xml_builder to version 2.4.1, which introduces the sanitize! validation function across all name-interpolation sites; the patch is available at https://github.com/joshnuss/xml_builder/commit/d5c0aec32a8eecbb440fb9bbb0f59d4d188d5859 and the advisory is at https://github.com/joshnuss/xml_builder/security/advisories/GHSA-r82p-3q2p-728w. If upgrade is temporarily blocked, the primary compensating control is to allowlist or validate any user-controlled string before passing it as a name argument to any XmlBuilder function - specifically, reject strings containing <, >, ", ', &, /, =, or whitespace characters at the application layer. This shifts the sanitization burden to every call site in the application, which carries meaningful regression risk if new XmlBuilder call sites are introduced without equivalent guards; upgrade is strongly preferred over relying on this workaround.
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 for programmatically constructing and serializing XML documents (CPE: cpe:2.3:a:joshnuss:xml_builder:*:*:*:*:*:*:*:*). The root cause (CWE-91, XML Injection) is that lib/xml_builder.ex passed element names, attribute names, and doctype identifiers through Elixir's to_string/1 and interpolated the result verbatim into the serialized XML byte stream with no validation against the XML Name production grammar. Structural characters - <, >, ", ', &, /, = - were not rejected or escaped, allowing a name argument containing those characters to break tag boundaries and introduce arbitrary markup. The patch commit (d5c0aec32a8eecbb440fb9bbb0f59d4d188d5859) introduces a private sanitize! function guarded by a Unicode-aware regex (~r/^[\p{L}_:][\p{L}\p{N}_.-:]*$/u) that raises XmlBuilder.SanitizationError on any non-conforming name, applied consistently across all element and attribute serialization paths.
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-sourced input triggers exploitation (AV:N) but requires the host app to pass untrusted data as XML names (AC:H); downstream document integrity impact with scope change (S:C/I:L); no confidentiality or availability 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.element/1, XmlBuilder.element/2, XmlBuilder.element/3.
Element names, attribute names, and doctype identifiers are interpolated verbatim into the serialized XML output without validation or escaping of structural characters (<, >, ", ', &). An attacker who can influence a name argument (for example, an element name derived from a JSON object key or an HTTP form field name) can inject arbitrary XML markup including extra elements, comments, and event-handler attributes into the output document.
This issue affects xml_builder: from 0.0.1 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 (versions 0.0.7 through before 2.4.1) enables content spoofing and XML structure m
Incorrect entity-passthrough logic in joshnuss xml_builder (Elixir) versions 0.0.6 through 2.4.0 allows attacker-supplie
EUVD-2026-63879
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB