Close Menu
  • Cryptocurrency
    • Bitcoin
    • Ethereum
    • Altcoins
    • Blockchain
    • Mining
  • Stocks
  • Forex
  • Personal Finance
  • World Economy
  • AI in Finance
  • Commodities
  • DeFi
  • Fintech
  • NFTs
  • Learn Finance
Trending
  • If Bitcoin Price Doesn’t Hold Take And Hold $69,000 With Momentum, It Could Get Very Bad
  • Announcing the Devcon SEA venue!
  • Why 74% of Large Investors Are Bullish on Crypto Right Now
  • Circle Unveils Gas-Free USDC Nanopayments Enabling $0.000001 AI Transactions
  • Allocation Update – Q1 2024
  • FBI Warns of Fake Token Scam on Tron
  • Trump’s “Ultimatum” Triggers Market Turmoil, Bitcoin Drops 2% — How Can Investors Hedge Risk?
  • Resolv Protocol Stalls With Attacker An Minting 50 Million Unbacked USR Tokens
Facebook X (Twitter) Instagram YouTube
Finance Insider Today
  • Cryptocurrency
    • Bitcoin
    • Ethereum
    • Altcoins
    • Blockchain
    • Mining
  • Stocks
  • Forex
  • Personal Finance
  • World Economy
  • AI in Finance
  • Commodities
  • DeFi
  • Fintech
  • NFTs
  • Learn Finance
Finance Insider Today
Home » Ethereum
Ethereum

Solidity Optimizer and ABIEncoderV2 Bug

Finance Insider TodayBy Finance Insider TodayJune 23, 2025No Comments8 Mins Read
Share
Facebook Twitter LinkedIn Pinterest Email


Table of Contents

Toggle
  • Solidity Optimizer and ABIEncoderV2 Bug Announcement
  • Who ought to be involved
  • verify if contract is susceptible
  • stop these kinds of flaws sooner or later
  • Potential penalties
  • Timeline
  • Technical particulars
    • Background
    • The flaw

Solidity Optimizer and ABIEncoderV2 Bug Announcement

Via the Ethereum bug bounty program, we acquired a report a few flaw inside the new experimental ABI encoder (known as ABIEncoderV2). Upon investigation, it was discovered that the part suffers from a couple of totally different variations of the identical sort. The primary a part of this announcement explains this bug intimately. The brand new ABI encoder remains to be marked as experimental, however we nonetheless suppose that this deserves a outstanding announcement since it’s already used on mainnet.

Moreover, two low-impact bugs within the optimizer have been recognized over the previous two weeks, one in all which was fastened with Solidity v0.5.6. Each had been launched with model 0.5.5. See the second a part of this announcement for particulars.

The 0.5.7 release accommodates the fixes to all bugs defined on this weblog put up.

All of the bugs talked about right here ought to be simply seen in assessments that contact the related code paths, not less than when run with all combos of zero and nonzero values.

Credit to Melonport staff (Travis Jacobs & Jenna Zenk) and the Melon Council (Nick Munoz-McDonald, Martin Lundfall, Matt di Ferrante & Adam Kolar), who reported this through the Ethereum bug bounty program!

Who ought to be involved

When you have deployed contracts which use the experimental ABI encoder V2, then these may be affected. Which means solely contracts which use the next directive inside the supply code will be affected:

pragma experimental ABIEncoderV2;

Moreover, there are a variety of necessities for the bug to set off. See technical particulars additional under for extra info.

So far as we will inform, there are about 2500 contracts dwell on mainnet that use the experimental ABIEncoderV2. It’s not clear what number of of them comprise the bug.

verify if contract is susceptible

The bug solely manifests itself when the entire following circumstances are met:

  • Storage knowledge involving arrays or structs is shipped on to an exterior perform name, to abi.encode or to occasion knowledge with out prior task to a neighborhood (reminiscence) variable AND
  • there may be an array that accommodates components with measurement lower than 32 bytes or a struct that has components that share a storage slot or members of sort bytesNN shorter than 32 bytes.

Along with that, within the following conditions, your code is NOT affected:

  • if all of your structs or arrays solely use uint256 or int256 varieties
  • for those who solely use integer varieties (which may be shorter) and solely encode at most one array at a time
  • for those who solely return such knowledge and don’t use it in abi.encode, exterior calls or occasion knowledge.

