CVE-2026-57583
JSON

3.3low

OpenZeppelin Contracts Wizard: Line terminators in info.securityContact / info.license can inject lines into generated source

Severity
3.3low CVSS:3.1 by GitHub_M
Exploit likelihood
0.13% (higher than 2% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-9wxg-vf3r-56hc

Description

OpenZeppelin Contracts Wizard is a web application to interactively build a contract out of components from OpenZeppelin Contracts. Prior to @openzeppelin/wizard 0.10.11, @openzeppelin/wizard-cairo 3.0.1, @openzeppelin/wizard-stellar 0.6.2, and @openzeppelin/wizard-stylus 0.3.1, the setInfo code path prints info.securityContact and info.license verbatim into single-line comments in generated Solidity, Cairo, Stellar/Soroban, and Stylus source. A line terminator ends the comment and causes following input to be emitted as source declarations. Exploitation requires an integration to populate these fields from untrusted input and a user to consume the generated source; normal self-service web, AI assistant, CLI, and self-hosted API use does not cross that trust boundary, shared links cannot set the fields, and no code executes on a Wizard service. This issue affects generated-source integrity only and is fixed in versions 0.10.11, 3.0.1, 0.6.2, and 0.3.1 of the respective packages.

Affected

Product or packageVersionsReported by
OpenZeppelin contracts-wizard< 0.10.11CVE List
@openzeppelin wizard< 0.10.11CVE List
@openzeppelin wizard-cairo< 3.0.1CVE List
@openzeppelin wizard-stellar< 0.6.2CVE List
@openzeppelin wizard-stylus< 0.3.1CVE List
@openzeppelin/wizard (npm)before 0.10.11GitHub Advisory Database
@openzeppelin/wizard-cairo (npm)before 3.0.1GitHub Advisory Database
@openzeppelin/wizard-stellar (npm)before 0.6.2GitHub Advisory Database
@openzeppelin/wizard-stylus (npm)before 0.3.1GitHub Advisory Database

All scores

GitHub_M3.3low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
GitHub3.3low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

Classification

CWE-94CWE-116

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

OpenZeppelin Contracts Wizard is a web application to interactively build a contract out of components from OpenZeppelin Contracts. Prior to @openzeppelin/wizard 0.10.11, @openzeppelin/wizard-cairo 3.0.1, @openzeppelin/wizard-stellar 0.6.2, and @openzeppelin/wizard-stylus 0.3.1, the setInfo code path prints info.securityContact and info.license verbatim into single-line comments in generated Solidity, Cairo, Stellar/Soroban, and Stylus source. A line terminator ends the comment and causes following input to be emitted as source declarations. Exploitation requires an integration to populate these fields from untrusted input and a user to consume the generated source; normal self-service web, AI assistant, CLI, and self-hosted API use does not cross that trust boundary, shared links cannot set the fields, and no code executes on a Wizard service. This issue affects generated-source integrity only and is fixed in versions 0.10.11, 3.0.1, 0.6.2, and 0.3.1 of the respective packages.

GitHub Advisory Database

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.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-57583 changed 2026-09-14CVE Terms of Use
GitHub Advisory DatabaseGHSA-9wxg-vf3r-56hc changed 2026-09-15CC-BY-4.0
NVDCVE-2026-57583 changed 2026-09-30Public domain