{
  "id": "CVE-2026-48054",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-48054",
  "published_at": "2026-08-06T21:37:54.767Z",
  "title": "OpenZeppelin Contracts Wizard has Code Injection in Generated Hardhat and Foundry Tests via Unsanitized opts.name / opts.uri",
  "vendor": "OpenZeppelin",
  "product": "contracts-wizard",
  "cvss": {
    "score": 8.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "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.",
  "cwe": "CWE-94",
  "cvss_by_source": {
    "cna": 8.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "OpenZeppelin",
        "product": "contracts-wizard",
        "ranges": [
          "\u003c 0.10.9"
        ],
        "fixed_in": [
          "0.10.9"
        ]
      }
    ],
    "upgrade": [
      "Upgrade contracts-wizard to 0.10.9 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/OpenZeppelin/contracts-wizard/security/advisories/GHSA-4x76-22x2-rx8v"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/OpenZeppelin/contracts-wizard/commit/ec12c44f8d9e0491eba31037f95b36e98ec58b5f"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/OpenZeppelin/contracts-wizard/releases/tag/%40openzeppelin%2Fwizard%400.10.9"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
