CVE-2026-57583
JavaScript vulnerability analysis and mitigation

Overview

CVE-2026-57583 is a code injection vulnerability in OpenZeppelin Contracts Wizard where line terminators in the info.securityContact and info.license fields can break out of single-line comments and inject arbitrary declarations into generated smart contract source code. It was published on June 18, 2026, and affects @openzeppelin/wizard ≤0.10.10, @openzeppelin/wizard-cairo ≤3.0.0, @openzeppelin/wizard-stellar ≤0.6.1, and @openzeppelin/wizard-stylus ≤0.3.0. The vulnerability carries a CVSS v3.1 base score of 3.3 (Low) (GitHub Advisory).

Technical details

The root cause is improper output encoding (CWE-116) combined with improper control of code generation (CWE-94): the Wizard generators inserted info.securityContact and info.license verbatim into single-line comments of generated Solidity, Cairo, Stellar/Soroban, and Stylus source files without stripping or rejecting newline characters (\n or \r\n). Because a single-line comment terminates at the first newline, any text following the injected newline is emitted as executable source code rather than a comment, enabling arbitrary declarations to be inserted into the generated contract. Exploitation requires that an integration (e.g., an MCP agent) populates these fields from untrusted external input and that a user then acts on the resulting generated source (GitHub Advisory).

Impact

The impact is limited to integrity: an attacker who can influence the info.securityContact or info.license fields in an integration that consumes untrusted input can cause the Wizard to emit generated contract source containing injected declarations that appear to be legitimate Wizard output. There is no confidentiality or availability impact, and no code executes on any Wizard service itself. The practical risk arises when a downstream user deploys the tampered generated contract without careful review, potentially introducing malicious logic into a smart contract (GitHub Advisory).

Exploitability

No public proof-of-concept exploit code or in-the-wild exploitation has been reported. The vulnerability is rated Low severity (CVSS 3.3) and requires user interaction, limiting its practical exploitability. It is not listed in the CISA Known Exploited Vulnerabilities catalog. Exploitation is only meaningful in integrations that pass untrusted content into the info.securityContact or info.license fields — standard self-service use via the web app, CLI, or AI assistant is not affected (GitHub Advisory).

Exploitation steps

  1. Identify a vulnerable integration: Find a service or MCP agent that uses a vulnerable version of @openzeppelin/wizard (≤0.10.10) and populates info.securityContact or info.license from externally controlled or untrusted input.
  2. Craft a malicious payload: Prepare a string containing a newline character followed by arbitrary Solidity (or Cairo/Stellar/Stylus) source code, e.g., legitimate@contact.com\nfunction backdoor() public { selfdestruct(payable(msg.sender)); }.
  3. Inject the payload: Supply the crafted string as the value for info.securityContact or info.license through the integration's input mechanism (e.g., tool arguments to an MCP agent).
  4. Observe generated output: The Wizard emits the newline, terminating the single-line comment, and the injected code appears as valid source in the generated contract file.
  5. Social engineering: The attacker relies on the victim user trusting the Wizard-generated output and deploying the contract without thorough review, thereby deploying the injected malicious declarations on-chain (GitHub Advisory).

Indicators of compromise

  • File System: Generated smart contract source files containing unexpected code lines immediately following the // Security Contact: or // License: comment header, particularly functions, state variables, or imports not consistent with the intended contract template.
  • Code Review: Presence of \n or \r\n characters within the info.securityContact or info.license fields in Wizard configuration objects or API call payloads.
  • Logs: Integration or MCP agent logs showing multi-line values passed as securityContact or license parameters to the Wizard API (GitHub Advisory).

Mitigation and workarounds

Upgrade to the patched versions: @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 fix rejects line terminators in the setInfo code path shared by all surfaces. Packages @openzeppelin/wizard-confidential and @openzeppelin/wizard-uniswap-hooks inherit the fix once their @openzeppelin/wizard dependency is updated. As a workaround, integrations that populate these fields from untrusted input should sanitize values by stripping or rejecting \n and \r\n characters before passing them to the Wizard (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-49250HIGH8.7
  • JavaScript logoJavaScript
  • @conform-to/dom
NoYesSep 14, 2026
CVE-2026-55091HIGH7.5
  • JavaScript logoJavaScript
  • flat-to-nested
NoYesSep 14, 2026
CVE-2026-59960HIGH7.5
  • JavaScript logoJavaScript
  • @argos-ci/core
NoYesSep 14, 2026
CVE-2026-54150MEDIUM6.9
  • JavaScript logoJavaScript
  • next-video
NoYesSep 14, 2026
CVE-2026-57583LOW3.3
  • JavaScript logoJavaScript
  • @openzeppelin/wizard
NoYesSep 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management