The development team behind Solidity, the leading smart contract programming language for the Ethereum ecosystem, has officially announced the release of Solidity version v0.8.39. This latest update introduces vital security and correctness bug fixes, adds experimental support for upcoming Ethereum Virtual Machine (EVM) upgrades, and provides critical insights into the future release schedule of the compiler, signaling that version 0.8.39 will likely be the final iteration in the long-standing 0.8.x series before the transition to Solidity 0.9.0.
Among the most significant highlights of the v0.8.39 release is the resolution of a medium-severity bug that could silently corrupt contract storage. Discovered and reported by security researcher cyberthirst through the Ethereum Foundation’s bug bounty program, the vulnerability specifically affected recursive structs—data structures capable of containing values of their own type, such as a hypothetical Node struct housing an array of child nodes alongside other data variables.
According to the compiler team’s analysis, the corruption materialized when such a recursive struct, or an array containing these structures, was copied within storage to a location that overlapped with the source data. Common examples of this pattern include assignments such as "root = root.children[0]" or "roots = roots[0].children," where "root" represents a single recursive struct and "roots" represents an array of them. Because the underlying storage write operation began before the source data had finished reading, the overlapping memory boundaries caused nested elements to vanish entirely, while any members declared after the affected array were unexpectedly reset to zero. Crucially, the compiler emitted no errors or warnings during this process, leaving developers unaware of the silent data corruption occurring under the hood.
The vulnerability impacted both the legacy evmasm pipeline and the newer IR-based compilation pipeline, independent of optimizer settings or target EVM versions. Specifically, versions 0.4.9 through 0.8.38 were vulnerable under the evmasm pipeline, while versions 0.8.13 through 0.8.38 were affected within the IR pipeline. To neutralize the threat, the v0.8.39 update introduces an explicit runtime check to every storage-to-storage copy operation involving recursive structs or arrays of recursive structs.
While this runtime check effectively prevents silent data corruption, it comes with minor trade-offs. The newly introduced check incurs a slight increase in gas costs, even in scenarios where the source and target locations do not overlap. Furthermore, because the validation process consumes stack space while navigating target structures, copies directed into deeply nested storage targets may hit stack limits at shallower depths than previously experienced. For instance, in one test case compiled using the via-ir pipeline alongside the optimizer enabled, the maximum nesting depth dropped significantly from 252 levels down to 126. To gauge the real-world impact of this vulnerability, the development team scanned verified smart contracts hosted within the Sourcify database and confirmed that no currently deployed contracts appeared to execute an affected copy operation.
In addition to the recursive struct fix, the release addresses another miscompilation issue within the evmasm pipeline concerning nested tuple assignments. Under specific, rare circumstances, tuple assignments could assign values to incorrect variables. This anomalous behavior occurred when a nested tuple on the right-hand side of an assignment expression paired a string literal alongside another value, with the literal subsequently targeted for assignment to a bytes32, bytes, or string variable. For example, given variables of type bytes32 z and uint256 a, an assignment structured as "((z, a), b) = (("x", 111), 222)" would erroneously assign the numerical value 111 to the bytes32 variable z, while assigning the string literal converted to bytes32 to the uint256 variable a.
The Solidity team noted that no warning or error was flagged during this miscompilation, though they emphasized that the issue is not considered a security risk. The coding pattern required to trigger the bug is exceptionally unusual and highly unlikely to appear in production code. Nested tuple assignments are primarily utilized to capture multiple return values from function calls, and standard Solidity function calls cannot return string literals directly. Furthermore, extensive testing and runtime handling of memory or calldata references typically catch resulting type mismatches or trigger out-of-gas reverts.
Moving beyond bug fixes, Solidity v0.8.39 introduces notable features and alignment updates for upcoming Ethereum network upgrades. When compiling code with the experimental flag "–evm-version amsterdam," the compiler now triggers proactive warnings if contract code size exceeds 64 KiB or if initcode exceeds 128 KiB. These thresholds align with Ethereum Improvement Proposal (EIP) 7954, which scales up the historical EIP-170 contract code limit from 24 KiB to 64 KiB, and EIP-3860, which elevates the initcode limit from 48 KiB to 128 KiB. For all other EVM versions—including the current default, Osaka—the compiler continues to enforce the legacy limits. Support for the Amsterdam EVM version remains strictly experimental. Additionally, the compiler now issues code size warnings when processing standalone Yul code, matching the behavior long established for standard Solidity source files.
Experimental tooling has also received an update in this release. By passing the "–ethdebug-resources" flag alongside "–experimental," developers can instruct the compiler to emit the full "info/resources" schema defined by the ethdebug format. This structured schema describes complex types and their precise memory and storage layouts directly to external debugging tools, marking an essential prerequisite for propagating rich debugging metadata through the Yul intermediate representation.
Perhaps the most talked-about aspect of the v0.8.39 release announcement centers on the strategic roadmap for Solidity 0.9.0. For years, the community anticipated version 0.9.0 as a monumental, sweeping breaking release that would finally establish the IR pipeline as the default compilation path. Because of this long-held expectation, many developers anticipated that migrating to 0.9.0 would require extensive refactoring of existing codebases.
However, the core development team has revised its release philosophy. While transitioning the default backend to the IR pipeline and the SSA CFG code generator remains a top priority, these architectural shifts are no longer rigidly tied to version 0.9.0. Developers noted that waiting exclusively for major pipeline milestones had inadvertently delayed other necessary breaking improvements. Moving forward, the Solidity team intends to issue breaking releases more frequently while keeping individual updates smaller and more manageable.
Under this new cadence, version numbers alone will no longer serve as an indicator of the scope of breaking changes contained within a specific release. This iterative approach allows maintainers to systematically prune legacy features that were preserved throughout the lengthy 0.8 development cycle. Many of the changes already merged into the upcoming 0.9.0 branch focus on removing long-deprecated elements, such as ABI coder v1, virtual modifiers, the legacy ABIEncoderV2 pragma, the SMTChecker’s BMC engine, and EVM versions predating Constantinople. The team plans to release a public pre-release version of 0.9.0 to allow developers to test compatibility ahead of the final rollout.
Developers seeking to adopt Solidity v0.8.39 can follow the comprehensive installation instructions provided in the official Solidity documentation. The release binaries and source code packages are hosted directly on the project’s GitHub repository. Maintainers advise developers building from source to bypass automatically generated GitHub source archives and instead utilize the official verified source tarball or check out the tagged v0.8.39 release via git to ensure build integrity.

