On February 11, 2026, blockchain security firm Hexens reported a significant bug in the Solidity code generator that impacts compiler versions 0.8.28 through 0.8.33 when utilizing the Intermediate Representation (IR) pipeline. The vulnerability causes the compiler to emit incorrect execution opcodes when a smart contract clears both a persistent storage variable and a transient storage variable of matching types. Specifically, the compiler generates an erroneous sstore instead of tstore, or vice versa, for one of the clear operations. This occurs because the internal Yul helper functions generated during compilation share identical names, resulting in one function overwriting the other in the compiler’s output.
The development team behind Solidity has assigned a high severity rating to this bug on their internal scale. However, comprehensive cross-chain analyses across all Ethereum Virtual Machine (EVM)-compatible networks have successfully identified only three deployed smart contracts matching the exact vulnerable pattern. The respective development teams responsible for these contracts have been promptly notified, and appropriate mitigation measures have been deployed to address any potential security risks. Developers whose projects incorporate the --via-ir compilation flag and invoke the delete operation on transient storage variables are strongly advised to review their codebases immediately.
Importantly, the legacy evmasm compilation pipeline remains entirely unaffected by this flaw, as it does not rely on the same Yul code generation mechanism. Furthermore, because the --via-ir flag is not enabled by default within Solidity project configurations, development teams that have not explicitly opted into using the IR pipeline are completely safe from this issue. The vulnerability has been officially patched in Solidity version 0.8.34, rendering all versions from 0.8.28 through 0.8.33 vulnerable if other trigger conditions are simultaneously met.
Which Contracts Are Affected?
For a smart contract to be vulnerable to this naming collision bug, specific conditions must align during the compilation process. Codebases that do not invoke the delete operation on a transient state variable are entirely unaffected by the vulnerability. It is worth noting that explicitly assigning a zero value to a variable—such as writing _lock = 0—operates differently and does not involve the shared clearing helper function, meaning it will not trigger the compiler bug.
The underlying mechanism of the collision relies on how data types are matched. The naming conflict occurs when two separate clearing operations—one targeting persistent storage and the other targeting transient storage—produce the same internal helper function name because they clear matching Solidity value types. Crucially, the persistent variable does not need to be declared using the exact same primitive type as the transient variable. It is sufficient for a matching value type to be nested somewhere within the persistent structure, such as acting as a struct member or an element within an array.
On the transient side of the equation, there is precisely one code path capable of producing the tstore variant: the invocation of delete on a transient state variable. Because Solidity does not currently support transient arrays, complex mappings, or nested structs, this operation invariably targets a fundamental value type. Conversely, the persistent side can trigger the sstore variant through a broader array of clearing mechanisms, including deleting persistent state variables, clearing elements within persistent arrays, or resetting struct members.
Cross-type collisions can also emerge through array clearing mechanics. Clearing operations on arrays are typically executed at a slot granularity, treating every storage slot uniformly as a uint256 rather than clearing individual elements one by one. Consequently, operations like deleting a boolean array, a fixed-size address array, or a multi-dimensional integer array all utilize the exact same underlying clearing helper as a standard uint256 variable, ignoring the actual declared element type. For example, a contract housing a bool[] _flags array alongside a uint256 transient _temp variable will experience a collision between array clearing and transient deletion, despite their dissimilar declared types.
However, this slot-granularity expansion behavior does not apply to array pop operations, which correctly respect the actual element type, nor does it apply to struct member clearing for members occupying less than 32 bytes, which rely on direct sstore(slot, 0) instructions that bypass the shared helper functions altogether.
The two sides of the collision do not need to reside within the exact same contract file to manifest. A base contract containing a transient variable combined with a derived contract containing a persistent variable or mapping with a matching value type can successfully trigger the bug. Similarly, clearing operations embedded inside free functions or external library functions utilized by the contract can contribute to the naming collision. Both clearing operations must ultimately be present within the same Yul object during compilation. A delete statement restricted strictly to creation code, such as inside a constructor, will not interact with a delete statement residing in deployed runtime code because the compiler treats them as distinct Yul objects with independent sets of helper functions.
The Bug
The root cause of the issue stems from how the IR pipeline handles reusable Yul helper functions during code generation. These helpers are deduplicated by name, meaning there can only be a single Yul function associated with any given identifier. Therefore, the function name must theoretically encode all necessary behavioral nuances.
The helper responsible for clearing storage slots derives its name purely from the Solidity type being cleared—such as storage_set_to_zero_t_address for an address type—without accounting for the underlying storage category. Persistent and transient storage operations generate identical function names for identical types. Because only one function can exist for a given name, the specific clearing operation encountered first by the compiler determines the final implementation. If a persistent clearing operation is processed first, the generated function uses an sstore opcode. If a transient delete statement is encountered first, it emits a tstore opcode, forcing any subsequent operation to reuse the existing function with the incorrect opcode.
The processing order is governed by how the compiler traverses function bodies and syntax tree structures, driven primarily by function selectors and code organization. The optimizer stage cannot alter this ordering because it operates strictly as a subsequent pipeline phase after code generation concludes. The implemented fix resolves this by explicitly incorporating data storage locations directly into the clearing helper’s function name, producing completely distinct Yul functions for persistent and transient operations.
Examples
Simplified smart contract examples clearly illustrate the dual directions of the bug. In the first scenario, where a persistent clearing operation is encountered first, a contract containing a persistent mapping deletion delete delegates[id] is processed before a transient variable deletion delete _lock. The compiler generates storage_set_to_zero_t_address using an sstore instruction. When the transient lock is later cleared, it reuses the persistent function, erroneously emitting an sstore to persistent slot zero instead of updating transient storage, which overwrites the contract’s owner state variable with zero and leaves the transient lock permanently engaged.
In the second scenario, where a transient delete is encountered first, the transient variable deletion delete _caller is processed initially, generating the helper function with a tstore opcode. When a subsequent persistent mapping deletion delete approvals[id] is compiled, it reuses this transient helper, executing a tstore instead of an sstore. Consequently, the approval is cleared from transient storage rather than persistent storage, leaving the persistent approval intact on-chain.
Severity Assessment and Precautions
The compiler emits no warnings when this collision occurs, and the resulting code does not trigger runtime execution reverts. Instead, the flawed storage operations manifest as unexpected state modifications, complicating debugging efforts. Nevertheless, projects thoroughly testing their codebases with the --via-ir flag enabled prior to deployment generally uncover aberrant behaviors during testing phases.
Following the initial disclosure, a comprehensive cross-industry coordination effort was launched to identify deployed contracts matching the vulnerable pattern across EVM networks. This initiative was executed with the critical assistance of SEAL 911, Etherscan, Dedaub, and Hexens. The search successfully pinpointed three affected contracts, and the respective development teams were notified. None of these contracts were tied to public production applications interacting with external users, and the financial risk was minimal.
The Solidity core team has verified that no other compiler helper functions share this specific vulnerability, and upcoming refactoring efforts aim to insulate the compiler codebase from similar architectural risks. Developers seeking to determine whether their projects are impacted can compare unoptimized Yul outputs generated using the --ir flag between vulnerable compiler versions and version 0.8.34, inspecting the generated helper function names and call sites for discrepancies. Upgrading projects to Solidity 0.8.34 or later provides an immediate and complete resolution to the vulnerability.

