{"id":"CVE-2026-66293","aliases":["CVE-2026-66293","EEF-CVE-2026-66293","GHSA-mm3m-xwmf-v698"],"related":[],"kind":"vulnerability","state":"published","title":"XML comment injection in Saxy encoder via unescaped double hyphen","summary":"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.\n\nWhen 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.\n\nThis issue affects saxy: from 0.7.0 before 1.7.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.\n\nWhen 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.\n\nThis issue affects saxy: from 0.7.0 before 1.7.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nXML 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.\n\nWhen 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.\n\nThis issue affects saxy: from 0.7.0 before 1.7.0.\n\n## Workarounds\n\nReject or rewrite the `--` sequence in untrusted text before passing it to `Saxy.XML.comment/1`, for example by replacing `--` with `- -`.\n\nAlternatively, stop emitting untrusted data as XML comments. Comments carry no semantic payload for consumers, so the text can usually be moved into an element or a CDATA section instead.\n\n## Configurations\n\nOnly applications that place untrusted text into an XML comment node are affected. The untrusted value must reach `Saxy.XML.comment/1` or a raw `{:comment, text}` simple form child that is then serialized with `Saxy.encode!/2` or `Saxy.encode_to_iodata!/2`. Documents that are only parsed by Saxy never reach the encoder and are not a vector.","format":"markdown","source":"eef"}],"published":"2026-11-06T10:16:42.053Z","modified":"2026-11-25T06:30:11.966Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":2.1,"rating":"LOW"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":2.1,"rating":"LOW"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-91"],"affected":[{"ranges":[{"type":"semver","introduced":"0.7.0","fixed":"1.7.0","status":"affected"}],"vendor":"qcam","product":"saxy","package":"saxy","cpe":"cpe:2.3:a:qcam:saxy:*:*:*:*:*:*:*:*","repo":"https://github.com/qcam/saxy","source":"cvelist"},{"ranges":[{"type":"git","introduced":"7266632e9407842f28ffac254c56dc41210a5690","fixed":"6d12ee12b9e32e86ef598b3f3cafccd1840b2f41","status":"affected"}],"vendor":"qcam","product":"saxy","package":"qcam/saxy","cpe":"cpe:2.3:a:qcam:saxy:*:*:*:*:*:*:*:*","repo":"https://github.com/qcam/saxy","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.7.0","status":"affected","fixed":"1.7.0"}],"ecosystem":"Hex","package":"saxy","purl":"pkg:hex/saxy","source":"eef"},{"ranges":[{"type":"git","introduced":"7266632e9407842f28ffac254c56dc41210a5690","status":"affected","fixed":"6d12ee12b9e32e86ef598b3f3cafccd1840b2f41"}],"repo":"https://github.com/qcam/saxy","source":"eef"}],"references":[{"url":"https://github.com/qcam/saxy/security/advisories/GHSA-mm3m-xwmf-v698","tags":["advisory","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-66293.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-66293","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/qcam/saxy/commit/7266632e9407842f28ffac254c56dc41210a5690","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/qcam/saxy/commit/6d12ee12b9e32e86ef598b3f3cafccd1840b2f41","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/saxy","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF","Cẩm Huỳnh"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-10T17:42:07.677Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-66293","url":"https://www.cve.org/CVERecord?id=CVE-2026-66293","licence":"CVE Terms of Use","modified":"2026-11-19T07:54:15.159Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-66293","url":"https://osv.dev/vulnerability/EEF-CVE-2026-66293","licence":"CC-BY-4.0","modified":"2026-11-25T06:30:11.966Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-66293","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-66293","licence":"Public domain","modified":"2026-11-12T20:07:11.090Z"}],"updatedAt":"2026-11-25T22:59:49.252Z","epss":{"score":0.00212,"percentile":0.12244,"date":"2026-12-02T12:00:21.000Z"}}