OpenZeppelin Contracts Wizard: Line terminators in info.securityContact / info.license can inject lines into generated sourceGHSA-9wxg-vf3r-56hc
LOWGHSA-9wxg-vf3r-56hc is a low-severity (CVSS 3.3) Code Injection vulnerability in @openzeppelin/wizard. A fix is available for @openzeppelin/wizard — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-9wxg-vf3r-56hc.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@openzeppelin/wizardnpm@openzeppelin/wizard-caironpm@openzeppelin/wizard-stellarnpmDescription
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @openzeppelin/wizard | all versions | 0.10.11npm install @openzeppelin/wizard@0.10.11 |
| 📦npm | @openzeppelin/wizard-cairo | all versions | 3.0.1npm install @openzeppelin/wizard-cairo@3.0.1 |
| 📦npm | @openzeppelin/wizard-stellar | all versions | 0.6.2npm install @openzeppelin/wizard-stellar@0.6.2 |
| 📦npm | @openzeppelin/wizard-stylus | all versions | 0.3.1npm install @openzeppelin/wizard-stylus@0.3.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @openzeppelin/wizard, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @openzeppelin/wizard to 0.10.11 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-9wxg-vf3r-56hc is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is GHSA-9wxg-vf3r-56hc in your dependencies?
Find it across npm, including transitive dependencies.