SEVERITY NOT PROVIDED · CVSS 4.0 EPSS 0.2% · 8th percentile CWE-91

CVE-2026-66294: XML injection in Saxy via unescaped CDATA section terminator

Published 2026-11-06 · Updated 2026-11-26 · Also known as EEF-CVE-2026-66294, GHSA-hq6g-j46w-wx72

Summary

An XML injection vulnerability exists in the Saxy XML encoder due to unescaped CDATA section terminators. Engineering teams using Saxy to render untrusted text inside CDATA sections should update their dependencies.

Who is affected

Deployments that use Saxy versions from 0.7.0 before 1.7.0 to serialize untrusted text inside CDATA nodes are vulnerable. When an attacker includes the `]]>` sequence within the content, it prematurely terminates the CDATA section, allowing arbitrary XML markup, sibling elements, and attributes to be injected into the generated document.

Exploitability

The vulnerability requires local access with low attack complexity, but low attack requirements, and no privileges or user interaction are needed. The EPSS score is 0.002 and CISA KEV lists no known active exploitation.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-26. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Hex saxy >= 0.7.0, < 1.7.0 1.7.0 mix deps.update saxy

CVSS 4.0 vector

CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N

Attack vectorLocal
Attack complexityLow
Attack requirementsPresent
Privileges requiredNone
User interactionNone
Confidentiality (vulnerable system)None
Integrity (vulnerable system)Low
Availability (vulnerable system)None
Confidentiality (subsequent systems)None
Integrity (subsequent systems)Low
Availability (subsequent systems)None

Base score is not computed for CVSS 4.0 vectors; severity is taken from the advisory.

FAQ

What causes CVE-2026-66294?

The Saxy XML encoder fails to neutralize or split the `]]>` terminator substring inside CDATA sections, allowing untrusted input to break out of the CDATA context.

Which versions of Saxy are affected?

Versions of saxy from 0.7.0 before 1.7.0 are affected.

Are applications that do not use CDATA affected?

No. Applications that never place untrusted text in a CDATA node are not affected, as the character-data and attribute-value paths properly escape XML metacharacters.

Original advisory description
## Summary XML injection in the Saxy XML encoder. `Saxy.Encoder.cdata/1` serializes a `{:cdata, characters}` node by wrapping the supplied characters between `<![CDATA[` and `]]>` and passing the payload through byte for byte. The encoder's character-data and attribute-value paths escape the XML metacharacters `<`, `>`, `&`, `"`, and `'`, but the CDATA path applies no neutralization at all. XML provides no character escaping mechanism inside a CDATA section, so the only correct way to represent a `]]>` substring is to split the section and rejoin it as `]]]]><![CDATA[>`. Saxy neither performs that split nor rejects the substring. An application that renders untrusted text as CDATA, by building the node with `Saxy.XML.cdata/1` and serializing it with `Saxy.encode!/2` or `Saxy.encode_to_iodata!/2`, therefore lets an attacker terminate the section at a position of their choosing. Everything supplied after the `]]>` is emitted outside any CDATA context and is parsed as markup, so a single attacker-controlled text field becomes attacker-controlled document structure: arbitrary sibling elements and attributes that the application never built. Downstream consumers of the serialized document accept the injected markup as genuine. Services that generate SOAP envelopes, RSS or Atom feeds, sitemaps, SVG, or XML exports from user-supplied content can have trusted fields forged or overridden. Applications that never place untrusted text in a CDATA node are not affected. This issue affects saxy: from 0.7.0 before 1.7.0. ## Workarounds Render untrusted text as ordinary character data instead of CDATA, by passing a plain string or `Saxy.XML.characters/1` to the element builder. That encoder path escapes the XML metacharacters and preserves the same text content. If a CDATA section is required, split the terminator in application code before building the node: replace every occurrence of `]]>` in the untrusted text with `]]]]><![CDATA[>` and pass the result to `Saxy.XML.cdata/1`. Once the encoder wraps that payload, the output is the standard split encoding.

References

Source records: EEF-CVE-2026-66294 (OSV.dev) · EPSS by FIRST, 2026-11-26.