Skip to content

CVE-2026-48054 OpenZeppelin Contracts Wizard has Code Injection in Generated Hardhat and Foundry Tests via Unsanitized opts.name / opts.uri

HighCVSS 8.8 EPSS 0.64%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: total

Description

OpenZeppelin Contracts Wizard is a web application to interactively build a contract out of components from OpenZeppelin Contracts. Versions prior to 0.10.9 generate a Hardhat test file (test/test.ts) by interpolating user-supplied opts.name (ERC20/ERC721) and opts.uri (ERC1155) directly into TypeScript string literals at zip-hardhat.ts:48 and :50 without any JavaScript string escaping. No authentication is required: an attacker crafts a URL such as https[:]//wizard[.]openzeppelin[.]com/#/erc20?name=");require("child_process").execSync("...");(" and shares it with a developer. When the victim downloads the resulting zip archive and runs npx hardhat test, the injected Node.js code executes with the developer's local OS privileges. Version 0.10.9 fixes the issue.

Upgrade path

2 packages: 1 fixed.

PackageAffectedFixed inStatus
openzeppelin wizard(npm) < 0.10.9; <= 0.10.8 0.10.9 Fixed
openzeppelin contracts-wizard = < 0.10.9 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
openzeppelin contracts-wizard = < 0.10.9 No fix listed
openzeppelin wizard(npm) <= 0.10.8 No fix listed
openzeppelin wizard(npm) < 0.10.9 0.10.9

References