-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 0xCERT Security Advisory 0xCERT-2026-0377 ============================================================ Advisory-ID: 0xCERT-2026-0377 Severity: Medium Published: 2026-11-19T00:00:00.000Z Updated: 2026-11-19T09:07:18.022Z Chains: Ethereum URL: https://www.0xcert.com/advisory/0xCERT-2026-0377 Title: Solidity compiler bug SOL-2026-8: Overlapping Recursive Storage Struct Copy Corruption Summary - ------- Overwriting a recursive struct in storage with a struct nested inside it could silently corrupt storage. Affects 0.4.9 ≤ solc < 0.8.39. Details - ------- Summary Overwriting a recursive struct in storage with a struct nested inside it could silently corrupt storage. Details A recursive struct refers to its own type through a mapping or a dynamically-sized array. This bug affected the dynamically-sized array case. In storage, such a struct can contain other structs of the same type as elements of its array. When the target of a storage-to-storage copy contained the source, the copy silently produced incorrect values. A storage struct is copied member by member in declaration order, and a storage array element by element. Copying the array member resized the target's array and rewrote or cleared its data area, which destroyed the source before the copy had finished reading it. The elements nested in the source were therefore lost, and any source member read after the array copy came back zeroed. The position of the array member in the struct only determined which other members were copied before it and therefore survived. The affected operations were struct assignment and array assignment in which the target contained the source. Copies in the opposite direction, i.e., source containing the target, were not affected: they failed through unbounded recursion and still do. Both the evmasm and IR pipelines were affected, independently of optimizer settings. Affected - - Solidity compiler (solc), 0.4.9 ≤ solc < 0.8.39 Severity Medium (upstream rating: "medium"). Recommended actions - - Contracts compiled with an affected solc version: check whether the conditions apply to your code; recompile with solc 0.8.39+ - - Auditors: add this bug to version-specific checklists Source & attribution This 0xCERT advisory summarises Solidity compiler bug SOL-2026-8 (OverlappingRecursiveStorageStructCopyCorruption) from the Solidity team's bug list: https://blog.soliditylang.org/2026/11/19/overlapping-recursive-storage-struct-copy-corruption-bug/. References - ---------- - - https://blog.soliditylang.org/2026/11/19/overlapping-recursive-storage-struct-copy-corruption-bug/ - - https://github.com/ethereum/solidity/blob/develop/docs/bugs.json Verify with the 0xCERT OpenPGP key: https://www.0xcert.com/pgp.asc Fingerprint: 5F94 3ED1 1E50 CF31 2128 C493 CCC7 D9EC 9415 723D -----BEGIN PGP SIGNATURE----- wrsEARYKAG0Fgmr/ZiQJEDe9Tbcr+ZxrRRQAAAAAABwAIHNhbHRAbm90YXRp b25zLm9wZW5wZ3Bqcy5vcmdx0vDxOx62a9Moji2y8KT3m5MqFRbh400Lmn5L DBLPwBYhBGCkkFZbJcT5QWu27ze9Tbcr+ZxrAABX8gD9FouzeDYAfa6dXTdS K/rFuS2EUCfGp/O1cQYDnT+da1MBAKIxjnrKHOuPpM825bqZt0Mclgih9FR0 Hnxuia2X0gYM =jIGa -----END PGP SIGNATURE-----