Vulnerabilities in pkg:npm/@openzeppelin/wizard-cairo
PACKAGEGHSA-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.
pkg:npm/@openzeppelin/wizard-cairo
Vulnerability advisories affecting package pkg:npm/@openzeppelin/wizard-cairo. 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
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).
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.
npm install @openzeppelin/wizard@0.10.11
npm install @openzeppelin/wizard-cairo@3.0.1
npm install @openzeppelin/wizard-stellar@0.6.2
npm install @openzeppelin/wizard-stylus@0.3.1
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
GHSA-9wxg-vf3r-56hc Affected OpenZeppelin Contracts Wizard Versions
4 component(s)| 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?
Which OpenZeppelin Contracts Wizard versions are affected?
What version fixes GHSA-9wxg-vf3r-56hc?
Is @openzeppelin/wizard affected?
Is @openzeppelin/wizard-cairo affected?
What is the CVSS score of GHSA-9wxg-vf3r-56hc?
What CWE is associated with GHSA-9wxg-vf3r-56hc?
How can I check npm dependencies for GHSA-9wxg-vf3r-56hc?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}