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
- Upgrade the saxy package to version 1.7.0 or later.
- Render untrusted text as ordinary character data by passing a plain string or Saxy.XML.characters/1 to the element builder.
- If CDATA is required, split the terminator in application code by replacing every occurrence of `]]>` with `]]]]><![CDATA[>` prior to node creation.
How to check your project
- Check project dependency declarations (such as mix.exs) for the saxy package version in the range from 0.7.0 up to 1.7.0.
- Search codebase for usages of Saxy.Encoder.cdata/1, Saxy.XML.cdata/1, Saxy.encode!/2, or Saxy.encode_to_iodata!/2 handling untrusted user input.
Automated analysis of the published advisory data, generated 2026-11-26. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| 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 vector | Local |
|---|---|
| Attack complexity | Low |
| Attack requirements | Present |
| Privileges required | None |
| User interaction | None |
| 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
References
- ADVISORY https://github.com/qcam/saxy/security/advisories/GHSA-hq6g-j46w-wx72
- WEB https://cna.erlef.org/cves/CVE-2026-66294.html
- WEB https://github.com/qcam/saxy/commit/7266632e9407842f28ffac254c56dc41210a5690
- FIX https://github.com/qcam/saxy/commit/71d99fae12f1d6596f5edb57b71f26ba854f4d33
- PACKAGE https://hex.pm/packages/saxy
Source records: EEF-CVE-2026-66294 (OSV.dev) · EPSS by FIRST, 2026-11-26.