CVE-2026-44311: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in fabricjs fabric.js
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.
AI Analysis
Technical Summary
Fabric.js, a JavaScript HTML5 canvas library, has an XSS vulnerability (CWE-79) in versions before 7.4.0. The issue arises from improper neutralization of input during SVG serialization in the toSVG() method. The color field in the colorStops array of fabric.Gradient objects is not properly escaped when converted into SVG <stop> elements, enabling injection of arbitrary HTML/SVG and JavaScript execution if the SVG string is rendered in a web page. This vulnerability is addressed in Fabric.js version 7.4.0.
Potential Impact
An attacker can exploit this vulnerability by crafting malicious input for the colorStops array's color field, leading to injection of arbitrary HTML or SVG code. If the application renders the resulting SVG string into the DOM, this can result in execution of attacker-controlled JavaScript in the victim's browser, potentially leading to information disclosure or other client-side impacts. The CVSS score is 5.4 (medium severity), indicating limited confidentiality and integrity impact with no availability impact.
Mitigation Recommendations
Upgrade Fabric.js to version 7.4.0 or later, where this vulnerability is fixed. There is no indication of alternative mitigations or temporary workarounds. Patch status is confirmed fixed in 7.4.0.
CVE-2026-44311: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in fabricjs fabric.js
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 v3.1
Score 5.4medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Fabric.js, a JavaScript HTML5 canvas library, has an XSS vulnerability (CWE-79) in versions before 7.4.0. The issue arises from improper neutralization of input during SVG serialization in the toSVG() method. The color field in the colorStops array of fabric.Gradient objects is not properly escaped when converted into SVG <stop> elements, enabling injection of arbitrary HTML/SVG and JavaScript execution if the SVG string is rendered in a web page. This vulnerability is addressed in Fabric.js version 7.4.0.
Potential Impact
An attacker can exploit this vulnerability by crafting malicious input for the colorStops array's color field, leading to injection of arbitrary HTML or SVG code. If the application renders the resulting SVG string into the DOM, this can result in execution of attacker-controlled JavaScript in the victim's browser, potentially leading to information disclosure or other client-side impacts. The CVSS score is 5.4 (medium severity), indicating limited confidentiality and integrity impact with no availability impact.
Mitigation Recommendations
Upgrade Fabric.js to version 7.4.0 or later, where this vulnerability is fixed. There is no indication of alternative mitigations or temporary workarounds. Patch status is confirmed fixed in 7.4.0.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-05T19:00:06.021Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a39b299eed863c81e7e85c4
Added to database: 06/22/2026, 22:09:29 UTC
Last enriched: 07/18/2026, 19:27:23 UTC
Last updated: 08/06/2026, 12:41:10 UTC
Views: 70
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.