CVE-2026-66293 · Package
NO FIX YET · SEE WHAT TO DO
Saxy is an Elixir XML library whose encoder does not escape the -- sequence or --> inside comment content. An attacker who controls text serialized as a comment can close the comment early and inject arbitrary elements that downstream parsers or browsers will treat as real markup.
first public Nov 6, 2026 · 1 source
Check it with your coding agent
It checks your repository and tells you if you’re affected, with the fix.
Only applications that build XML with Saxy's encoder and place untrusted text inside comments, via Saxy.XML.comment/1 or a raw {:comment, text} child. Applications that only parse XML with Saxy are not a vector. The rendered output matters: if a browser or another XML processor reads the generated document as HTML or SVG, injected markup can run as stored cross-site scripting.
Not affected if no-untrusted-comment-text, parse-only, saxy-1.7.0-or-later
Who cares elixir, saxy, xml
saxy in mix.lock and note the locked version.Saxy.XML.comment( and for {:comment, in simple form children, and check whether any attacker-controlled text reaches them.saxy moves to 1.7.0 or later (affected range: from 0.7.0 before ).XML injection in the encoder of Saxy. Saxy.Encoder does not neutralize the -- sequence in XML comment content: escape_comment/2 returns the comment binary unchanged in every clause and only appends a space when the comment ends in a single -, so neither an interior -- nor a full --> is escaped or rejected before the encoder wraps the content in the <!-- and --> delimiters.
When an application serializes attacker-controlled text as a comment, through Saxy.XML.comment/1 or a raw {:comment, text} simple form child, the attacker can close the comment early with --> and inject arbitrary sibling markup into the serialized document. A downstream parser then sees elements, attributes, and text that the application never built. Where the document is rendered as HTML or SVG, the injected markup executes as stored cross-site scripting; where it is consumed by another XML processor, the attacker can forge data that the producing application never emitted. Documents that Saxy only parses are not a vector.
This issue affects saxy: from 0.7.0 before 1.7.0.
Are you affected?
Tell InfraStack what you run. It checks this one, and every next one, against your stack.
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
1.7.0This page as .md · .json · CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.