Description
OpenZeppelin Contracts Wizardis 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.
Published: 2026-08-06
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

OpenZeppelin Contracts Wizard is a web application that builds smart contracts by accepting user inputs. In versions prior to 0.10.9 the wizard incorporates the raw user‑supplied opts.name and opts.uri fields directly into TypeScript string literals when generating Hardhat test files. Because these inputs are not escaped, an attacker can craft a malicious URL that injects arbitrary Node.js code into the resulting test file. When a developer downloads the zip archive and runs the test suite the injected code executes with the developer’s local OS privileges, enabling arbitrary command execution and full compromise of the development machine. This vulnerability is a classic code injection (CWE‑94).

Affected Systems

OpenZeppelin Contracts Wizard, deployed as a web application by OpenZeppelin, is the affected product. All releases prior to version 0.10.9 carry this flaw. The vulnerability is triggered by unescaped user inputs during test file generation, irrespective of the contract type chosen (ERC20, ERC721, ERC1155). Developers who use earlier releases and download the generated test archives are at risk. Updating to 0.10.9 or later removes the code injection path.

Risk and Exploitability

The CVSS score of 8.8 classifies the issue as high severity, reflecting the potential for remote code execution with local system privileges. Because the wizard is publicly accessible without authentication, an attacker can construct a malicious URL that embeds arbitrary Node.js code and easily distribute it to unsuspecting developers. When the victim runs the included test file, the code executes as the invoking user. Though the EPSS score is not available, the open‑browser nature of the application suggests a high likelihood of exploitation. The vulnerability is not listed in CISA’s KEV catalog, but the ease of creating and sharing the exploit raises concern for widespread, low‑cost attack activity.

Generated by OpenCVE AI on August 7, 2026 at 00:39 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade OpenZeppelin Contracts Wizard to version 0.10.9 or later to eliminate the unsanitized string interpolation bug.
  • Never accept or run test files from unknown or untrusted sources; verify URLs and inspect the generated code before executing.
  • Run the wizard and subsequent test execution in an isolated, restricted environment (e.g., sandboxed container or CI pipeline) to contain any potential code execution.

Generated by OpenCVE AI on August 7, 2026 at 00:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-4x76-22x2-rx8v OpenZeppelin Contracts Wizard has Code Injection in Generated Hardhat and Foundry Tests via Unsanitized opts.name / opts.uri
History

Fri, 07 Aug 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 07 Aug 2026 10:30:00 +0000

Type Values Removed Values Added
First Time appeared Openzeppelin
Openzeppelin contracts-wizard
Vendors & Products Openzeppelin
Openzeppelin contracts-wizard

Thu, 06 Aug 2026 22:15:00 +0000

Type Values Removed Values Added
Description OpenZeppelin Contracts Wizardis 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.
Title OpenZeppelin Contracts Wizard has Code Injection in Generated Hardhat and Foundry Tests via Unsanitized opts.name / opts.uri
Weaknesses CWE-94
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Openzeppelin Contracts-wizard
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-07T17:08:33.295Z

Reserved: 2026-05-20T18:15:53.579Z

Link: CVE-2026-48054

cve-icon Vulnrichment

Updated: 2026-08-07T14:53:01.187Z

cve-icon NVD

Status : Received

Published: 2026-08-06T22:17:09.530

Modified: 2026-08-07T18:17:17.360

Link: CVE-2026-48054

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-07T09:58:42Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')