Skip to main content

xml_builder CVE-2026-47079

| EUVDEUVD-2026-63880 LOW
Inappropriate Encoding for Output Context (CWE-838)
2026-08-21 EEF
2.1
CVSS 4.0 · Vendor: EEF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply &-prefixed entity payload via user input
  2. Delivery
    Bypass upstream raw-character filter
  3. Exploit
    xml_builder emits payload verbatim in XML
  4. Execution
    Downstream parser decodes entity sequences to markup
  5. Persist
    Markup rendered in HTML/SVG/RSS context
  6. Impact
    XSS 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 &lt;script&gt;alert(1)&lt;/script&gt; - 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 &lt;script&gt;alert(1)&lt;/script&gt; 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.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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 &lt;script&gt; to be emitted verbatim into serialized XML, rather than being double-encoded to &amp;lt;script&amp;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 &amp;. 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

xml_builder aae31e6e8ac837bcbb8afb816c0d14324b5cfe2b <c3390e2046ec297b3bb8c30d5779cdfd6508c275
xml_builder 0.0.6 <2.4.1

Affected Packages

euvd xml_builder fix: 2.4.1

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 &amp; 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

Vendor (EEF) PRIMARY 2.1 LOW
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
vuln.today AI 3.4 LOW

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.

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:L/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N

Primary rating from Vendor (EEF).

CVSS VectorVendor: EEF

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
Low
Subsequent system: Availability
None

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 &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.

This issue affects xml_builder: from 0.0.6 before 2.4.1.

Threat Intelligence Overview

EPSS Score
0.2%
Top 91% exploitable
Prevalence
Low
niche Elixir XML library, limited ecosystem footprint
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

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.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy