XSS in Fabricjs Fabric.js
CVE-2026-44311
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.
Vulnerability class: XSS (Cross-Site Scripting)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 5.4 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N.
EPSS exploit prediction
EPSS: 0.003 (17.6th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 18th percentile — 17.6% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.003 · newest: 0.003 · change: 0.000
Affected products
- Fabricjs Fabric.js — versions < 7.4.0
Weakness classification (CWE)
References
- github.com/fabricjs/fabric.js/security/advisories/GHSA-w22m-hvvm-xmwx (Exploit, Mitigation, Vendor Advisory)
- github.com/fabricjs/fabric.js/releases/tag/v740 (Product, Release Notes)
Frequently asked questions
- What is CVE-2026-44311?
- CVE-2026-44311 is a medium-severity vulnerability in Fabricjs Fabric.js, classified under Cross-site Scripting. CVSS score: 5.4/10. Published 2026-06-22.
- How severe is CVE-2026-44311?
- Medium severity. CVSS v3 base score is 5.4 out of 10.