Skip to main content

OpenZeppelin Contracts Wizard CVE-2026-48054

HIGH
Code Injection (CWE-94)
2026-06-11 https://github.com/OpenZeppelin/contracts-wizard GHSA-4x76-22x2-rx8v
8.8
CVSS 3.1 · Vendor: https://github.com/OpenZeppelin/contracts-wizard
View

Attack ChainAIDerived

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

  1. Recon
    Identify integrator wrapping zipHardhat/zipFoundry
  2. Delivery
    Submit crafted opts.name/opts.uri with quote/backslash breakout
  3. Exploit
    Generated Hardhat/Foundry test file contains injected code
  4. Install
    Victim downloads project zip
  5. C2
    Developer runs npm test or forge test
  6. Execute
    Injected code executes on developer host
  7. Impact
    RCE on developer workstation

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

Requires (1) a downstream integrator that calls the undocumented zipHardhat or zipFoundry exports of @openzeppelin/wizard <= 0.10.8 and forwards externally-controlled strings into opts.name or opts.uri, (2) the attacker's ability to submit those strings to that integrator, and (3) a developer subsequently running npm test or forge test on the generated project (UI:R). Users of the hosted https://wizard.openzeppelin.com UI are not exploitable post-redeploy, and consumers using only the documented public package API are not affected; the hosted site self-supplies opts.name/opts.uri so cross-user injection there is not the threat model.

Impact

Provided CVSS 3.1 is 8.8 (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H), but the real-world blast radius is narrower than the score implies: the hosted wizard at wizard.openzeppelin.com has already been redeployed with the fix, the documented public npm API is not affected, and exploitation requires an integrator who (a) directly calls the undocumented zipHardhat/zipFoundry entrypoints and (b) forwards externally-controlled values into opts.name/opts.uri, plus a developer who then runs npm test/forge test on the resulting project (UI:R). No EPSS, KEV, or SSVC data was provided, and no public exploit code is identified at time of analysis, so the practical priority is elevated only for downstream tooling that wraps the wizard's undocumented exports rather than end users of the hosted UI.

Exploit ScenarioDerived

An attacker submits a crafted token name such as é\")Token or a URI containing " into a downstream service that wraps the wizard's zipHardhat/zipFoundry exports; the generated test file contains attacker-controlled JavaScript or Solidity that breaks out of the string literal. When the victim developer downloads the zipped project and runs npm test or forge test, the injected code executes in their local shell context. No public exploit is identified at time of analysis, though a patch commit and regression test cases (e.g., erc20 name containing double quotes) publicly demonstrate the breakout payload shape.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.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 – Jun 11, 2026

Code injection in OpenZeppelin Contracts Wizard's @openzeppelin/wizard npm package (<=0.10.8) allows attacker-supplied strings passed through opts.name or opts.uri into the zipHardhat/zipFoundry helpers to break out of string literals inside generated Hardhat and Foundry test scaffolding, leading to arbitrary code execution on the developer's machine when npm test or forge test is run. No public exploit is identified at time of analysis, but a vendor advisory and patched commit are public via GitHub Security Advisory GHSA-4x76-22x2-rx8v.

RemediationAI

Vendor-released patch: @openzeppelin/wizard@0.10.9 - upgrade any project that calls zipHardhat or zipFoundry to this version (fix commit ec12c44f8d9e0491eba31037f95b36e98ec58b5f, advisory GHSA-4x76-22x2-rx8v). If upgrading is delayed, integrators should stop forwarding externally-controlled input into opts.name/opts.uri, or pre-sanitize those values by rejecting strings containing ", \, CR, LF, and vertical tab before invoking the undocumented zipHardhat/zipFoundry functions - accepting the trade-off that legitimate non-ASCII project names may be rejected. As an additional compensating control, do not execute npm test or forge test on wizard-generated projects whose inputs originated from untrusted users until they have been reviewed.

Affected Packages

npm @openzeppelin/wizard fix: 0.10.9

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

The flaw lives in packages/core/solidity/src/utils/sanitize.ts which previously used JSON.stringify for ASCII and a naive replace(/"/g, '\"') for unicode bodies when embedding user strings into Solidity (unicode"...") and TypeScript string literals inside the generated test/<Name>.t.sol and test/test.ts files. Because Solidity's unicode"..." literal treats \ as an escape and excludes CR/LF/VT from its raw body, an input such as é\"); could terminate the literal and inject statements; the same pattern broke TypeScript literals in the Hardhat template. This is a classic CWE-94 (Improper Control of Generation of Code) injection that manifests at code-generation time rather than at runtime of the wizard itself, and only affects integrators who feed externally-controlled values to the undocumented zipHardhat/zipFoundry exports (CPE: pkg:npm/@openzeppelin/wizard).

Know when Node.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 (https://github.com/OpenZeppelin/contracts-wizard) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 8.8 HIGH

Attacker input reaches a network-reachable integrator without auth (AV:N/PR:N), exploitation needs only a crafted string (AC:L), but a developer must run the generated tests (UI:R), yielding full RCE (C/I/A:H).

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

Primary rating from Vendor (https://github.com/OpenZeppelin/contracts-wizard).

CVSS VectorVendor: https://github.com/OpenZeppelin/contracts-wizard

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Summary

The OpenZeppelin Contracts Wizard generated Hardhat (test/test.ts) and Foundry (test/<Name>.t.sol) example test files that interpolated user-supplied strings (opts.name, opts.uri) into the test source without escaping. A crafted input could produce a generated test file in which the input string broke out of its surrounding literal and was parsed as code, executing when a developer ran npm test or forge test on the downloaded project.

Impact

  • Users of the hosted Wizard at https://wizard.openzeppelin.com: no action required. The site has been redeployed with the fix.
  • Users of @openzeppelin/wizard via the documented public API: not affected. The vulnerable functions (zipHardhat, zipFoundry) are not part of the package's documented public exports.
  • Callers of zipHardhat / zipFoundry who forward externally-controlled strings into opts.name / opts.uri: upgrade to 0.10.9.

Patches

Fixed in @openzeppelin/wizard@0.10.9.

Executive ViewAI

Why It Matters

@openzeppelin/wizard npm package versions 0.10.8 and earlier contain a code injection vulnerability that executes arbitrary code on developer machines during routine testing operations. Developers who use this widely-adopted tool to scaffold smart contracts face direct compromise of their development environments and potential injection of malicious code into source repositories. This represents a critical supply chain risk for organizations dependent on secure development practices.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS GHSA GitHub VulDB

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.0%
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· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

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

Affected Products (CPE)CVE.org

pkg:npm/@openzeppelin_wizard
CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

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