{"id":"CVE-2026-27013","state":"PUBLISHED","title":"Fabric.js Affected by Stored XSS via SVG Export","description":"Fabric.js is a Javascript HTML5 canvas library. Prior to version 7.2.0, Fabric.js applies `escapeXml()` to text content during SVG export (`src/shapes/Text/TextSVGExportMixin.ts:186`) but fails to apply it to other user-controlled string values that are interpolated into SVG attribute markup. When attacker-controlled JSON is loaded via `loadFromJSON()` and later exported via `toSVG()`, the unescaped values break out of XML attributes and inject arbitrary SVG elements including event handlers. Any application that accepts user-supplied JSON (via `loadFromJSON()`, collaborative sharing, import features, CMS plugins) and renders the `toSVG()` output in a browser context (SVG preview, export download rendered in-page, email template, embed) is vulnerable to stored XSS. An attacker can execute arbitrary JavaScript in the victim's browser session. Version 7.2.0 contains a fix.","publishedAt":"2026-02-19T19:38:19.711Z","updatedAt":"2026-02-19T21:21:59.208Z","severity":{"score":7.6,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L","source":"GitHub_M"},"assigner":"GitHub_M","products":["fabricjs fabric.js"],"affected":[{"vendor":"fabricjs","product":"fabric.js","versions":[{"version":"< 7.2.0","status":"affected"}]}],"references":["https://github.com/fabricjs/fabric.js/security/advisories/GHSA-hfvx-25r5-qc3w","https://github.com/fabricjs/fabric.js/commit/7e1a122defd8feefe4eb7eaf0c180d7b0aeb6fee","https://github.com/fabricjs/fabric.js/releases/tag/v720"],"weaknesses":["CWE-79","CWE-116"],"ingestedAt":"2026-10-29T20:11:31.369Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/27xxx/CVE-2026-27013.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-27013","state":"PUBLISHED","datePublished":"2026-02-19T19:38:19.711Z","dateUpdated":"2026-02-19T21:21:59.208Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-02-17T03:08:23.490Z"},"containers":{"cna":{"title":"Fabric.js Affected by Stored XSS via SVG Export","descriptions":[{"lang":"en","value":"Fabric.js is a Javascript HTML5 canvas library. Prior to version 7.2.0, Fabric.js applies `escapeXml()` to text content during SVG export (`src/shapes/Text/TextSVGExportMixin.ts:186`) but fails to apply it to other user-controlled string values that are interpolated into SVG attribute markup. When attacker-controlled JSON is loaded via `loadFromJSON()` and later exported via `toSVG()`, the unescaped values break out of XML attributes and inject arbitrary SVG elements including event handlers. Any application that accepts user-supplied JSON (via `loadFromJSON()`, collaborative sharing, import features, CMS plugins) and renders the `toSVG()` output in a browser context (SVG preview, export download rendered in-page, email template, embed) is vulnerable to stored XSS. An attacker can execute arbitrary JavaScript in the victim's browser session. Version 7.2.0 contains a fix."}],"affected":[{"vendor":"fabricjs","product":"fabric.js","versions":[{"version":"< 7.2.0","status":"affected"}]}],"references":[{"url":"https://github.com/fabricjs/fabric.js/security/advisories/GHSA-hfvx-25r5-qc3w","name":"https://github.com/fabricjs/fabric.js/security/advisories/GHSA-hfvx-25r5-qc3w","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/fabricjs/fabric.js/commit/7e1a122defd8feefe4eb7eaf0c180d7b0aeb6fee","name":"https://github.com/fabricjs/fabric.js/commit/7e1a122defd8feefe4eb7eaf0c180d7b0aeb6fee","tags":["x_refsource_MISC"]},{"url":"https://github.com/fabricjs/fabric.js/releases/tag/v720","name":"https://github.com/fabricjs/fabric.js/releases/tag/v720","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":7.6,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-79","lang":"en","description":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-116","lang":"en","description":"CWE-116: Improper Encoding or Escaping of Output","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-02-19T19:38:19.711Z"},"source":{"advisory":"GHSA-hfvx-25r5-qc3w","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-02-19T20:54:40.361805Z","id":"CVE-2026-27013","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-02-19T21:21:59.208Z"}}]}}}