CVE-2026-48054: @openzeppelin/wizard OpenZeppelin Contracts Wizard Has Code Vulnerability
HIGHCVE-2026-48054 is a HIGH (CVSS 8.8) openzeppelin contracts wizard has code vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting @openzeppelin/wizard libraries in the npm ecosystem. The issue involves openzeppelin contracts wizard has code injection in generated hardhat and foundry tests via unsanitized opts.name / opts.uri. Remediation is available by upgrading affected packages to version 0.10.9.
CVE-2026-48054 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-48054
To remediate this vulnerability, upgrade all affected @openzeppelin/wizard dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @openzeppelin/wizard@0.10.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @openzeppelin/wizard
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-48054, inspect your project dependencies using npm:
npm ls @openzeppelin/wizard
Analyze the terminal output to locate any version of @openzeppelin/wizard in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.9), your application is affected.
Note: The npm ls @openzeppelin/wizard command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In @openzeppelin/wizard, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-48054 Affected @openzeppelin/wizard Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@openzeppelin/wizard
|
npm |
< 0.10.9
|
0.10.9
|
References
Frequently Asked Questions
What is CVE-2026-48054?
Which @openzeppelin/wizard versions are affected?
What version fixes CVE-2026-48054?
Is @openzeppelin/wizard affected?
What is the CVSS score of CVE-2026-48054?
What CWE is associated with CVE-2026-48054?
How can I check npm dependencies for CVE-2026-48054?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4x76-22x2-rx8v",
"modified" : "2026-06-11T13:27:24Z",
"published" : "2026-06-11T13:27:24Z",
"aliases" : [ "CVE-2026-48054" ],
"summary" : "OpenZeppelin Contracts Wizard has Code Injection in Generated Hardhat and Foundry Tests via Unsanitized opts.name / opts.uri",
"details" : "## Summary\n\nThe 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.\n\n## Impact\n\n- **Users of the hosted Wizard at https://wizard.openzeppelin.com:** no action required. The site has been redeployed with the fix.\n- **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.\n- **Callers of `zipHardhat` / `zipFoundry` who forward externally-controlled strings into `opts.name` / `opts.uri`:** upgrade to `0.10.9`.\n\n## Patches\n\nFixed in `@openzeppelin/wizard@0.10.9`.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@openzeppelin/wizard"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.10.9"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.10.8"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/OpenZeppelin/contracts-wizard/security/advisories/GHSA-4x76-22x2-rx8v"
}, {
"type" : "WEB",
"url" : "https://github.com/OpenZeppelin/contracts-wizard/commit/ec12c44f8d9e0491eba31037f95b36e98ec58b5f"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/OpenZeppelin/contracts-wizard"
}, {
"type" : "WEB",
"url" : "https://github.com/OpenZeppelin/contracts-wizard/releases/tag/%40openzeppelin%2Fwizard%400.10.9"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-11T13:27:24Z",
"nvd_published_at" : null
}
}