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

Source: https://aplosec.si/cve/CVE-2026-144577/

[AploSec](https://aplosec.si/) / [Disclosures](https://aplosec.si/disclosures/) / CVE-2026-144577

Medium 5.3 · Reported · No fix listed · CWE-79 · npm

# Fabric.js through 7.4.0 XSS in SVG Export via loadFromJSON Canvas Dimensions

CVE-2026-144577 · published 2026-12-04

In plain words: this type of bug lets someone run scripts in another person's browser (cross-site scripting, XSS). No fixed release is listed yet.

## Summary

CVE-2026-144577 affects Fabric.js (npm) <= 7.4.0: XSS in SVG Export via loadFromJSON Canvas Dimensions (CWE-79). No fixed release is listed. CVSS 4.0 base score 5.3 (Medium), assigned by VulnCheck. Published 2026-12-04 by VulnCheck. Credit: Zachariah Mithani (AploSec).

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.

## Evidence

Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.

## Remediation

No fixed release is listed in the advisory. Check the references for upstream status.

## References

- [VulnCheck advisoryhttps://www.vulncheck.com/advisories/fabric-js-through-7.4.0-xss-in-svg-export-via-loadfromjson-canvas-dimensions](https://www.vulncheck.com/advisories/fabric-js-through-7.4.0-xss-in-svg-export-via-loadfromjson-canvas-dimensions)

- [Vulnerable codehttps://github.com/fabricjs/fabric.js/blob/v740/src/canvas/StaticCanvas.ts#L995-L1025](https://github.com/fabricjs/fabric.js/blob/v740/src/canvas/StaticCanvas.ts#L995-L1025)

- [Vulnerable codehttps://github.com/fabricjs/fabric.js/blob/v740/src/canvas/StaticCanvas.ts#L1251-L1276](https://github.com/fabricjs/fabric.js/blob/v740/src/canvas/StaticCanvas.ts#L1251-L1276)

- [CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-144577](https://www.cve.org/CVERecord?id=CVE-2026-144577)

**Severity:** Medium 5.3 CVSS 4.0, scored by VulnCheck in the [CVE record](https://www.cve.org/CVERecord?id=CVE-2026-144577)

**Package:** Fabric.js

**Ecosystem:** npm

**Affected:** <= 7.4.0

**Fixed:** None

**Weakness:** CWE-79

**CNA:** VulnCheck

**Credit:** Zachariah Mithani (AploSec) finder
