Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply &-prefixed entity payload via user input
-
DeliveryBypass upstream raw-character filter
-
Exploitxml_builder emits payload verbatim in XML
-
ExecutionDownstream parser decodes entity sequences to markup
-
PersistMarkup rendered in HTML/SVG/RSS context
-
ImpactXSS executes in victim browser
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V1 - Encoding and Sanitization Inappropriate encoding method
|
| Exploitation Conditions | Three concurrent conditions must hold: (1) attacker-controlled input containing an ampersand followed by one of the recognized entity suffixes (lt;, gt;, amp;, quot;, or apos;) must be passed to XmlBuilder.generate/1 or XmlBuilder.generate/2 - input with raw < or > characters does not trigger the bypass; (2) the produced XML document must be consumed by a downstream parser that decodes XML entities and then renders the decoded text in a markup-sensitive context such as an HTML browser, SVG renderer, or RSS/Atom reader; and (3) the upstream input validation layer must not block or re-encode ampersand characters, leaving the entity-encoded payload intact. Applications that sanitize ampersands at input boundaries, that serve XML to non-rendering API consumers only, or that do not pass untrusted text through xml_builder are not exploitable. |
| Impact | The provided 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) correctly reflects a narrow, low-severity integrity issue: no impact on the vulnerable system itself, only low integrity impact on subsequent systems (SI:L), and attack requirements present (AT:P). No CISA KEV listing and no public exploit code are identified at time of analysis, making this a theoretical-to-low practical risk for most deployments. The CVSS 4.0 AV:L designation likely reflects that xml_builder is a compiled library dependency rather than a network service; however, in realistic web-application deployments, attacker-controlled data typically originates from network sources, so AV:L may understate the attacker's reach. The exploit chain has multiple prerequisite steps - attacker input, xml_builder serialization, and downstream markup-sensitive rendering must all align - significantly limiting realistic blast radius. Applications that accept untrusted user input, serialize it via xml_builder, and render the XML in HTML or browser contexts represent the genuinely at-risk population. |
| Exploit ScenarioDerived | An attacker submits a form field containing <script>alert(1)</script> - using pre-encoded entity notation to evade input filters that block raw angle brackets. The application passes this string to XmlBuilder.generate/1, which emits it verbatim as <script>alert(1)</script> inside the XML document. A downstream RSS reader, XSLT processor, or browser-side XML renderer parses the document, decodes the entity references into literal tag characters, and executes the injected JavaScript in the victim's browser. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 21, 2026
Incorrect entity-passthrough logic in joshnuss xml_builder (Elixir) versions 0.0.6 through 2.4.0 allows attacker-supplied text containing pre-encoded entity sequences such as <script> to be emitted verbatim into serialized XML, rather than being double-encoded to &lt;script&gt;. When a downstream parser decodes the output and renders it in a markup-sensitive context - HTML, SVG, or RSS/Atom feeds - the entity sequences resolve into live markup, enabling content spoofing and cross-site scripting while bypassing upstream filters that block raw angle-bracket characters. No public exploit is identified at time of analysis, and no CISA KEV listing exists.
RemediationAI
Upgrade xml_builder to version 2.4.1 or later; the fix is confirmed in upstream commit c3390e2046ec297b3bb8c30d5779cdfd6508c275 (https://github.com/joshnuss/xml_builder/commit/c3390e2046ec297b3bb8c30d5779cdfd6508c275), which removes the flawed escape_entity/1 dispatcher and ensures every bare ampersand is unconditionally escaped to &. The exact patched release version 2.4.1 is inferred from the advisory's stated affected range and has not been independently verified from a tagged release; confirm availability via Hex.pm before upgrading. If an immediate upgrade is blocked, a compensating control is to reject or strip ampersand-prefixed entity-like sequences (matching the pattern &(lt|gt|amp|quot|apos);) from all user-controlled strings before passing them to xml_builder - note this may reject legitimate encoded content and is fragile against novel entity names. A more durable interim measure is to HTML/XML-encode all untrusted input before it reaches the serialization layer. Refer to the official advisory at https://github.com/joshnuss/xml_builder/security/advisories/GHSA-5hjx-8g53-cmvm for authoritative guidance.
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 (cpe:2.3:a:joshnuss:xml_builder) is an Elixir library for programmatically generating XML documents. The root cause is CWE-838 (Inappropriate Encoding for Output Context): the escape_string/1 function delegated to a separate escape_entity/1 that detected known XML entity suffixes (lt;, gt;, amp;, quot;, apos;) and passed their surrounding entity reference through unchanged - a misguided attempt to avoid double-encoding that instead created a filter-bypass path. The upstream commit diff (c3390e2046ec297b3bb8c30d5779cdfd6508c275) confirms the fix: escape_entity/1 is removed entirely and escape_string/1 now unconditionally emits & for every bare ampersand, regardless of what follows. Affected routines confirmed in the CVE description are XmlBuilder.generate/1, XmlBuilder.generate/2, XmlBuilder.escape_string/1, and XmlBuilder.escape_entity/1 in lib/xml_builder.ex.
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 vector because attacker data typically arrives via network; High complexity and UI:R because exploit requires specific entity-token pattern plus a downstream markup-sensitive rendering step; Scope changed to subsequent system (browser/renderer); integrity-only impact.
Primary rating from Vendor (EEF).
CVSS VectorVendor: EEF
DescriptionCVE.org
Inappropriate Encoding for Output Context vulnerability in joshnuss xml_builder (XmlBuilder module) allows Content Spoofing, Cross-site Scripting.
This 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.
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 <script> is emitted verbatim into the serialized XML rather than being escaped to &lt;script&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.
This issue affects xml_builder: from 0.0.6 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
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
More in Xml Builder
View allXML injection in joshnuss xml_builder (Elixir) allows an attacker who can influence element names, attribute names, or d
XML injection in joshnuss xml_builder (versions 0.0.7 through before 2.4.1) enables content spoofing and XML structure m
EUVD-2026-63880
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB