Cross-site scripting in Fabric.js SVG export via loadFromJSON
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- No fix listed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-79.
Summary
Fabric.js through 7.4.0 contains a cross-site scripting flaw in its SVG export. Crafted canvas JSON with string width and height values can break out of the attributes written by toSVG() (CWE-79) and inject onload handlers or script elements. An unauthenticated remote attacker needs a victim to interact with the exported SVG, such as opening it in a browser, for the injected script to run.
Written with Claude Haiku 5.5 from the sources below · 2026-12-04
Description from the CNA
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
The sources list no fixed version for fabric.js.
Written with Claude Haiku 5.5 from the sources below · 2026-12-04
Timeline
- 2026-12-04 Threatist record created from CVE-2026-144577
- 2026-12-04 Alias added: GHSA-655x-r27w-c958
References
More fabricjs vulnerabilities
- TI-2026-32279 Fabric.js: Improper escaping in fabric.Gradient colorStops leads to XSS in SVG serialization CVSS 3.1MEDIUM 6.1
- TI-2026-21487 Fabric.js Affected by Stored XSS via SVG Export CVSS 3.1HIGH 7.6
- TI-2026-15879 Server-side request forgery in fabricjs Fabric.js CVSS 3.0MEDIUM 4.0
Sources
- CVE-2026-144577 · CVE Program
- CVE-2026-144577 · NVD
- GHSA-655x-r27w-c958 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences