Skip to main content

@scalar/typebox CVE-2026-133309

| EUVDEUVD-2026-130387 HIGH
Code Injection (CWE-94)
2026-11-19 VulnCheck GHSA-79vm-p7cq-37v7
8.5
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Supply crafted string into untrusted schema value
  2. Delivery
    Value embedded via Type.String format/Literal/Kind/property key
  3. Exploit
    TypeCompiler.Compile() emits unescaped JavaScript
  4. Execution
    new Function() evaluates during Compile()/Check()
  5. Impact
    Arbitrary code executes in host Node.js process

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

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

Exploitation Conditions

Exploitation is not possible against a default library installation alone - the application must (1) load an attacker-controllable value from disk or network, (2) pass that value into a parameterized Type.* constructor as a string 'format', a Kind name, a property key, or a Literal value, and (3) compile the resulting schema with the 0.x TypeCompiler.Compile() and invoke Check(). The crafted value uses a single-quote breakout to escape the string emitter. Limiting factors per the advisory: only versions 0.x are affected (1.x and the separately published TypeBox 1.x are unaffected); the 0.x compiler only accepts Symbol('Kind')-differentiated schematics created via Type.* functions, so raw remotely-sourced JSON schemas must first be augmented with TypeBox symbols before they can be compiled; and the required value must reach the compilation path, which most applications keep local. The CVSS vector is PR:L, so some application-level privilege/context is required; authentication is low-privilege per the vector, not unauthenticated.

Impact

The vendor-supplied CVSS 4.0 vector (CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H, base 8.5) scores this High on the strength of full confidentiality/integrity/availability impact from arbitrary JavaScript execution in the host Node.js process. However, two signals temper the raw score: the vector is AV:L (local/application-dependent, not network-reachable) and PR:L (some privilege/application context required), and the vuln.today Decision label is 'this_week' rather than act_now or emergency. There is no CISA KEV listing and no EPSS score in the provided data, so there is no evidence of active or widespread exploitation - this reads as a High-severity-but-conditional issue rather than a mass-exploitation priority. Critically, the upstream GHSA advisory (GHSA-976x-prgx-qv35) states most applications are NOT at risk because the 0.x compiler only accepts Symbol('Kind')-differentiated schematics built with Type.* functions (so raw remote JSON schemas cannot be compiled directly) and because TypeScript cannot statically infer remotely-sourced values - both factors filter out typical usage. Real risk therefore concentrates on the narrow set of applications that deliberately feed untrusted format strings, Kind names, property keys, or Literal values into Type.* and then call TypeCompiler.Compile()/Check(). Note a scoping caveat: the primary GHSA/PoC evidence is for the upstream @sinclair/typebox (CVE-2026-77356), whereas this CVE tracks the @scalar/typebox republish fixed in 0.1.4 - verify the exact affected @scalar range against the vendor.

Exploit ScenarioDerived

An application loads an untrusted value (e.g. a format specifier or literal) from disk or the network, passes it into a parameterized TypeBox constructor such as Type.String({ format }) or Type.Literal(value), and compiles the resulting schema with TypeCompiler.Compile(). A crafted single-quote breakout escapes the code emitter so that when Compile() or Check() runs, the injected JavaScript is evaluated via new Function(...) inside the Node.js process. A working proof-of-concept demonstrating this exact format-string breakout is published in the GHSA-976x-prgx-qv35 advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Nov 19, 2026

Arbitrary JavaScript execution in the host Node.js process is possible in @scalar/typebox before 0.1.4, where the TypeCompiler builds validator source by concatenating schema-supplied values into strings that are later instantiated with new Function(...). An attacker who can influence a string 'format', a Kind name, a property key, or a Literal value passed to a parameterized Type.* constructor and then compiled with TypeCompiler.Compile() can break out of the emitted single-quoted literal and run code of their choosing when Compile() or Check() executes. The upstream advisory includes a reproduction proof of concept and patches are published for both the Scalar fork and the parent @sinclair/typebox 0.x line; there is no confirmed active exploitation (not listed in CISA KEV). Per the CVSS 4.0 vector the attack is local and requires low privileges (AV:L/PR:L), and the advisory stresses that most applications are not exposed because schemas are usually built from application-controlled values.

