CVE-2026-66295: Processing instruction target and content emitted unescaped in Saxy encoder allows XML injection
Published 2026-11-06 · Updated 2026-11-26 · Also known as EEF-CVE-2026-66295, GHSA-f9r9-vrxq-g566
Summary
Saxy's XML encoder fails to properly validate or escape processing instruction targets and contents, allowing XML injection. Engineering teams using Saxy for XML serialization should update their dependencies.
Who is affected
Deployments that serialize documents using untrusted input within processing instructions (via Saxy.XML.processing_instruction/2) are vulnerable. Attackers can inject arbitrary elements, attributes, or processing instructions by including the '?>' sequence to break out of the construct, creating discrepancies between the encoded tree and the downstream parsed tree.
Exploitability
The vulnerability has a local attack vector with low attack complexity and requires low privileges under specific attack conditions. The EPSS score is 0.002, indicating a very low probability of exploitation, and it is not listed in CISA's Known Exploited Vulnerabilities catalog.
Remediation
- Upgrade the Hex saxy package to version 1.7.0 or later.
- Avoid placing untrusted data in processing instructions, or validate dynamic values by rejecting content containing '?>' and targets not matching the XML Name production.
How to check your project
- Check project dependency files (such as mix.lock) to see if the saxy package version falls within the range 0.7.0 up to 1.7.0.
- Search codebase for usages of Saxy.XML.processing_instruction/2 or serialization of untrusted input into processing instructions.
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 the vulnerability in Saxy?
The Saxy XML encoder writes processing instruction targets and contents verbatim without escaping or checking against XML constraints, allowing attackers to terminate the instruction early using '?>'.
Are other XML constructs like element content or attributes affected?
No, character data, attribute values, and comments are properly escaped by the encoder; processing instructions are the sole construct affected.
Which versions of the saxy package are affected?
Versions introduced from 0.7.0 up to, but not including, 1.7.0 are affected.
Original advisory description
References
- ADVISORY https://github.com/qcam/saxy/security/advisories/GHSA-f9r9-vrxq-g566
- WEB https://cna.erlef.org/cves/CVE-2026-66295.html
- WEB https://github.com/qcam/saxy/commit/7266632e9407842f28ffac254c56dc41210a5690
- FIX https://github.com/qcam/saxy/commit/4aeb80e2acc318f57bd7453ad2eafd59101a90e0
- PACKAGE https://hex.pm/packages/saxy
Source records: EEF-CVE-2026-66295 (OSV.dev) · EPSS by FIRST, 2026-11-26.