{"id":"GHSA-cf4q-4cqr-7g7w","aliases":[],"status":"published","title":"SVG with embedded scripts can lead to cross-site scripting attacks in xml2rfc","description":"xml2rfc allows `script` elements in SVG sources.\nIn HTML output having these script elements can lead to XSS attacks.\n\nSample XML snippet:\n```\n\u003cartwork type=\"svg\" src=\"data:image/svg+xml,%3Csvg viewBox='0 0 10 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cscript%3E window.alert('Test Alert'); %3C/script%3E%3C/svg%3E\"\u003e\n\u003c/artwork\u003e\n```\n\n### Impact\nThis vulnerability impacts website that publish HTML drafts and RFCs.\n\n### Patches\nThis has been fixed in version [3.12.4](https://github.com/ietf-tools/xml2rfc/releases/tag/v3.12.4).\n\n### Workarounds\nIf SVG source is self-contained within the XML, scraping `script` elements from SVG files.\n\n### References\n* https://developer.mozilla.org/en-US/docs/Web/SVG/Element/script\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [xml2rfc](https://github.com/ietf-tools/xml2rfc/)\n* Email us at [operational-vulnerability@ietf.org](mailto:operational-vulnerability@ietf.org)\n* [Infrastructure and Services Vulnerability Disclosure](https://www.ietf.org/about/administration/policies-procedures/vulnerability-disclosure/)","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2022-04-22T20:25:53Z","modified":"2024-12-05T05:42:31Z","fixes":[{"ecosystem":"PyPI","package":"xml2rfc","fixed_in":["3.12.4"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"xml2rfc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.12.4"}]}]},{"source":"osv","ecosystem":"PyPI","package":"xml2rfc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.12.4"}]}],"versions":["2.10.0","2.10.1","2.10.2","2.10.3","2.11.0","2.11.1","2.12.0","2.12.1","2.12.2","2.12.3","2.13.0","2.13.1","2.14.0","2.14.1","2.15.0","2.15.1","2.15.2","2.15.3","2.15.4","2.15.5","2.16.0","2.16.1","2.16.2","2.16.3","2.17.0","2.17.1","2.17.2","2.18.0","2.19.0","2.19.1","2.2.5","2.2.7","2.20.0","2.20.1","2.21.0","2.21.1","2.22.0","2.22.1","2.22.2","2.22.3","2.23.0","2.23.1","2.24.0","2.25.0","2.26.0","2.27.0","2.27.1","2.28.0","2.29.0","2.29.1","2.3.0","2.3.1","2.3.10","2.3.11","2.3.11.1","2.3.11.2","2.3.11.3","2.3.2","2.3.3","2.3.4","2.3.5","2.3.6","2.3.7","2.3.8","2.3.9","2.30.0","2.31.0","2.32.0","2.33.0","2.34.0","2.35.0","2.36.0","2.37.0","2.37.1","2.37.2","2.37.3","2.38.0","2.38.1","2.39.0","2.4.0","2.4.1","2.4.10","2.4.10.dev0","2.4.11","2.4.12","2.4.2","2.4.3","2.4.4","2.4.5","2.4.6","2.4.7","2.4.8","2.4.9","2.40.0","2.40.1","2.41.0","2.42.0","2.43.0","2.44.0","2.45.0","2.45.1","2.45.2","2.45.3","2.46.0","2.47.0","2.5.0","2.5.1","2.5.2","2.5.3.dev0","2.6.0","2.6.1","2.6.2","2.7.0","2.8.0","2.8.1","2.8.2","2.8.3","2.8.4","2.8.5","2.9.0","2.9.1","2.9.2","2.9.3","2.9.4","2.9.5","2.9.6","2.9.7","2.9.8","2.9.9","3.0.0","3.1.0","3.1.1","3.10.0","3.11.0","3.11.1","3.12.0","3.12.1","3.12.2","3.12.3","3.2.0","3.2.1","3.3.0","3.4.0","3.5.0","3.6.0","3.7.0","3.8.0","3.9.0","3.9.1"]}],"references":[{"url":"https://github.com/ietf-tools/xml2rfc/security/advisories/GHSA-cf4q-4cqr-7g7w","tags":["web"]},{"url":"https://github.com/advisories/GHSA-cf4q-4cqr-7g7w"},{"url":"https://github.com/ietf-tools/xml2rfc","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-cf4q-4cqr-7g7w","title":"SVG with embedded scripts can lead to cross-site scripting attacks in xml2rfc","description":"xml2rfc allows `script` elements in SVG sources.\nIn HTML output having these script elements can lead to XSS attacks.\n\nSample XML snippet:\n```\n\u003cartwork type=\"svg\" src=\"data:image/svg+xml,%3Csvg viewBox='0 0 10 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cscript%3E window.alert('Test Alert'); %3C/script%3E%3C/svg%3E\"\u003e\n\u003c/artwork\u003e\n```\n\n### Impact\nThis vulnerability impacts website that publish HTML drafts and RFCs.\n\n### Patches\nThis has been fixed in version [3.12.4](https://github.com/ietf-tools/xml2rfc/releases/tag/v3.12.4).\n\n### Workarounds\nIf SVG source is self-contained within the XML, scraping `script` elements from SVG files.\n\n### References\n* https://developer.mozilla.org/en-US/docs/Web/SVG/Element/script\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [xml2rfc](https://github.com/ietf-tools/xml2rfc/)\n* Email us at [operational-vulnerability@ietf.org](mailto:operational-vulnerability@ietf.org)\n* [Infrastructure and Services Vulnerability Disclosure](https://www.ietf.org/about/administration/policies-procedures/vulnerability-disclosure/)\n","status":"published","published":"2022-04-22T20:25:53Z","modified":"2023-01-11T05:07:00Z","cwes":["CWE-79"],"updated_at":"2026-11-02T14:36:13.23016Z"}],"osv":[{"id":"GHSA-cf4q-4cqr-7g7w","title":"SVG with embedded scripts can lead to cross-site scripting attacks in xml2rfc","description":"xml2rfc allows `script` elements in SVG sources.\nIn HTML output having these script elements can lead to XSS attacks.\n\nSample XML snippet:\n```\n\u003cartwork type=\"svg\" src=\"data:image/svg+xml,%3Csvg viewBox='0 0 10 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cscript%3E window.alert('Test Alert'); %3C/script%3E%3C/svg%3E\"\u003e\n\u003c/artwork\u003e\n```\n\n### Impact\nThis vulnerability impacts website that publish HTML drafts and RFCs.\n\n### Patches\nThis has been fixed in version [3.12.4](https://github.com/ietf-tools/xml2rfc/releases/tag/v3.12.4).\n\n### Workarounds\nIf SVG source is self-contained within the XML, scraping `script` elements from SVG files.\n\n### References\n* https://developer.mozilla.org/en-US/docs/Web/SVG/Element/script\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [xml2rfc](https://github.com/ietf-tools/xml2rfc/)\n* Email us at [operational-vulnerability@ietf.org](mailto:operational-vulnerability@ietf.org)\n* [Infrastructure and Services Vulnerability Disclosure](https://www.ietf.org/about/administration/policies-procedures/vulnerability-disclosure/)\n","status":"published","published":"2022-04-22T20:25:53Z","modified":"2024-12-05T05:42:31.021439Z","cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:44.927642Z"}]}}
