PT-2026-49055 · Npm+2 · Fabric+1
CVSS v3.1
6.1
Medium
| Vector | AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Name of the Vulnerable Software and Affected Versions
Fabric.js versions prior to 7.4.0
Description
Improper escaping of user-controlled input during SVG serialization via the
toSVG() method can lead to Cross-Site Scripting (XSS). Specifically, the color field within the colorStops array of a fabric.Gradient object is not properly escaped when converted into SVG <stop> elements. This allows an attacker to inject arbitrary HTML or SVG by crafting input that breaks out of the stop-color attribute context. If an application renders the resulting SVG string into the DOM, arbitrary JavaScript can be executed in the victim's browser.Recommendations
Update to version 7.4.0.
Exploit
Fix
XSS
Improper Encoding or Escaping of Output
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Fabric
Fabric-Js