Security mailing lists by PureSourceCode

GHSA-cf4q-4cqr-7g7w

MEDIUM

SVG with embedded scripts can lead to cross-site scripting attacks in xml2rfc

xml2rfc allows script elements in SVG sources.
In HTML output having these script elements can lead to XSS attacks.

Sample XML snippet:

<artwork 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">
</artwork>
Impact

This vulnerability impacts website that publish HTML drafts and RFCs.

Patches

This has been fixed in version 3.12.4.

Workarounds

If SVG source is self-contained within the XML, scraping script elements from SVG files.

References
For more information

If you have any questions or comments about this advisory:

Published
22 Apr 2022
Last modified
5 Dec 2024
Weakness
CWE-79
Sources
OSVJSON

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV PyPI xml2rfc < 3.12.4 3.12.4

References

History

  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 22 Apr 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.