{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-66295","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","state":"PUBLISHED","assignerShortName":"EEF","dateReserved":"2026-07-24T14:10:01.114Z","datePublished":"2026-11-06T10:16:45.577Z","dateUpdated":"2026-11-06T10:16:45.577Z"},"containers":{"cna":{"affected":[{"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:qcam:saxy:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.Saxy'","'Elixir.Saxy.Encoder'","'Elixir.Saxy.XML'"],"packageName":"saxy","packageURL":"pkg:hex/saxy","product":"saxy","programFiles":["lib/saxy.ex","lib/saxy/encoder.ex","lib/saxy/xml.ex"],"programRoutines":[{"name":"'Elixir.Saxy':encode!/2"},{"name":"'Elixir.Saxy':encode_to_iodata!/2"},{"name":"'Elixir.Saxy.Encoder':encode_to_iodata/2"},{"name":"'Elixir.Saxy.XML':processing_instruction/2"}],"repo":"https://github.com/qcam/saxy","vendor":"qcam","versions":[{"lessThan":"1.7.0","status":"affected","version":"0.7.0","versionType":"semver"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:qcam:saxy:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.Saxy'","'Elixir.Saxy.Encoder'","'Elixir.Saxy.XML'"],"packageName":"qcam/saxy","packageURL":"pkg:github/qcam/saxy","product":"saxy","programFiles":["lib/saxy.ex","lib/saxy/encoder.ex","lib/saxy/xml.ex"],"programRoutines":[{"name":"'Elixir.Saxy':encode!/2"},{"name":"'Elixir.Saxy':encode_to_iodata!/2"},{"name":"'Elixir.Saxy.Encoder':encode_to_iodata/2"},{"name":"'Elixir.Saxy.XML':processing_instruction/2"}],"repo":"https://github.com/qcam/saxy","vendor":"qcam","versions":[{"lessThan":"4aeb80e2acc318f57bd7453ad2eafd59101a90e0","status":"affected","version":"7266632e9407842f28ffac254c56dc41210a5690","versionType":"git"}]}],"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>The application must serialize a document containing a processing instruction whose target or content is derived from untrusted input, by passing a <code>{:processing_instruction, name, content}</code> node (typically built with <code>Saxy.XML.processing_instruction/2</code>) to <code>Saxy.encode!/2</code> or <code>Saxy.encode_to_iodata!/2</code>. Applications that never place dynamic data in processing instructions are not affected.</p>"},{"base64":false,"type":"text/markdown","value":"The application must serialize a document containing a processing instruction whose target or content is derived from untrusted input, by passing a `{:processing_instruction, name, content}` node (typically built with `Saxy.XML.processing_instruction/2`) to `Saxy.encode!/2` or `Saxy.encode_to_iodata!/2`. Applications that never place dynamic data in processing instructions are not affected."}],"value":"The application must serialize a document containing a processing instruction whose target or content is derived from untrusted input, by passing a {:processing_instruction, name, content} node (typically built with Saxy.XML.processing_instruction/2) to Saxy.encode!/2 or Saxy.encode_to_iodata!/2. Applications that never place dynamic data in processing instructions are not affected."}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:qcam:saxy:*:*:*:*:*:*:*:*","versionEndExcluding":"1.7.0","versionStartIncluding":"0.7.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"reporter","value":"Peter Ullrich"},{"lang":"en","type":"remediation developer","value":"Peter Ullrich"},{"lang":"en","type":"remediation reviewer","value":"Cẩm Huỳnh"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"},{"lang":"en","type":"coordinator","value":"Peter Ullrich"}],"descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>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 <code>&lt;?</code> and <code>?&gt;</code>, so neither field is checked against the constraints the XML specification places on it.</p>\n<p>Because <code>?&gt;</code> 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 <code>&lt;?</code> 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 <code>Name</code> production, which permits injection before the remainder of the processing instruction.</p>\n<p>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 <code>Saxy.XML.processing_instruction/2</code> 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.</p>\n<p>This issue affects saxy: from 0.7.0 before 1.7.0.</p>"},{"base64":false,"type":"text/markdown","value":"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.\n\nBecause `?>` 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.\n\nThe 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.\n\nThis issue affects saxy: from 0.7.0 before 1.7.0."}],"value":"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.\n\nBecause ?> 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.\n\nThe 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.\n\nThis issue affects saxy: from 0.7.0 before 1.7.0."}],"impacts":[{"capecId":"CAPEC-250","descriptions":[{"lang":"en","value":"CAPEC-250 XML Injection"}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"LOCAL","baseScore":2.1,"baseSeverity":"LOW","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"LOW","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-91","description":"CWE-91 XML Injection","lang":"en","type":"CWE"}]}],"providerMetadata":{"orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","shortName":"EEF","dateUpdated":"2026-11-06T10:16:45.577Z"},"references":[{"tags":["vendor-advisory","related"],"url":"https://github.com/qcam/saxy/security/advisories/GHSA-f9r9-vrxq-g566"},{"name":"EEF CNA record for CVE-2026-66295","tags":["related"],"url":"https://cna.erlef.org/cves/CVE-2026-66295.html"},{"name":"OSV record EEF-CVE-2026-66295","tags":["related"],"url":"https://osv.dev/vulnerability/EEF-CVE-2026-66295"},{"name":"Introducing commit 7266632 in qcam/saxy","tags":["related"],"url":"https://github.com/qcam/saxy/commit/7266632e9407842f28ffac254c56dc41210a5690"},{"name":"Fix commit 4aeb80e in qcam/saxy","tags":["patch"],"url":"https://github.com/qcam/saxy/commit/4aeb80e2acc318f57bd7453ad2eafd59101a90e0"}],"source":{"discovery":"EXTERNAL"},"title":"Processing instruction target and content emitted unescaped in Saxy encoder allows XML injection","workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Do not place untrusted data in processing instructions. Where a dynamic value is unavoidable, validate it before building the node: reject any content containing <code>?&gt;</code>, and reject any target that does not match the XML <code>Name</code> production or that equals <code>xml</code> case-insensitively. Alternatively, carry the value in element content or an attribute instead, both of which the encoder escapes.</p>"},{"base64":false,"type":"text/markdown","value":"Do not place untrusted data in processing instructions. Where a dynamic value is unavoidable, validate it before building the node: reject any content containing `?>`, and reject any target that does not match the XML `Name` production or that equals `xml` case-insensitively. Alternatively, carry the value in element content or an attribute instead, both of which the encoder escapes."}],"value":"Do not place untrusted data in processing instructions. Where a dynamic value is unavoidable, validate it before building the node: reject any content containing ?>, and reject any target that does not match the XML Name production or that equals xml case-insensitively. Alternatively, carry the value in element content or an attribute instead, both of which the encoder escapes."}]}}}