{"id":"CVE-2026-48054","published":"2026-08-06T21:37:54Z","modified":"2026-09-14T17:42:37Z","title":"OpenZeppelin Contracts Wizard has Code Injection in Generated Hardhat and Foundry Tests via Unsanitized opts.name /…","vendor":"OpenZeppelin","product":"contracts-wizard","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00635,"percentile":0.44978,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/OpenZeppelin/contracts-wizard/security/advisories/GHSA-4x76-22x2-rx8v","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/OpenZeppelin/contracts-wizard/commit/ec12c44f8d9e0491eba31037f95b36e98ec58b5f","tags":["x_refsource_MISC"]},{"url":"https://github.com/OpenZeppelin/contracts-wizard/releases/tag/%40openzeppelin%2Fwizard%400.10.9","tags":["x_refsource_MISC"]}],"priority":{"score":15.2,"factors":[{"name":"EPSS percentile","points":9.0},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"openzeppelin","affectedVersions":[{"vendor":"OpenZeppelin","product":"contracts-wizard","versions":["< 0.10.9"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-08-07T14:52:56.794740Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@openzeppelin/wizard","vulnerableRanges":["<0.10.9"],"patched":["0.10.9"],"from":["GHSA-4x76-22x2-rx8v"],"provenance":"source"}],"summary":{"text":"The OpenZeppelin Contracts Wizard web application, prior to version 0.10.9, generates a Hardhat test file in which user-supplied values for the ERC20/ERC721 name and ERC1155 URI are inserted into TypeScript string literals without escaping, enabling code injection. An attacker needs no authentication and can craft a link containing malicious code in the name parameter and get a developer to open it, download the generated zip archive, and run npx hardhat test, at which point the injected Node.js code executes with the developer's local OS privileges.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:00:27Z"},"euvd":{"id":"EUVD-2026-54176","exploited":false,"provenance":"source"}}