Vulnerabilities in pkg:npm/@openzeppelin/wizard-stylus

PACKAGE
Advisory Summary

GHSA-9wxg-vf3r-56hc is a LOW (CVSS 3.3) remote code execution vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting OpenZeppelin Contracts Wizard libraries in the npm ecosystem. The issue involves line terminators in info.securitycontact / info.license can inject lines into generated source. Remediation is available by upgrading affected packages to version 0.10.11, 3.0.1, 0.6.2, 0.3.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@openzeppelin/wizard-stylus

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@openzeppelin/wizard-stylus. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-9wxg-vf3r-56hc - LOW OpenZeppelin Contracts Wizard: Line terminators in info.securityContact / info.license can inject lines into generated source

GHSA-9wxg-vf3r-56hc at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-9wxg-vf3r-56hc
Severity LOW
CVSS v3.1 Base Score 3.3
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product OpenZeppelin Contracts Wizard
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 3.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix GHSA-9wxg-vf3r-56hc

To remediate this vulnerability, upgrade all affected OpenZeppelin Contracts Wizard dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@openzeppelin/wizard fixed: 0.10.11
npm install @openzeppelin/wizard@0.10.11
@openzeppelin/wizard-cairo fixed: 3.0.1
npm install @openzeppelin/wizard-cairo@3.0.1
@openzeppelin/wizard-stellar fixed: 0.6.2
npm install @openzeppelin/wizard-stellar@0.6.2
@openzeppelin/wizard-stylus fixed: 0.3.1
npm install @openzeppelin/wizard-stylus@0.3.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @openzeppelin/wizard

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-9wxg-vf3r-56hc, inspect your project dependencies using npm:

npm ls @openzeppelin/wizard

Analyze the terminal output to locate any version of OpenZeppelin Contracts Wizard in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.11), your application is affected.

Note: The npm ls @openzeppelin/wizard command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In OpenZeppelin Contracts Wizard, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The Contracts Wizard generators printed `info.securityContact` and `info.license` verbatim into a single-line comment of the generated Solidity, Cairo, Stellar/Soroban, and Stylus source without rejecting line terminators. A newline (`\n` or `\r\n`) in either field ends the comment, so the text after it is emitted as source rather than remaining inside the comment — allowing arbitrary declarations to be injected into the generated contract. ## Impact This only matters when these fields are filled from input other than the user who will use the generated contract. Normal self-service use does not meet that condition: - **Web app, AI assistant, and CLI:** the user supplies these fields and uses their own output, so a line break only affects their own contract. (These fields are not URL-derived, so shared links cannot set them.) - **Self-hosted API:** same — the end user supplies the options and consumes the result. The case that matters is an integration that fills these fields from untrusted input — for example, an MCP agent whose tool arguments are derived from content it processed. There, a newline in the value can add lines to output that otherwise looks like normal Wizard source. Impact is integrity-only; there is no execution on any Wizard service. ## Patches Fixed by rejecting line terminators in `setInfo` — the single code path all surfaces use — so the value can no longer break out of the comment. Upgrade to the patched versions. `@openzeppelin/wizard-confidential` and `@openzeppelin/wizard-uniswap-hooks` reuse this `setInfo` through their `@openzeppelin/wizard` dependency and receive the fix once that dependency is updated to a patched version.

GHSA-9wxg-vf3r-56hc Affected OpenZeppelin Contracts Wizard Versions

4 component(s)
Fixed Versions:
0.10.113.0.10.6.20.3.1
Product / Package Ecosystem Affected Versions Fixed Version
@openzeppelin/wizard
npm
< 0.10.11
0.10.11
@openzeppelin/wizard-cairo
npm
< 3.0.1
3.0.1
@openzeppelin/wizard-stellar
npm
< 0.6.2
0.6.2
@openzeppelin/wizard-stylus
npm
< 0.3.1
0.3.1

References

Frequently Asked Questions

What is GHSA-9wxg-vf3r-56hc?
GHSA-9wxg-vf3r-56hc is a security vulnerability in OpenZeppelin Contracts Wizard involving Line terminators in info.securityContact / info.license can inject lines into generated source under CWE-116: Improper Encoding or Escaping of Output.
Which OpenZeppelin Contracts Wizard versions are affected?
Affected versions include releases prior to 0.10.11, 3.0.1, 0.6.2, 0.3.1 across affected packages: @openzeppelin/wizard, @openzeppelin/wizard-cairo, @openzeppelin/wizard-stellar, @openzeppelin/wizard-stylus.
What version fixes GHSA-9wxg-vf3r-56hc?
Upgrading to 0.10.11, 3.0.1, 0.6.2, 0.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @openzeppelin/wizard affected?
Yes, @openzeppelin/wizard is affected in releases prior to 0.10.11. Upgrade your dependency to 0.10.11 or later.
Is @openzeppelin/wizard-cairo affected?
Yes, @openzeppelin/wizard-cairo is affected in releases prior to 3.0.1. Upgrade your dependency to 3.0.1 or later.
What is the CVSS score of GHSA-9wxg-vf3r-56hc?
GHSA-9wxg-vf3r-56hc has a CVSS v3.1 base score of 3.3 (LOW) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with GHSA-9wxg-vf3r-56hc?
GHSA-9wxg-vf3r-56hc is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check npm dependencies for GHSA-9wxg-vf3r-56hc?
Run the dependency tree command: 'npm ls @openzeppelin/wizard'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9wxg-vf3r-56hc",
  "modified" : "2026-06-19T17:45:15Z",
  "published" : "2026-06-19T17:45:15Z",
  "aliases" : [ ],
  "summary" : "OpenZeppelin Contracts Wizard: Line terminators in info.securityContact / info.license can inject lines into generated source",
  "details" : "## Summary\n\nThe Contracts Wizard generators printed `info.securityContact` and `info.license` verbatim into a single-line comment of the generated Solidity, Cairo, Stellar/Soroban, and Stylus source without rejecting line terminators. A newline (`\\n` or `\\r\\n`) in either field ends the comment, so the text after it is emitted as source rather than remaining inside the comment — allowing arbitrary declarations to be injected into the generated contract.\n\n## Impact\n\nThis only matters when these fields are filled from input other than the user who will use the generated contract. Normal self-service use does not meet that condition:\n\n- **Web app, AI assistant, and CLI:** the user supplies these fields and uses their own output, so a line break only affects their own contract. (These fields are not URL-derived, so shared links cannot set them.)\n- **Self-hosted API:** same — the end user supplies the options and consumes the result.\n\nThe case that matters is an integration that fills these fields from untrusted input — for example, an MCP agent whose tool arguments are derived from content it processed. There, a newline in the value can add lines to output that otherwise looks like normal Wizard source. Impact is integrity-only; there is no execution on any Wizard service.\n\n## Patches\n\nFixed by rejecting line terminators in `setInfo` — the single code path all surfaces use — so the value can no longer break out of the comment. Upgrade to the patched versions. `@openzeppelin/wizard-confidential` and `@openzeppelin/wizard-uniswap-hooks` reuse this `setInfo` through their `@openzeppelin/wizard` dependency and receive the fix once that dependency is updated to a patched version.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@openzeppelin/wizard"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.10.11"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.10.10"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@openzeppelin/wizard-cairo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.0.0"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@openzeppelin/wizard-stellar"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.6.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.6.1"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@openzeppelin/wizard-stylus"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.3.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/OpenZeppelin/contracts-wizard/security/advisories/GHSA-9wxg-vf3r-56hc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/OpenZeppelin/contracts-wizard"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116", "CWE-94" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-19T17:45:15Z",
    "nvd_published_at" : null
  }
}