{"answers":{"affected":"2 open source packages ship an affected version, including xml2rfc.","exploited":"There is no known exploitation of GHSA-cf4q-4cqr-7g7w in the wild and no public exploit code.","fix":"Upgrade xml2rfc to 3.12.4 or later.","what":"GHSA-cf4q-4cqr-7g7w is a cross-site scripting vulnerability in xml2rfc, published on 22 Apr 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-cf4q-4cqr-7g7w and fix it if it is affected.\n\nWhat it is: GHSA-cf4q-4cqr-7g7w is a cross-site scripting vulnerability in xml2rfc, published on 22 Apr 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-cf4q-4cqr-7g7w in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- xml2rfc (PyPI): affected all versions; fixed in 3.12.4\n- xml2rfc (PyPI): affected all versions; fixed in 3.12.4\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-cf4q-4cqr-7g7w/ (Markdown: https://insights.sbomify.com/GHSA-cf4q-4cqr-7g7w/index.md)","id":"GHSA-cf4q-4cqr-7g7w","markdown":"https://insights.sbomify.com/GHSA-cf4q-4cqr-7g7w/index.md","name":"GHSA-cf4q-4cqr-7g7w","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Python XML to RFC tool","requires_auth":"none","summary":"Attackers can inject malicious scripts via SVG elements in xml2rfc, leading to cross-site scripting attacks on published HTML documents.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"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/)","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"SVG with embedded scripts can lead to cross-site scripting attacks in xml2rfc","id":"GHSA-cf4q-4cqr-7g7w","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xss","year":"2022"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["3.12.4"],"introduced":["0"],"last_affected":[],"package":"xml2rfc","purl":null,"source":"GHSA-cf4q-4cqr-7g7w"},{"ecosystem":"PyPI","fixed":["3.12.4"],"introduced":["0"],"last_affected":[],"package":"xml2rfc","purl":"pkg:pypi/xml2rfc","source":"GHSA-cf4q-4cqr-7g7w"}],"products":null,"published":"2022-04-22","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can inject malicious scripts via SVG elements in xml2rfc, leading to cross-site scripting attacks on published HTML documents.","url":"https://insights.sbomify.com/GHSA-cf4q-4cqr-7g7w/"}