Security Resilience

CVE-2026-27013

XSS in Fabricjs Fabric.Js ≤ 7.2.0

Public PoCXSS
Published
19 February 2026
Modified
23 February 2026
Patch / advisory
CVSS Score v3.1 7.6
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L
EPSS Score 0.0044 37th percentile
Risk Priority 57 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2026-27013 is a high-severity Cross-site Scripting (CWE-79) vulnerability in Fabricjs Fabric.Js. Its CVSS base score is 7.6 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Browser Session Hijacking (T1185); ranked at the 37th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2026-27013 is a stored cross-site scripting (XSS) vulnerability in Fabric.js, a JavaScript HTML5 canvas library, affecting versions prior to 7.2.0. The issue arises during SVG export in the `TextSVGExportMixin.ts` file, where the library applies `escapeXml()` to text content but neglects to escape other user-controlled string values interpolated into SVG attribute markup. This allows unescaped values from attacker-controlled JSON, loaded via `loadFromJSON()`, to break out of XML attributes when exported via `toSVG()`, injecting arbitrary SVG elements including event handlers. The vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation) and CWE-116 (Improper Encoding or Escaping of Output), with a CVSS v3.1 base score of 7.6 (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L).

Any unauthenticated attacker (PR:N) with network access (AV:N) can exploit this by supplying malicious JSON to applications that load it via `loadFromJSON()`—such as those supporting collaborative sharing, import features, or CMS plugins—and then render the resulting `toSVG()` output in a browser context, including SVG previews, in-page export downloads, email templates, or embeds. Exploitation requires user interaction (UI:R) from a victim viewing the rendered SVG, enabling arbitrary JavaScript execution in the victim's browser session and achieving high confidentiality impact alongside limited integrity and availability effects.

Mitigation is available in Fabric.js version 7.2.0, which addresses the improper escaping. The Fabric.js GitHub security advisory (GHSA-hfvx-25r5-qc3w) details the issue, while the fix is implemented in commit 7e1a122defd8feefe4eb7eaf0c180d7b0aeb6fee and released in tag v7.2.0. Security practitioners should upgrade affected applications to this version and review any user-supplied JSON handling paired with SVG rendering.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1185 Browser Session Hijacking Collection
Adversaries may take advantage of security vulnerabilities and inherent functionality in browser software to change content, modify user-behaviors, and intercept information as part of various browser session hijacking techniques.
T1539 Steal Web Session Cookie Credential Access
An adversary may steal web application or service session cookies and use them to gain access to web applications or Internet services as an authenticated user without needing credentials.
T1189 Drive-by Compromise Initial Access
Adversaries may gain access to a system through a user visiting a website over the normal course of browsing.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1204.001 Malicious Link Execution
An adversary may rely upon a user clicking a malicious link in order to gain execution.
T1491.002 External Defacement Impact
An adversary may deface systems external to an organization in an attempt to deliver messaging, intimidate, or otherwise mislead an organization or users.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-44311Same product: Fabricjs Fabric.Js
CVE-2026-106107Shared CWE-116, CWE-79
CVE-2026-25543Shared CWE-116, CWE-79
CVE-2026-27469Shared CWE-116, CWE-79
CVE-2026-107845Shared CWE-116, CWE-79
CVE-2026-24127Shared CWE-116, CWE-79
CVE-2026-35208Shared CWE-116, CWE-79
CVE-2023-6005Shared CWE-116, CWE-79
CVE-2026-23630Shared CWE-116, CWE-79
CVE-2026-25932Shared CWE-116, CWE-79

Affected Assets

fabricjs
fabric.js
≤ 7.2.0

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)

—

Validate
Prove the fix (OWASP ASVS)
  • V1.1.2
  • V1.3.2

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and evaluation can discover missing or incorrect input neutralization through targeted web-application tests.

Input validation directly enforces neutralization of untrusted data before it reaches web output generation.

Output filtering can catch or sanitize unneutralized script content before it is served to users.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
blocks

Secure SDLC practices directly target introduction of XSS via coding standards/testing (mostly), yet the single broad outcome leaves many specific neutralization vectors unaddressed (partial).

PR.PS-02 partial match
blocks

Patching and EOL replacement can remediate known XSS instances in libraries or frameworks (partial) but do nothing to enforce input neutralization in application code (none).

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Secure-coding testing and automated code-analysis tools are applied to detect improper neutralization of script-related content during web-page generation.

prevents

Secure-coding standards, SAST scans and removal of insecure code samples together eliminate the failure to neutralize script content that produces cross-site scripting flaws.

Hardening callouts derived

DISA STIG baselines are authored against specific weaknesses. Where this CVE cites a broad weakness class, the mapping is not asserted at that abstraction (owner ruling, 2026-09-25: grade only at Base and below), so no rule is shown here rather than a rule shown against the wrong grain.

  • No fine-grained STIG row for CWE-116, a class-level weakness, and none of its children carries one either.

References