{"id":"CVE-2026-57583","aliases":["CVE-2026-57583","GHSA-9wxg-vf3r-56hc"],"related":[],"kind":"vulnerability","state":"published","title":"OpenZeppelin Contracts Wizard: Line terminators in info.securityContact / info.license can inject lines into generated source","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## 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.","format":"markdown","source":"ghsa"}],"published":"2026-06-19T17:45:15.000Z","modified":"2026-09-30T19:57:08.043Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":3.3,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":3.3,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":3.3,"rating":"LOW"}],"cwes":["CWE-94","CWE-116"],"affected":[{"ranges":[{"version":"< 0.10.11","status":"affected"}],"vendor":"OpenZeppelin","product":"contracts-wizard","source":"cvelist"},{"ranges":[{"version":"< 0.10.11","status":"affected"}],"vendor":"@openzeppelin","product":"wizard","source":"cvelist"},{"ranges":[{"version":"< 3.0.1","status":"affected"}],"vendor":"@openzeppelin","product":"wizard-cairo","source":"cvelist"},{"ranges":[{"version":"< 0.6.2","status":"affected"}],"vendor":"@openzeppelin","product":"wizard-stellar","source":"cvelist"},{"ranges":[{"version":"< 0.3.1","status":"affected"}],"vendor":"@openzeppelin","product":"wizard-stylus","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.10.11"}],"ecosystem":"npm","package":"@openzeppelin/wizard","purl":"pkg:npm/%40openzeppelin/wizard","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.0.1"}],"ecosystem":"npm","package":"@openzeppelin/wizard-cairo","purl":"pkg:npm/%40openzeppelin/wizard-cairo","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.6.2"}],"ecosystem":"npm","package":"@openzeppelin/wizard-stellar","purl":"pkg:npm/%40openzeppelin/wizard-stellar","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.3.1"}],"ecosystem":"npm","package":"@openzeppelin/wizard-stylus","purl":"pkg:npm/%40openzeppelin/wizard-stylus","source":"ghsa"}],"references":[{"url":"https://github.com/OpenZeppelin/contracts-wizard/security/advisories/GHSA-9wxg-vf3r-56hc","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/OpenZeppelin/contracts-wizard/pull/818","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/OpenZeppelin/contracts-wizard/commit/6b18ecbd727a22d9f8c592e5d56caa2e977fb225","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/OpenZeppelin/contracts-wizard/releases/tag/@openzeppelin/wizard-cairo@3.0.1","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/OpenZeppelin/contracts-wizard/releases/tag/@openzeppelin/wizard-stellar@0.6.2","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/OpenZeppelin/contracts-wizard/releases/tag/@openzeppelin/wizard-stylus@0.3.1","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/OpenZeppelin/contracts-wizard/releases/tag/@openzeppelin/wizard@0.10.11","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/OpenZeppelin/contracts-wizard","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-09-14T19:06:44.881Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-57583","url":"https://www.cve.org/CVERecord?id=CVE-2026-57583","licence":"CVE Terms of Use","modified":"2026-09-14T19:06:58.101Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9wxg-vf3r-56hc","url":"https://github.com/advisories/GHSA-9wxg-vf3r-56hc","licence":"CC-BY-4.0","modified":"2026-09-15T03:56:01.702Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-57583","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-57583","licence":"Public domain","modified":"2026-09-30T19:57:08.043Z"}],"updatedAt":"2026-11-25T22:59:38.337Z","epss":{"score":0.00131,"percentile":0.02935,"date":"2026-12-01T12:00:22.000Z"}}