{"id":"CVE-2026-66293","aliases":["EEF-CVE-2026-66293","EUVD-2026-118185","GHSA-7h52-pqgv-pcwc","GHSA-mm3m-xwmf-v698"],"status":"published","title":"XML comment injection in Saxy encoder via unescaped double hyphen","description":"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 --\u003e is escaped or rejected before the encoder wraps the content in the \u003c!-- and --\u003e 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 --\u003e 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.","severity":{"version":"4.0","score":2.1,"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","level":"low","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00168,"percentile":0.06147,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-91"],"published":"2026-11-06T10:16:42Z","modified":"2026-11-08T02:47:40Z","fixes":[{"ecosystem":"Hex","package":"saxy","fixed_in":["1.7.0"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Hex","package":"saxy","ranges":[{"type":"SEMVER","events":[{"introduced":"0.7.0"},{"fixed":"1.7.0"}]}],"versions":["0.10.0","0.7.0","0.8.0","0.9.0","0.9.1","1.0.0","1.1.0","1.2.0","1.2.1","1.2.2","1.3.0","1.4.0","1.5.0","1.6.0","1.6.1"]}],"products":[{"vendor":"qcam","product":"saxy"}],"references":[{"url":"https://github.com/qcam/saxy/security/advisories/GHSA-mm3m-xwmf-v698","tags":["vendor-advisory","related","advisory"]},{"url":"https://cna.erlef.org/cves/CVE-2026-66293.html","tags":["related","web"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-66293","tags":["related","web"]},{"url":"https://github.com/qcam/saxy/commit/7266632e9407842f28ffac254c56dc41210a5690","tags":["related","fix","web"]},{"url":"https://github.com/qcam/saxy/commit/6d12ee12b9e32e86ef598b3f3cafccd1840b2f41","tags":["patch","fix"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-66293","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-7h52-pqgv-pcwc"},{"url":"https://github.com","tags":["web"]},{"url":"https://repo.hex.pm","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/66xxx/CVE-2026-66293.json","tags":["advisory"]},{"url":"https://github.com/qcam/saxy","tags":["package"]},{"url":"https://hex.pm/packages/saxy","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-66293","title":"XML comment injection in Saxy encoder via unescaped double hyphen","description":"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 --\u003e is escaped or rejected before the encoder wraps the content in the \u003c!-- and --\u003e 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 --\u003e 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.","status":"published","published":"2026-11-06T10:16:42.053Z","modified":"2026-11-06T10:16:42.053Z","cvss":[{"version":"4.0","score":2.1,"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","level":"low","assessor":"cna"}],"cwes":["CWE-91"],"updated_at":"2026-11-06T11:27:55.289804Z"}],"euvd":[{"id":"EUVD-2026-118185","description":"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 --\u003e is escaped or rejected before the encoder wraps the content in the \u003c!-- and --\u003e 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 --\u003e 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.","status":"published","published":"2026-11-06T10:16:42Z","modified":"2026-11-06T10:16:42Z","cvss":[{"version":"4.0","score":2.1,"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","level":"low"}],"updated_at":"2026-11-06T15:05:12.272018Z"}],"ghsa":[{"id":"GHSA-7h52-pqgv-pcwc","title":"XML injection in the encoder of Saxy. Saxy.Encoder does not neutralize the -- sequence in XML...","description":"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 --\u003e is escaped or rejected before the encoder wraps the content in the \u003c!-- and --\u003e 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 --\u003e 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.","status":"published","published":"2026-11-06T12:30:45Z","modified":"2026-11-06T12:30:49Z","cvss":[{"version":"4.0","score":2.1,"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/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","level":"low"}],"cwes":["CWE-91"],"updated_at":"2026-11-06T13:00:05.657094Z"}],"nvd":[{"id":"CVE-2026-66293","description":"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 --\u003e is escaped or rejected before the encoder wraps the content in the \u003c!-- and --\u003e 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 --\u003e 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.","status":"published","published":"2026-11-06T11:17:16.057Z","modified":"2026-11-06T11:17:16.057Z","cvss":[{"version":"4.0","score":2.1,"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/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","level":"low","assessor":"secondary"}],"cwes":["CWE-91"],"updated_at":"2026-11-06T14:00:18.43156Z"}],"osv":[{"id":"CVE-2026-66293","title":"XML comment injection in Saxy encoder via unescaped double hyphen","description":"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 --\u003e is escaped or rejected before the encoder wraps the content in the \u003c!-- and --\u003e 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 --\u003e 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.","status":"published","published":"2026-11-06T10:16:42.053Z","modified":"2026-11-08T02:47:40.903460293Z","cvss":[{"version":"4.0","score":2.1,"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","level":"low"}],"cwes":["CWE-91"],"updated_at":"2026-11-08T03:29:52.421856Z"},{"id":"EEF-CVE-2026-66293","title":"XML comment injection in Saxy encoder via unescaped double hyphen","description":"## 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 `--\u003e` is escaped or rejected before the encoder wraps the content in the `\u003c!--` and `--\u003e` 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 `--\u003e` 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.","status":"published","published":"2026-11-06T10:16:42.053Z","modified":"2026-11-06T10:41:07.048263633Z","cvss":[{"version":"4.0","score":2.1,"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","level":"low"}],"cwes":["CWE-91"],"updated_at":"2026-11-06T11:09:15.793785Z"}]}}
