CVE-2025-25977
CRITICALCVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Lifecycle Timeline
4Tags
Description
An issue in canvg v.4.0.2 allows an attacker to execute arbitrary code via the Constructor of the class StyleElement.
Analysis
canvg 4.0.2 is vulnerable to arbitrary code execution through prototype pollution in the StyleElement class constructor. An attacker can exploit this to execute code in environments that process SVG content with canvg. A PoC exists with no patch available.
Technical Context
The constructor of the StyleElement class in canvg does not sanitize properties, enabling prototype pollution (CWE-1321). In Node.js environments, prototype pollution can be chained to achieve remote code execution through polluted properties that influence child_process or similar built-in modules.
Affected Products
canvg 4.0.2
Remediation
Pin canvg to a patched version when available. Validate and sanitize SVG input before processing. Run SVG rendering in an isolated sandbox.
Priority Score
Vendor Status
Share
External POC / Exploit Code
Leaving vuln.today
GHSA-v2mw-5mch-w8c5