Skip to main content
CVE-2026-27013VulnerabilityPublished

CVE-2026-27013: fabricjs fabric.js · Cross-site Scripting

Affects fabricjs fabric.jsSource CVE Database V5

0

Not known to be exploited · CVSS 7.6 High : upgrade to 7.2.0 soon.

Data as of 25 Oct 2026, 19:02 UTC

CVSS 3.1 base score
7.6High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.3% chance of exploitation in 30 days – higher than 25% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 7.2.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 19 Feb 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.

What to do

Upgrade fabricjs fabric.js to 7.2.0.

Affected software

ProductAffectedFixed in
fabricjsfabric.jsAffected
  • <7.2.0
Fixed in
  • 7.2.0

AI-suggested

To mitigate this vulnerability, organizations should upgrade fabric.js to version 7.2.0 or later, where the issue is fixed by proper escaping of all user-controlled strings during SVG export. Until the upgrade can be applied, developers should implement strict input validation and sanitization on all JSON data accepted via loadFromJSON(), rejecting or sanitizing any suspicious or unexpected content. Additionally, applications should avoid rendering untrusted SVG content inline in browsers or email clients without sanitization. Employ Content Security Policy (CSP) headers to restrict script execution and reduce the impact of potential XSS. Where feasible, disable or restrict features that allow importing or sharing of user-generated JSON data that is later converted to SVG. Regularly audit and monitor application logs for unusual SVG export activity or injection attempts. Educate developers about secure handling of SVG and JSON inputs to prevent similar vulnerabilities. Finally, conduct penetration testing focused on SVG and JSON input vectors to identify residual risks.

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.

References

Community reviews

Loading reviews…