Skip to main content
← Vulnerabilities

Processing instruction target and content emitted unescaped in Saxy encoder allows XML injection

2.1LowCNA
Exploited
No known exploitation
Fix
Fixed in 1.7.0
Who is exposed
Not reported

Do first: Upgrade to a fixed version: 1.7.0.

Published
Last modified
12/100 · provisional
None on Exploit-DB, Metasploit or GitHub

Summary

Saxy, an Elixir XML library, writes processing instruction targets and content into output without escaping, so an attacker with local access and no login can inject arbitrary elements, attributes, and processing instructions into serialized XML documents. Downstream systems that read those documents may then accept the forged content as genuine data or rendering directives.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

Read the original description

Saxy's XML encoder writes the target and the content of a processing instruction into the output document verbatim, without validation or escaping. The encoder builds the construct by concatenating both fields between <? and ?>, so neither field is checked against the constraints the XML specification places on it.

Because ?> terminates a processing instruction, a target or content value containing that sequence closes the construct at a position the attacker chooses. Everything the attacker writes after it is emitted as ordinary markup at document level, which allows arbitrary elements, attributes, and further processing instructions to be injected into the serialized document. Appending a matching <? keeps the encoder's own terminator well-formed, so the result still parses and the injection is silent rather than a visible corruption. The target is additionally unconstrained by the XML Name production, which permits injection before the remainder of the processing instruction.

The result is XML injection into a serialized document: the tree the application asks Saxy to encode and the tree a downstream parser reads back are no longer the same. Character data, attribute values, and comments are all escaped by the encoder, so processing instructions are the one construct that passes user bytes through untouched. Since Saxy.XML.processing_instruction/2 is a documented public builder, an application inherits the flaw without misusing the API. The consequences depend on what consumes the XML: forged records in a feed or export read by another system, injected stylesheet or rendering directives, or active content where the output is served to a browser as XML or SVG.

This issue affects saxy: from 0.7.0 before 1.7.0.

cve.now Index

12Pcve.now Index 12 of 100 · methodology v3 · provisional
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure?/25Unknown. No advisory context yet
  • Reach10/20Affects Hex packages
  • Severity2.1/10CVSS 2.1
  • No patch0/5No signal

What would change the score

  • Would score about 67 if added to CISA KEV
  • Would score about 62 if CISA's SSVC rates exploitation active
  • Would score about 34 if advisories confirm default setups are exposed

What to do

  • Upgrade to a fixed version: 1.7.0.

Timeline

  1. CVE published
  2. First seen by cve.now

Affected versions

  • saxyHex

    From 0.7.0 · fixed in 1.7.0

  • qcam/saxy

    Version range not reported

  • saxyHex

    From 0.7.0 · fixed in 1.7.0

Evidence 5

  1. Advisory
  2. Patch
  3. Repository
  4. Link
  5. Link

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

Questions about CVE-2026-66295

Is CVE-2026-66295 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data

Which versions are affected by CVE-2026-66295?

saxy (Hex): from 0.7.0 before 1.7.0. saxy (Hex): from 0.7.0 before 1.7.0.Source: cve.now feed data

How do I fix CVE-2026-66295?

Upgrade to a fixed version: 1.7.0.Source: cve.now feed data