The development team behind Solidity has officially announced the release of Solidity v0.8.37, marking another important milestone for the Ethereum smart contract programming language. While primarily structured as a bugfix and maintenance release, version 0.8.37 addresses several crucial security vulnerabilities, implements important miscompilation patches, introduces early support for the upcoming Amsterdam EVM upgrade, and features substantial internal improvements to experimental components like the SSA CFG code generator.
As smart contract security remains a paramount concern across the decentralized finance and broader blockchain ecosystems, the timely identification and patching of compiler-level anomalies are critical. Version 0.8.37 includes three significant bugfixes—rated low-to-medium and very low severity—alongside adjustments to smaller miscompilation risks that do not strictly classify as direct security vulnerabilities. Through the continued dedication of independent security researchers participating in the Ethereum Foundation’s bug bounty program, these issues have been identified, thoroughly analyzed, and resolved before they could be widely exploited in production environments.
Important Bugfixes
The latest release tackles three prominent issues discovered across different compilation pipelines. The first major fix rectifies a memory byte array element deletion bug reported by developer shaheenfazim through the Ethereum Foundation bug bounty program. When the delete operator was previously applied to an element of a bytes array located in memory, the legacy evmasm compilation pipeline incorrectly wrote 32 zero bytes starting precisely at that designated element. Instead of clearing only the single target byte, the operation produced unintended overflow behavior, overwriting up to 31 subsequent bytes.
Depending on the specific memory layout, these extra zero bytes could corrupt later elements residing within the same array or overwrite data allocated immediately after the array if the targeted element sat near the end. This vulnerability also impacted standard string values that underwent internal conversion to bytes. Notably, the modern IR (Intermediate Representation) pipeline remained entirely unaffected by this flaw, and analogous direct assignment operations, such as setting b[i] = 0, consistently cleared exactly one byte across both compilation pipelines. Solidity versions up to and including 0.8.36 are affected by this bug, prompting developers using the legacy pipeline to prioritize upgrading.
The second critical issue resolved in version 0.8.37 involves a spill slot collision occurring across mutual recursion scenarios. The IR pipeline relies on a stack-to-memory mover to gracefully navigate around the Ethereum Virtual Machine’s strict stack depth limit, achieving this by relocating specific local variables to fixed memory offsets commonly known as spill slots. However, under complex call graph configurations featuring mutual recursion, the compiler occasionally reserved too few slots. Consequently, variables belonging to two distinct functions could be assigned the exact same spill slot even though both variables remained live concurrently. This overlap resulted in one variable being silently overwritten by another.
This newly patched vulnerability is closely related to, though distinct from, the unsound spill issue in mutual recursion that was previously addressed in version 0.8.36. Versions 0.7.2 through 0.8.36 are susceptible when compiled using the --via-ir flag. The discovery was brought to light by Ng Sze Hon via the Ethereum Foundation bug bounty program.
The third important bugfix corrects misordered named parameters when using require statements alongside custom errors within the IR pipeline. Reported by Carl from Cantina Security through the Ethereum Foundation bug bounty program, this anomaly occurred when custom errors constructed with named arguments were passed directly into a require check, such as in the pattern require(condition, MyError(b: 2, a: 1)). Under these specific circumstances, the arguments were incorrectly placed onto the stack following call-site order rather than their official declaration order.
During the subsequent ABI encoding phase, these arguments could be matched with completely wrong parameters, leading the compiler to interpret them as values of entirely different types. While the encoder still generated a structurally valid transaction payload matching the expected error signature, the payload failed to reflect the actual values instantiated by the developer. Because this behavior exclusively affects the revert data of transactions that are already failing and reverting, it poses zero threat to underlying contract state or balances. Nevertheless, developers relying on detailed custom error data for debugging or off-chain transaction tracing will benefit from this correction.
Other Miscompilations
In addition to the primary security fixes, version 0.8.37 resolves two smaller miscompilations that do not constitute direct security vulnerabilities. The first addresses uninitialized internal function pointers within packed storage slots under the evmasm pipeline. When an uninitialized internal function pointer shared a packed storage slot with another variable stored immediately after it, reading the pointer could yield an incorrect value if the trailing variable held a non-zero value. This could lead to unexpected outcomes, such as an equality comparison between such an uninitialized pointer and a default-initialized local function pointer evaluating to false despite neither ever having been explicitly assigned a value.
This anomaly is highly specific, affecting only the legacy evmasm pipeline and leaving actual function calls executed through such pointers entirely unimpacted. Furthermore, developers frequently rely on internal function pointer comparisons cautiously, as Solidity documentation explicitly notes that pointer values depend heavily on exact bytecode generation and lack stability across contract upgrades. The compiler already emits warnings for such comparisons, and future breaking releases plan to disallow them altogether.
The second non-security miscompilation addressed in the release concerns constants read within both checked and unchecked arithmetic contexts under the IR pipeline. Previously, the code responsible for computing a constant’s value was generated only once per contract, utilizing either checked or unchecked arithmetic depending entirely on which use site the compiler encountered first. Subsequent use sites reused this initial code block. Consequently, if a constant’s initializer overflowed its designated type, a read occurring within a checked context could incorrectly omit the mandatory overflow panic, while a read inside an unchecked context could unexpectedly revert due to a spurious check.
Because all operands involved in these constant evaluations are resolved strictly at compile time, the resulting compiled behavior is completely deterministic, entirely independent of transaction input data, and immune to external manipulation by malicious actors. Triggering this edge case requires reading the exact same overflowing constant from both checked and unchecked contexts within a single contract—a pattern anticipated to be exceptionally rare in real-world smart contract development.
Notable Features and Changes
Version 0.8.37 also introduces several forward-looking features, architectural upgrades, and deprecations designed to streamline the Solidity toolchain. On the experimental front, the SSA CFG code generator receives a substantial upgrade to its stack shuffler. Previously relying on a greedy algorithm that applied one local step at a time until reaching a target layout, the compiler now implements a planning stack shuffler. This new architecture precomputes an explicit plan mapping current stack items to their target positions before realizing the plan in a bottom-up fashion. If reachability limitations prevent standard SWAP or DUP execution, the shuffler compresses the stack and generates a fresh plan. Initial benchmarks indicate that this structured approach improves computational efficiency while maintaining comparable bytecode sizes.
Furthermore, the release introduces preliminary support for the SLOTNUM opcode introduced in the upcoming Amsterdam EVM upgrade, as outlined in EIP-7843. This opcode returns the beacon chain slot number associated with the current block. Solidity developers can access this functionality via block.slotnum (typed as uint64), while Yul and inline assembly developers can utilize the new built-in slotnum() function. SMTChecker integration has also been updated to support the new property when compiling with --evm-version amsterdam.
In an ongoing effort to maintain a leaner and more maintainable compiler codebase, version 0.8.37 removes two experimental features introduced in version 0.8.35: the Language Server Protocol mode (--lsp) and the Generic Solidity prototype (pragma experimental solidity). Language server tooling is better suited for standalone architectures rather than tight compiler integration, while the Generic Solidity prototype has been superseded by solcore, an external standalone prototype designed for advanced language experimentation.
Deprecation warnings have also been expanded. The legacy, redundant ABIEncoderV2 pragma now triggers a deprecation warning, paving the way for its eventual removal. Additionally, deprecation warnings are now active for older EVM target versions—specifically constantinople, petersburg, istanbul, and berlin—as well as the SMTChecker’s older BMC engine.
Upgrades can be performed by consulting the official Solidity installation documentation and downloading the latest release binaries directly from the official GitHub repository.






