CVE-2026-44311
MEDIUM 6.1CVSS 3.1Fabric.js improper escaping in fabric.Gradient colorStops leads to XSS in SVG serialization
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.
- Published
- 22 Jun 2026
- Last modified
- 25 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-116CWE-79
- Also known as
- GHSA-w22m-hvvm-xmwx
- Sources
- NVDJSONOSV GHSA-w22m-hvvm-xmwxJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | fabricjs | fabric.jscpe:2.3:a:fabricjs:fabric.js:*:*:*:*:*:node.js:*:* |
< 7.4.0 | 7.4.0 |
| OSV | npm | fabric | < 7.4.0 | 7.4.0 |
References
- https://github.com/fabricjs/fabric.js/releases/tag/v740 · Product, Release Notes, WEB
- https://github.com/fabricjs/fabric.js/security/advisories/GHSA-w22m-hvvm-xmwx · Exploit, Mitigation, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-44311 · ADVISORY
- https://github.com/fabricjs/fabric.js · PACKAGE
History
- 25 Nov 2026 21:03 UTC · NVD: first stored (published 22 Jun 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 12 Jun 2026)