When you have a contract that meets these circumstances, and wish to confirm whether or not the contract is certainly susceptible, you’ll be able to attain out to us through security@ethereum.org.

stop these kinds of flaws sooner or later

As a way to be conservative about adjustments, the experimental ABI encoder has been out there solely when explicitly enabled, to permit individuals to work together with it and take a look at it with out placing an excessive amount of belief in it earlier than it’s thought of steady.

We do our greatest to make sure top quality, and have not too long ago began engaged on ‘semantic’ fuzzing of sure elements on OSS-Fuzz (we’ve beforehand crash-fuzzed the compiler, however that didn’t take a look at compiler correctness).

For builders — bugs inside the Solidity compiler are tough to detect with instruments like vulnerability detectors, since instruments which function on supply code or AST-representations don’t detect flaws which are launched solely into the compiled bytecode.

One of the best ways to guard in opposition to these kinds of flaws is to have a rigorous set of end-to-end assessments on your contracts (verifying all code paths), since bugs in a compiler very seemingly are usually not “silent” and as an alternative manifest in invalid knowledge.

Potential penalties

Naturally, any bug can have wildly various penalties relying on this system management move, however we anticipate that that is extra prone to result in malfunction than exploitability.

The bug, when triggered, will beneath sure circumstances ship corrupt parameters on methodology invocations to different contracts.

Timeline

2019-03-16:

  • Report through bug bounty, about corruption induced when studying from arrays of booleans immediately from storage into ABI encoder.

2019-03-16 to 2019-03-21:

  • Investigation of root trigger, evaluation of affected contracts. An unexpectedly excessive rely of contracts compiled with the experimental encoder had been discovered deployed on mainnet, many with out verified source-code.
  • Investigation of bug discovered extra methods to set off the bug, e.g. utilizing structs. Moreover, an array overflow bug was present in the identical routine.
  • A handful of contracts discovered on Github had been checked, and none had been discovered to be affected.
  • A bugfix to the ABI encoder was made.

2019-03-20:

  • Choice to make info public.
  • Reasoning: It will not be possible to detect all susceptible contracts and attain out to all authors in a well timed method, and it could be good to stop additional proliferation of susceptible contracts on mainnet.

2019-03-26:

  • New compiler launch, model 0.5.7.
  • This put up launched.

Technical particulars

Background

The Contract ABI is a specification how knowledge will be exchanged with contracts from the skin (a Dapp) or when interacting between contracts. It helps a wide range of kinds of knowledge, together with easy values like numbers, bytes and strings, in addition to extra advanced knowledge varieties, together with arrays and structs.

When a contract receives enter knowledge, it should decode that (that is performed by the “ABI decoder”) and previous to returning knowledge or sending knowledge to a different contract, it should encode it (that is performed by the “ABI encoder”). The Solidity compiler generates these two items of code for every outlined perform in a contract (and in addition for abi.encode and abi.decode). Within the Solidity compiler the subsystem producing the encoder and decoder known as the “ABI encoder”.

In mid-2017 the Solidity staff began to work on a contemporary implementation named “ABI encoder V2” with the objective of getting a extra versatile, secure, performant and auditable code generator. This experimental code generator, when explicitly enabled, has been provided to customers for the reason that finish of 2017 with the 0.4.19 launch.

The flaw

The experimental ABI encoder doesn’t deal with non-integer values shorter than 32 bytes correctly. This is applicable to bytesNN varieties, bool, enum and different varieties when they’re a part of an array or a struct and encoded immediately from storage. This implies these storage references have for use immediately inside abi.encode(…), as arguments in exterior perform calls or in occasion knowledge with out prior task to a neighborhood variable. Utilizing return doesn’t set off the bug. The kinds bytesNN and bool will end in corrupted knowledge whereas enum would possibly result in an invalid revert.

Moreover, arrays with components shorter than 32 bytes might not be dealt with accurately even when the bottom sort is an integer sort. Encoding such arrays in the way in which described above can result in different knowledge within the encoding being overwritten if the variety of components encoded shouldn’t be a a number of of the variety of components that match a single slot. If nothing follows the array within the encoding (be aware that dynamically-sized arrays are all the time encoded after statically-sized arrays with statically-sized content material), or if solely a single array is encoded, no different knowledge is overwritten.


Unrelated to the ABI encoder subject defined above, two bugs have been discovered within the optimiser. Each have been launched with 0.5.5 (launched on fifth of March). They’re unlikely to happen in code generated by the compiler, except inline meeting is used.

