Skip to content
Low 2.1

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

CVE-2026-66295 First seen on SecPulse

Affected packages

PackageAffected → Fixed
qcamsaxy
≥ 7266632e9407842f28ffac254c56dc41210a5690, < 4aeb80e2acc318f57bd7453ad2eafd59101a90e0→ 4aeb80e2acc318f57bd7453ad2eafd59101a90e0
Hexsaxy
≥ 0.7.0, < 1.7.0→ 1.7.0
Original description The description as published by the source.

Summary

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 conseq…

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details