{"id":"CVE-2026-44311","revision":"d56ce0dac09f4d3ca35e3236d92c1761","records":[{"revision":"d56ce0dac09f4d3ca35e3236d92c1761","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-44311","aliases":[],"title":"Fabric.js: Improper escaping in fabric.Gradient colorStops leads to XSS in SVG serialization","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.","state":0,"publishedAt":"2026-06-22T20:50:56.69+00:00","modifiedAt":"2026-06-23T16:13:58.645+00:00","affected":[{"ecosystem":"Vendor product","name":"fabric.js","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"fabricjs\",\n                    \"product\": \"fabric.js\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 7.4.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","score":5.4,"severity":"MEDIUM"}],"references":["https://github.com/fabricjs/fabric.js/security/advisories/GHSA-w22m-hvvm-xmwx","https://github.com/fabricjs/fabric.js/releases/tag/v740"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-44311","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-44311","identifiers":["CVE-2026-44311"]},"retained":false,"historicalAffected":[]}],"coverage":[]}