Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. fabric
  4. ›
  5. CVE-2026-27013

CVE-2026-27013: Fabric.js Affected by Stored XSS via SVG Export

February 18, 2026 (updated February 19, 2026)

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.

References

  • github.com/advisories/GHSA-hfvx-25r5-qc3w
  • github.com/fabricjs/fabric.js
  • github.com/fabricjs/fabric.js/commit/7e1a122defd8feefe4eb7eaf0c180d7b0aeb6fee
  • github.com/fabricjs/fabric.js/releases/tag/v720
  • github.com/fabricjs/fabric.js/security/advisories/GHSA-hfvx-25r5-qc3w
  • nvd.nist.gov/vuln/detail/CVE-2026-27013

Code Behaviors & Features

Detect and mitigate CVE-2026-27013 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 7.2.0

Fixed versions

  • 7.2.0

Solution

Upgrade to version 7.2.0 or above.

Impact 7.6 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-116: Improper Encoding or Escaping of Output
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/fabric/CVE-2026-27013.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:43 +0000.