cvelo
P3 · MediumCVSS 6.1

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

  • CVE-2026-144577
  • GHSA-655x-r27w-c958
  • EUVD-2026-143870

Summary

Fabric.js through version 7.4.0 contains a cross-site scripting flaw in its SVG export. When canvas JSON loaded through loadFromJSON supplies string width and height values, toSVG() writes them into the output without escaping. An attacker can close the attribute and inject onload handlers or script elements, which run when a user views the exported SVG. The record gives a CVSS score of 6.1 and does not list the issue in the CISA known exploited catalog. Teams using Fabric.js to load untrusted canvas JSON or to publish exported SVGs should review their exposure and plan an upgrade or input validation.

AI summary · verify against the vendor advisory

Description

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.

Text from the CVE.org record.

Recommendation

No source states a fixed version. Check the vendor advisory.

Affected

  • fabricjs fabric.js

    Affected versionsFixed in
    up to 7.4.0none stated

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.