Versions 0.8.19 to 0.8.37 are affected, only with the Yul optimizer enabled. With --via-ir, any code may be affected.
The fix changed no bytecode in verified contracts on Sourcify, which suggests the bug is very rare.
Full write-up and how to check:
https://soliditylang.org/blog/2026/10/22/yul-optimizer-knowledge-base-stale-bookkeeping-bug/
Solidity Programming LanguageYul Optimizer Knowledge Base Stale Bookkeeping Bug | Solidity Programming LanguagePosted by Solidity Team on October 22, 2026