These two bugs have been recognized by way of the latest addition of Solidity to OSS-Fuzz – a safety toolkit for locating discrepancies or points in a wide range of tasks. For Solidity we’ve included a number of totally different fuzzers testing totally different features of the compiler.

  1. The optimizer turns opcode sequences like ((x << a) << b)), the place a and b are compile-time constants, into (x << (a + b)) whereas not dealing with overflow within the addition correctly.
  2. The optimizer incorrectly handles the byte opcode if the fixed 31 is used as second argument. This may occur when performing index entry on bytesNN varieties with a compile-time fixed worth (not index) of 31 or when utilizing the byte opcode in inline meeting.

This put up was collectively composed by @axic, @chriseth, @holiman



Source link

⚠️ Investment Disclaimer
The content published on Finance Insider Today is for informational and educational purposes only. It does not constitute financial advice, investment advice, or any other form of professional advice. Always conduct your own research and consult a qualified financial advisor before making any investment decisions. Finance Insider Today is not responsible for any financial losses resulting from decisions made based on information published on this website. Past performance is not indicative of future results. Financial markets carry significant risk. Never invest more than you can afford to lose.
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Finance Insider Today

Related Posts

Announcing the Devcon SEA venue!

March 23, 2026

Allocation Update – Q1 2024

March 23, 2026

Devcon Scholars Program Returns for Devcon SEA!

March 23, 2026

Ticket launch details, on-chain raffle-auction, and programming tracks revealed

March 23, 2026
Add A Comment
Leave A Reply Cancel Reply

Top Posts

Metaplanet Just Scooped 775 BTC, Now Sits on Nearly $2B in Bitcoin

August 18, 2025

Netflix Censored Bitcoin Sponsors On Boxer Trunks During Jake Paul Vs Anthony Joshua Broadcast

March 11, 2026

Are Cardano (ADA) and Stellar Lumens (XLM) hiding in Bitcoin’s (BTC) institutional shadow? Toobit weighs in

September 5, 2025

‘All Classic Signs of a Top:’ Crypto Analyst Rings Bitcoin (BTC) Alarm

September 20, 2025

Grantee Roundup: November 2020 | Ethereum Foundation Blog

June 5, 2025
CurrencyPrice
UAE Dirham 
UAE Dirham
3.6725
Australian Dollar 
Australian Dollar
1.4383up
Canadian Dollar 
Canadian Dollar
1.3736up
Swiss Franc 
Swiss Franc
0.7896up
Renminbi 
Renminbi
6.9078up
Euro 
Euro
0.8673up
British Pound 
British Pound
0.7522up
Japanese Yen 
Japanese Yen
159.5253up
Malaysian Ringgit 
Malaysian Ringgit
3.9373down
New Zealand Dollar 
New Zealand Dollar
1.7263up
US Dollar 
US Dollar
1
23 Mar · FX Source: CurrencyRate 
CurrencyRate.Today
Check: 23 Mar 2026 07:45 UTC
Latest change: 23 Mar 2026 07:38 UTC
API: CurrencyRate
Disclaimers. This plugin or website cannot guarantee the accuracy of the exchange rates displayed. You should confirm current rates before making any transactions that could be affected by changes in the exchange rates.
⚡You can install this WP plugin on your website from the WordPress official website: Exchange Rates🚀
Categories
  • Altcoins
  • Bitcoin
  • Blockchain
  • Cryptocurrency
  • Ethereum
  • Forex
  • Mining
  • Personal Finance
  • Stocks
  • World Economy
About us

Finance Insider Today is an independent financial news platform covering global markets, cryptocurrency, economy, fintech, and personal finance. Published daily.

Top Insights

If Bitcoin Price Doesn’t Hold Take And Hold $69,000 With Momentum, It Could Get Very Bad

March 23, 2026

Announcing the Devcon SEA venue!

March 23, 2026

Why 74% of Large Investors Are Bullish on Crypto Right Now

March 23, 2026
Categories
  • Altcoins
  • Bitcoin
  • Blockchain
  • Cryptocurrency
  • Ethereum
  • Forex
  • Mining
  • Personal Finance
  • Stocks
  • World Economy
X (Twitter) Instagram YouTube
  • About us
  • Contact us
  • Advertise With Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions
Copyright © 2026 Financeinsidertoday.com All Rights Reserved.

Type above and press Enter to search. Press Esc to cancel.