CVE Index中文
L3 · ShartedSolidity · compiler · storagesolidity-recursive-storage-copy

The copy overwrites its own source

Solidity fixes silent storage corruption when copying a nested recursive struct onto its ancestor

Solidity 0.8.39 fixes recursive storage copies that erase source data while copying it onto an enclosing struct or array. Both compiler pipelines are affected, regardless of optimizer or EVM settings. Solidity found no affected deployed copy in its Sourcify scan.

Disclosed
Nov 19, 2026
Public disclosure date
Severity
Sharted
No CVE: a breach, not a bug
Splash zone
evmasm 0.4.9–0.8.38 or IR 0.8.13–0.8.38; recursive storage copy whose target contains its source
solidity
In the wild
Unknown
Solidity found no affected deployed copy in Sourcify; exploitation is not established.

What happened

A recursive storage structure copied from a descendant onto an enclosing ancestor can overwrite the source before finishing the read. The result silently loses nested values and can zero later fields. The target must contain the source through a recursive dynamic array, and the corrupted result must become observable. Direct and mutual recursion are covered; a non-recursive struct is outside scope. Storage aliasing can hide the overlap. This does not depend on optimizer settings or the EVM version.

The evmasm pipeline is affected from 0.4.9 through 0.8.38; the supported IR pipeline from 0.8.13 through 0.8.38. Earlier experimental IR builds also contained the bug. Version 0.8.39 snapshots the source when needed. It adds a check to all recursive storage-to-storage copies, increasing gas use and potentially reducing attainable nesting depth.

Solidity rates the flaw medium: consequences could include corrupted balances or permission checks, but the pattern is unusual. Its Sourcify scan found no deployed contract performing an affected copy. That is a bounded scan result, not proof every deployed contract is safe or evidence of theft. L3 reflects a mainstream compiler and public reproducer. No loss or in-the-wild exploitation is established. The release’s separate nested-tuple miscompilation is not classified as a security issue by Solidity.

Fixed versions

ProductSafe fromNote
Solidity0.8.39Both pipelines fixed; compiler update alone does not replace deployed bytecode

Crime-scene timeline

  1. Apr 22, 2026

    cyberthirst privately reports the compiler bug

    The initial PoC covers struct copies; Solidity also identifies the array-copy case.

  2. Nov 19, 2026

    Solidity discloses the issue and releases 0.8.39

    The team rates it medium and reports no affected deployed copy in its Sourcify scan.

Who said what

We list each claim and who made it. Primary sources (the vendor, the researcher, the registry) are marked. Where reports disagree, we grade by the worst credible case.