The Solidity development team has officially announced the release of Solidity v0.8.37, a maintenance and feature-rich update that addresses several notable bugfixes, introduces support for upcoming Ethereum Virtual Machine (EVM) upgrades, and transitions key experimental components to more robust architectural models. As developers continue to refine smart contract security and compilation pipelines, this latest version provides crucial patches for vulnerabilities identified through ecosystem bug bounties, alongside important deprecation warnings that signal the ongoing cleanup of legacy features within the compiler.
While primarily classified as a bugfix release, Solidity v0.8.37 contains three important security-related bugfixes—two rated low-to-medium severity and one very low—alongside corrections for two smaller miscompilations that do not directly pose security risks. The update also brings significant changes to experimental code generation, adds support for new EVM opcodes, and systematically phases out outdated compiler modes and network versions.
Important Bugfixes
Security audits and community reports remain vital to the integrity of the Ethereum ecosystem. Solidity v0.8.37 incorporates critical fixes for issues discovered and submitted through the Ethereum Foundation’s bug bounty program, highlighting the ongoing collaboration between core developers and security researchers.
Memory Byte Array Element Delete Clears 32 Bytes
One of the most consequential security fixes in this release addresses a memory corruption vulnerability within the legacy evmasm pipeline. When the delete operator was applied to an individual element of a bytes array stored in memory, the compiler incorrectly wrote 32 zero bytes starting at that element, instead of clearing only the single target byte.
This unintended behavior resulted in the extra zero bytes overwriting up to 31 bytes immediately following the targeted element. Depending on the memory layout, these overwritten bytes could belong to subsequent elements within the same array or, if the element was positioned near the end of the array, to whatever data happened to be allocated next in memory. The issue similarly impacted string values that were converted into bytes.
Developers should note that the modern IR (Intermediate Representation) pipeline is entirely unaffected by this flaw. Furthermore, the analogous assignment operation b[i] = 0 correctly cleared exactly one byte across both compilation pipelines. All Solidity versions up to and including v0.8.36 are affected when using the evmasm pipeline. The vulnerability was responsibly disclosed by researcher shaheenfazim via the Ethereum Foundation bug bounty program.
Spill Slot Collision Across Mutual Recursion
The second prominent bugfix tackles a complex stack management issue within the IR compilation pipeline. To work around the Ethereum Virtual Machine’s strict stack depth limit, the IR pipeline’s stack-to-memory mover relocates certain local variables to fixed memory offsets known as spill slots.
Under specific call graph configurations involving mutual recursion, the compiler reserved too few spill slots. Consequently, variables belonging to two different functions could be assigned the exact same memory slot even when both functions were live at the same time. This overlap caused one variable to be silently overwritten by another during execution.
This bug bears close similarities to the unsound spill issue in mutual recursion patched previously in version 0.8.36. Versions 0.7.2 through 0.8.36 are affected when compiling contracts with the --via-ir flag enabled. The vulnerability was identified and reported by Ng Sze Hon through the Ethereum Foundation bug bounty program.
Misordered Named Parameters in Require with Custom Errors
A third notable bugfix centers on the handling of custom errors within require statements when constructed using named parameters in the IR pipeline. For example, in an expression like require(condition, MyError(b: 2, a: 1)), the compiler previously placed arguments onto the stack in the order they were written at the call site rather than following the parameter order defined in the error declaration.
During ABI encoding, these misordered arguments could be matched with incorrect parameters and misinterpreted as completely different data types. While the encoder would still produce a structurally valid payload matching the target error signature, the payload failed to reflect the actual values used to instantiate the error.
Plain revert MyError(...) statements and other language constructs utilizing named parameters remain entirely unaffected. Because this anomaly only impacts the revert data of transactions that are already failing, it has no impact on stored contract state or successful execution paths. The bug was discovered by Carl from Cantina Security and reported through the Ethereum Foundation bug bounty program.
Other Miscompilations
In addition to security-related patches, Solidity v0.8.37 addresses two additional miscompilation issues that, while not classified as direct security vulnerabilities, could cause unexpected runtime behavior under specific conditions.
The first issue involves uninitialized internal function pointers within packed storage slots when using the evmasm pipeline. Reading an uninitialized internal function pointer from a packed storage slot produced an incorrect value if another variable stored immediately after it in the same slot held a non-zero value. Consequently, equality comparisons between such an uninitialized pointer and a default-initialized local function pointer could evaluate to false, even though neither pointer had ever been assigned a value.
This edge case has no impact on actual function calls executed through such pointers; it exclusively affects uninitialized comparisons of packed pointers. Because internal function pointer values depend heavily on exact bytecode generation and are inherently unstable across contract updates, the compiler already warns developers against such comparisons and intends to disallow them in future breaking releases. Triggering the bug requires a highly specific usage pattern that is easily caught through standard unit testing.
The second miscompilation fix addresses constant evaluations read across both checked and unchecked contexts within the IR pipeline. Previously, the code computing the value of a constant expression was generated only once per contract, utilizing either checked or unchecked arithmetic based entirely on which use site the compiler encountered first. Subsequent use sites reused that identical code block.
For a constant whose initializer overflows its designated type, a read situated within a checked context could fail to trigger the required overflow panic, or alternatively, a read inside an unchecked block could revert with a spurious panic. Because all operands involved in these constant reads are evaluated at compile time, the resulting behavior is deterministic and entirely insulated from external transaction inputs or malicious user manipulation. The realistic risk is limited to isolated testing oversights in codebases lacking sufficient test coverage, where an overflowing constant might trigger an unexpected revert or silent wrapping.
Notable Features and Changes
Solidity v0.8.37 introduces several forward-looking architectural updates, experimental pipeline modifications, and long-awaited deprecations designed to streamline the compiler codebase.
SSA CFG Planning Stack Shuffler (Experimental)
The experimental SSA CFG code generator, which precomputes optimal stack layouts for every program point, has received a major internal upgrade. Previously, its stack shuffler operated via a greedy algorithm, executing individual local steps sequentially until reaching the target layout.
Version 0.8.37 replaces this greedy approach with a planning-based stack shuffler. The new mechanism constructs an explicit plan mapping current stack items to their desired positions in the target layout, executing the plan bottom-up. If an item falls out of reach for standard SWAP or DUP instructions, the shuffler compresses the stack to restore reachability and recalculates a fresh plan.
This structured architecture is significantly easier to maintain and extend. Initial benchmarks demonstrate that the planning shuffler is computationally more efficient than its greedy predecessor while generating bytecode of comparable size. The SSA CFG code generator remains experimental and can be enabled using the command-line flags --experimental --via-ssa-cfg.
Support for the SLOTNUM Opcode
Aligning with upcoming EVM network upgrades, Solidity v0.8.37 adds native support for the Amsterdam EVM version, specifically introducing the SLOTNUM opcode as outlined in EIP-7843. This opcode retrieves the beacon chain slot number of the current block.
Developers can access this feature in Solidity via block.slotnum—which evaluates to a uint64 type—or through Yul and inline assembly using the built-in slotnum() function. The integrated SMTChecker has also been updated to support the new property. These additions are available exclusively when compiling with the --evm-version amsterdam configuration. Starting with the Amsterdam version, slotnum is also established as a reserved identifier within Yul.
Removals and Deprecations
As part of ongoing efforts to reduce compiler bloat and maintain a lean codebase, version 0.8.37 completely removes two features previously restricted to experimental mode in version 0.8.35: Language Server Protocol mode (--lsp) and the Generic Solidity prototype (pragma experimental solidity).
The LSP mode was ultimately retired because language server tooling is better maintained as a standalone ecosystem project rather than tightly coupled directly inside the compiler binary. Similarly, the Generic Solidity prototype—an early precursor to Core Solidity intended to refactor the compiler in place—proved insufficiently flexible. Development has instead shifted entirely to solcore, an independent prototype better suited to architectural experimentation and future production implementations.
Additionally, the experimental ABIEncoderV2 pragma now triggers a formal deprecation warning. This pragma has been redundant since pragma abicoder v2 was introduced in version 0.7.4, and ABI coder v2 became the universal default in version 0.8.0. Although its removal does not strictly require a breaking release since it is a legacy artifact, the deprecation warning provides projects—and older dependencies such as legacy forge-std versions—adequate time to purge the outdated pragma before final removal.
Finally, continuing the deprecation trajectory initiated in version 0.8.31, this release issues deprecation warnings for older EVM target versions—including constantinople, petersburg, istanbul, and berlin—as well as for the SMTChecker’s legacy BMC engine.
How to Install and Upgrade
Developers looking to adopt Solidity v0.8.37 can follow the standard installation documentation hosted on the official Solidity portal. Pre-compiled binaries and release packages are available directly through the project’s GitHub repository under the v0.8.37 release tag.
Teams building the compiler directly from source are strongly advised to avoid utilizing the generic source code archives automatically generated by GitHub. Instead, developers should retrieve the official solidity_0.8.37.tar.gz source tarball or check out the tagged v0.8.37 reference via Git to ensure correct dependency resolution and build integrity.

