{"id":"CVE-2026-44311","published":"2026-06-22T20:50:56Z","modified":"2026-06-23T16:13:58Z","title":"Fabric.js: Improper escaping in fabric.Gradient colorStops leads to XSS in SVG serialization","vendor":"fabricjs","product":"fabric.js","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.4,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00271,"percentile":0.12325,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"references":[{"url":"https://github.com/fabricjs/fabric.js/security/advisories/GHSA-w22m-hvvm-xmwx","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/fabricjs/fabric.js/releases/tag/v740","tags":["x_refsource_MISC"]}],"priority":{"score":6.2,"factors":[{"name":"EPSS percentile","points":2.46},{"name":"CVSS severity","points":3.78}]},"vendorSlug":"fabricjs","affectedVersions":[{"vendor":"fabricjs","product":"fabric.js","versions":["< 7.4.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-06-23T16:13:31.986414Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"fabric","vulnerableRanges":["<7.4.0"],"patched":["7.4.0"],"from":["GHSA-w22m-hvvm-xmwx"],"provenance":"source"}],"summary":{"text":"Fabric.js, a JavaScript HTML5 canvas library, has improper escaping of the color field in the colorStops array of fabric.Gradient objects when they are serialized to SVG via the toSVG() method. An attacker can inject arbitrary HTML/SVG and execute JavaScript in a victim's browser, but only where the application renders the generated SVG string into the DOM and the victim interacts with the page, with no authentication needed and network access sufficient.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:13:50Z"},"euvd":{"id":"EUVD-2026-38399","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-27013","published":"2026-02-19","fixed":"7.2.0","kev":false,"link":{"from":"CVE-2026-27013","to":"CVE-2026-44311","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:fabric","fromFixed":"7.2.0","toFixed":"7.4.0","daysApart":123},{"kind":"similar","provenance":"machine","score":0.42,"basis":"same product + CWE + description similarity"}]}},{"cve":"CVE-2026-44311","published":"2026-06-22","fixed":"7.4.0","kev":false}],"package":"npm:fabric"}}