CVE-2026-27013

High

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.

SeverityHigh
CVSS7.6
Exploit probability—
ProductFabricjs Fabric.js
PublishedFeb 19, 2026
First seenFeb 19, 2026

How to fix

Update
  • fabricjs fabric.js7.2.0 or later
  • fabric7.2.0 or later

Affected products

ProductAffected versionsFixed in
fabricjs fabric.jsv < 7.2.07.2.0
fabricnpmv < 7.2.07.2.0

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.