Medium severity · published Jun 22, 2026
CVE-2026-44311
Fabric.js: Improper escaping in fabric.Gradient colorStops leads to XSS in SVG serialization
6.1
CVSS
0.3%
EPSS
No
On KEV
Description
Fabric.js is a Javascript HTML5 canvas library. Prior to 7.4.0, a potential Cross-Site Scripting (XSS) vulnerability exists in Fabric.js due to improper escaping of user-controlled input during SVG serialization via the toSVG() method. Specifically, the color field within the colorStops array of a fabric.Gradient object is not properly escaped when converted into SVG <stop> elements. If an application renders the generated SVG string into the DOM, this may allow an attacker to inject arbitrary HTML/SVG and execute JavaScript in the victim's browser. This vulnerability is fixed in 7.4.0.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
Low
Integrity
Low
Availability
None
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.3% · higher than 20% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
FA
fabric.js · fabricjs
< 7.4.0 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-44311
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-44311
Product
https://github.com/fabricjs/fabric.js/releases/tag/v740
Exploit
https://github.com/fabricjs/fabric.js/security/advisories/GHSA-w22m-hvvm-xmwx
More from fabric.js
6.1
CVE-2026-27013
Fabric.js Affected by Stored XSS via SVG Export
