Skip to main content

Fabric.js CVE-2026-144577

| EUVDEUVD-2026-143870 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-12-04 VulnCheck GHSA-655x-r27w-c958
5.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft canvas JSON with string width/height
  2. Delivery
    Submit to Fabric.js app via loadFromJSON
  3. Exploit
    Break out of toSVG() dimension attributes
  4. Execution
    Inject onload handler or script element
  5. Persist
    Victim opens exported SVG
  6. Impact
    Script executes in victim browser context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a consuming application that (1) deserializes attacker-influenced canvas JSON via Fabric.js loadFromJSON (or equivalent object import) accepting string width and height values, (2) exports that canvas to SVG via toSVG(), which writes the width, height, and viewBox attributes without escaping, and (3) serves or renders the resulting SVG to a victim in a context where SVG scripting executes. The attack is limited by passive user interaction (UI:P - a victim must open/view the malicious SVG) and by application design: deployments that never pass untrusted JSON into SVG export, or that sanitize/serve SVG as non-executable (e.g. Content-Disposition attachment or img-only rendering), are not realistically exploitable. Authentication is not required of the attacker per PR:N, but whether untrusted JSON can be submitted depends on the specific application.

Impact

This is a moderate, context-dependent XSS (CWE-79) rather than a drop-everything priority. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P, score 5.3) shows network reach with no privileges and low complexity, but passive user interaction (UI:P) is required - a victim must view the exported SVG - and both the vulnerable and subsequent-system impacts are only Low (VC:L/VI:L/SC:L/SI:L, no availability impact). No EPSS score was provided, the CVE is not listed in CISA KEV, and no proof-of-concept or working exploit code is indicated in the input. The vuln.today decision label is 'this_month', which aligns with a real-but-not-urgent issue: worth remediating on a normal patch cycle, not an emergency. The signals are internally consistent - there is no network-vs-local contradiction and no KEV/EPSS conflict to flag - so the main caveat is simply that exploitability hinges on application design (see exploitation_conditions), meaning raw CVSS likely overstates risk for deployments that never feed untrusted canvas JSON into SVG export.

Exploit ScenarioDerived

An application built on Fabric.js lets users import or share canvas documents as JSON and later renders or exports them to SVG. An attacker submits crafted canvas JSON whose width and height are strings that close the unescaped width/height/viewBox attributes emitted by toSVG() and append an onload handler or <script>, so that when another user opens the exported SVG the injected script executes in their browser. No public exploit code is identified in the input, though VulnCheck's advisory and the vulnerable StaticCanvas.ts source lines are referenced.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Dec 04, 2026

Cross-site scripting in Fabric.js through 7.4.0 lets attackers inject markup into exported SVG by supplying crafted canvas JSON with string-valued width and height properties, which toSVG() writes into the SVG width, height and viewBox attributes without escaping. The issue is context-dependent rather than a drop-everything priority: exploitation requires a consuming application that deserializes attacker-influenced JSON through loadFromJSON, exports that canvas to SVG, and then serves or renders the result where SVG scripting executes, plus a victim who views the output (UI:P, PR:N). No public exploit code was identified at time of analysis and the vulnerability is not confirmed as actively exploited (CISA KEV); the assigned CVSS 4.0 score is 5.3 with the independent assessment at CVSS 3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.

RemediationAI

No vendor-released patch identified at time of analysis - the available references point to the affected code in the v7.4.0 source tree rather than to a fixed release, so track the VulnCheck advisory at https://www.vulncheck.com/advisories/fabric-js-through-7.4.0-xss-in-svg-export-via-loadfromjson-canvas-dimensions and the upstream Fabric.js repository for an update that escapes or numerically coerces width, height and viewBox in toSVG(). Until then, address it at the application layer in line with the assessed exploitation conditions: do not pass untrusted or attacker-influenced JSON into loadFromJSON when the canvas will subsequently be exported with toSVG(), and if untrusted JSON must be accepted, coerce or reject non-numeric width and height values before import (trade-off: legitimate canvases that rely on unit-suffixed or percentage dimensions will need normalization). Sanitize the generated SVG before storage or delivery, or serve it in a non-executable context such as Content-Disposition: attachment or rendering only through an img element (trade-off: those delivery modes remove interactive SVG behavior a consuming feature may depend on). Deployments that never deserialize untrusted canvas JSON or that never serve the exported SVG in a scripting-capable context are not realistically exploitable and can prioritize accordingly.

Affected VersionsENISA

fabric.js 0 ≤7.4.0

Affected Packages

euvd fabric_js no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Fabric.js is a JavaScript canvas library used to build interactive design and graphics editors; its serialization layer (loadFromJSON and related object import routines) reconstructs canvas and object state from arbitrary JSON, and StaticCanvas.toSVG() serializes that state back out as SVG markup. The root cause is CWE-79 (improper neutralization of input during web page generation): the exported SVG string is assembled by concatenating the canvas width, height and viewBox values directly into attribute position without escaping or numeric validation, so a string such as a quote-terminated value can break out of the attribute and introduce onload handlers or script elements. The relevant serialization code lives in src/canvas/StaticCanvas.ts (approximately lines 995-1025 and 1251-1276 in the v7.4.0 tree), which the advisory references directly. Because the payload persists in the generated SVG artifact rather than in the JSON alone, the impact materializes only at render time, in whatever security context the SVG is later served or embedded. The assessed vector (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) reflects that the attacker needs no credentials, the flaw is trivially triggered once reachable, scope changes because the malicious SVG may execute in the origin serving it, but confidentiality and integrity impact are low and availability impact is none.

Know when Fabric Js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
vuln.today AI 6.1 MEDIUM

Network-reachable injection with no attacker privileges but required victim interaction (UI:R); script runs in the victim's browser, a scope change (S:C) with low confidentiality/integrity impact and no availability effect.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

DescriptionCVE.org

Fabric.js through 7.4.0 contains a cross-site scripting vulnerability that allows attackers to inject markup into exported SVG by supplying crafted canvas JSON with string width and height values. Attackers can close the unescaped width, height, or viewBox attributes written by toSVG() and inject onload handlers or script elements that execute when users view the SVG.

Threat Intelligence Overview

EPSS Score
0.5%
Top 53% exploitable
Prevalence
Medium
popular JavaScript canvas library, common in web-based editors and design tools
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.5%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy