CVE-2026-144577: Fabric.js through 7.4.0 XSS in SVG Export via loadFromJSON Canvas Dimensions

Published Dec 4, 2026
·
Updated

Fabric.js through 7.4.0 contains a cross-site scripting vulnerability that allows attackers to inject markup into exported SVG by supplying crafted canvas JSON with string width and height values. Attackers can close the unescaped width, height, or viewBox attributes written by toSVG() and inject onload handlers or script elements that execute when users view the SVG.

Affected Software

1 affected component
npm/fabric<=7.4.0

Event History

Dec 4, 2026
CVE Published
via MITRE·01:09 AM
Data Sourced
via MITRE·01:09 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What application workflows are exposed?

Workflows that accept attacker-controlled canvas JSON and then call toSVG() are exposed, because crafted string width or height values can inject markup into the exported SVG. The payload executes when someone views the resulting SVG.

2

Does exploitation require authentication or user interaction?

The supplied vector indicates no privileges are required and network delivery is possible. Exploitation requires a user to view the malicious exported SVG.

3

What input should be treated as untrusted?

Treat canvas JSON passed to loadFromJSON as untrusted, particularly width and height values. These values can break out of SVG width, height, or viewBox attributes during export.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203