OpenZeppelin Contracts Wizard CVE-2026-48054
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconIdentify integrator wrapping zipHardhat/zipFoundry
-
DeliverySubmit crafted opts.name/opts.uri with quote/backslash breakout
-
ExploitGenerated Hardhat/Foundry test file contains injected code
-
InstallVictim downloads project zip
-
C2Developer runs npm test or forge test
-
ExecuteInjected code executes on developer host
-
ImpactRCE 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 |
| 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 |
| Exploit ScenarioDerived | An attacker submits a crafted token name such as |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
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).
Primary rating from Vendor (https://github.com/OpenZeppelin/contracts-wizard).
CVSS VectorVendor: https://github.com/OpenZeppelin/contracts-wizard
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/wizardvia the documented public API: not affected. The vulnerable functions (zipHardhat,zipFoundry) are not part of the package's documented public exports. - Callers of
zipHardhat/zipFoundrywho forward externally-controlled strings intoopts.name/opts.uri: upgrade to0.10.9.
Patches
Fixed in @openzeppelin/wizard@0.10.9.
Articles & Coverage 2
Executive ViewAI
@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.
Apply vendor patch.
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
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
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
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
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
GHSA-4x76-22x2-rx8v
NVD
CVE.org
EPSS
VulDB
Exploit-DB