RemediationAI

Upgrade @scalar/typebox to 0.1.4 or later, which contains the additional escaping for dynamic string paths introduced by https://github.com/scalar/typebox/pull/5 (commit 21d55f035a83868a3577be2142b9c9bbc125969b); the vulnerable emission code is at src/compiler/compiler.ts line 427 in 0.1.3. Consumers who pull the code in through the parent package must move to @sinclair/typebox 0.34.52 (or the corresponding post-audit releases 0.24.52, 0.25.25, 0.26.9, 0.27.12, 0.28.22, 0.29.8, 0.30.6 for those branches) as described in GHSA-976x-prgx-qv35, and migration to the 1.x package is recommended where compatible. Because the injection requires attacker-influenced data to enter a Type.String({ format }), Kind name, property key or Type.Literal value that is then passed to TypeCompiler.Compile() and Check(), the advisory's own guidance is to avoid compiling values originating from disk, network or other untrusted sources - keep schema values application-controlled, or validate externally sourced JSON Schema with dedicated JSON Schema infrastructure instead of re-wrapping it in Type.* constructors. Note that only the schema construction path is safe once patched; the compiled validator still executes generated code with the privileges of the host Node.js process.

Affected VersionsENISA

typebox 0.1.0 <0.1.4

Affected Packages

euvd typebox fix: 0.1.4

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

TypeBox is a TypeScript-first schema builder whose compiler emits JavaScript validation source and instantiates it with new Function(...) rather than interpreting a schema tree at runtime. The generated code embeds schema-encoded constants - string formats, Kind discriminators, property keys and Literal values - as string literals inside that generated source. This is CWE-94 (Improper Control of Generation of Code, 'code injection'): the emitter failed to escape certain schema-embedded values, so a value containing a single quote can terminate the literal and append attacker-chosen JavaScript to the validator body, which is then evaluated inside the host Node.js process when the compiled validator is built and invoked via Check(). The affected component is the 0.x compiler path (@sinclair/typebox compiler, forked as @scalar/typebox, CPE cpe:2.3:a:scalar:typebox matching versions below 0.1.4); the separately published TypeBox 1.x line was not affected. A structural limiting factor noted in the advisory is that the 0.x compiler only accepts Symbol('Kind')-differentiated schematics produced by Type.* functions and throws on raw JSON Schema, so remotely sourced schematics must first be re-wrapped with TypeBox symbols before they reach the vulnerable emitter.

Know when Typebox 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 8.5 HIGH
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.8 HIGH

Arbitrary JavaScript execution in the Node.js process (C:H/I:H/A:H, S:U) requires the app to feed untrusted input into the compiler, an application/config-dependent local path (AV:L, PR:L, AC:L).

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

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

DescriptionCVE.org

@scalar/typebox before 0.1.4 contains a code injection vulnerability in TypeCompiler that allows attackers to execute JavaScript by supplying crafted schema strings. Attackers can inject single-quote breakouts into string format, Kind names, property keys or Literal values to run arbitrary JavaScript in the host Node.js process during Compile() and Check().

Technical POC Analysis

Note on identifiers: the upstream advisory is GHSA-976x-prgx-qv35 and its text assigns CVE-2026-77356 (CVSS v3.1 7.8, AV:L).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

CVE-2026-133309 is a high-severity arbitrary JavaScript execution vulnerability in the @scalar/typebox library, affecting versions before 0.1.4. An attacker with local low-privileged access who can influence schema values could execute malicious code in the host Node.js process when the schema is compiled or checked, potentially leading to data compromise or system takeover. Leadership should prioritize patching because this library is a dependency in Node.js applications, and while exposure is limited to scenarios where schemas are built from untrusted input, the consequences of exploitation are severe.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 89% exploitable
Prevalence
Low
scoped @scalar fork of TypeBox, limited adoption versus upstream @sinclair/typebox
Data Quality
4 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 HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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