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

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.45%, higher than 40% of CVEs (2026-12-01)
- Published: 2026-06-11T13:27:24.000Z
- Modified: 2026-09-14T18:17:48.623Z
- Also known as: GHSA-4x76-22x2-rx8v
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- OpenZeppelin contracts-wizard: < 0.10.9
- @openzeppelin/wizard (npm): before 0.10.9

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/OpenZeppelin/contracts-wizard/security/advisories/GHSA-4x76-22x2-rx8v> (web)
- <https://github.com/OpenZeppelin/contracts-wizard/commit/ec12c44f8d9e0491eba31037f95b36e98ec58b5f> (web)
- <https://github.com/OpenZeppelin/contracts-wizard/releases/tag/%40openzeppelin%2Fwizard%400.10.9> (web)
- <https://github.com/OpenZeppelin/contracts-wizard> (package)

## Sources

- CVE List: [CVE-2026-48054](https://www.cve.org/CVERecord?id=CVE-2026-48054), CVE Terms of Use, modified 2026-09-14
- GitHub Advisory Database: [GHSA-4x76-22x2-rx8v](https://github.com/advisories/GHSA-4x76-22x2-rx8v), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-48054](https://nvd.nist.gov/vuln/detail/CVE-2026-48054), Public domain, modified 2026-09-14

---

Page: https://cve.day/CVE-2026-48054 · Whole record: https://cve.day/CVE-2026-48054.json · Rebuilt by cve.day 2026-11-25T22:59:31.364Z
