NEAR Intents Postmortem Traces $3.8 Million Exploit to Deposit-Notification Bug

2 min read
NEAR Intents Postmortem Traces $3.8 Million Exploit to Deposit-Notification Bug
PrimeXBT Editorial Team
Reviewed by PrimeXBT

Topics in article

A deposit-notification bug let an attacker withdraw $3.8 million from NEAR Intents before its Oct. 1 shutdown, according to a newly published postmortem. The protocol says the attacker returned the funds and that it has removed the feature after another critical vulnerability report.

NEAR Intents says a deposit-notification bug let an attacker withdraw $3.8 million before the protocol shut down on Oct. 1. The postmortem, published Oct. 16 by general manager Alex Shevchenko, says the attacker returned the full amount within 36 hours of detection. All affected users were made whole, it says.

NEAR Intents enables cross-chain swaps. Its public settlement contract on NEAR keeps an internal ledger of deposited tokens, and withdrawals move tokens out through bridges.

Refunded deposits still counted as funds

According to Shevchenko, the vulnerable feature notified third-party contracts when tokens were deposited. The attacker built a contract that deliberately failed those notifications, so the token contract refunded the deposit while NEAR Intents kept the corresponding ledger credit.

Across 23 failed deposit transactions, the attacker accumulated $3.8 million in unbacked balances, which the postmortem calls "ghost funds." The attacker then withdrew real tokens against those balances and moved them to other chains through Omni infrastructure, the report says. Shevchenko wrote that the flaw sat in the NEAR Intents contract, not in the Omni infrastructure.

The report dates the withdrawals from Sept. 29 through Oct. 1. The settlement contract was paused and reopened on Oct. 1, but affected routes stayed suspended and reopened gradually over the following days. Contract-side deposits resumed Oct. 2, according to the timeline.

A missing balance check

The exploit went undetected because monitoring compared assets on their origin chains with total NEAR-side token balances. It did not compare users' aggregate internal balances with the tokens the Intents contract actually held, the postmortem says.

The team says it has added that missing check and an automatic contract pause if the balances diverge.

A fix for the October exploit was deployed Oct. 2, but another critical bug report in the same feature prompted its complete removal on Oct. 7. Shevchenko said the team awarded the researcher $300,000.

Source: The Defiant

Trading involves risk.

Most traded markets

XAU / USD
-0.22% 4,161.30
CRUDE
+2.7% 100.744
BTC / USD
-1.04% 81,206.2
EUR / USD
+0.07% 1.12286
USTEC
-2.43% 29,196.59
NFLX
-2.26% 69.98
View all markets

Author

PrimeXBT
Our Editorial Team consists of leading experts with a proven record in the fields of trading, cryptocurrencies, blockchain and finance. We thoroughly research the sources of information in order to provide readers with quality content that serves edu...
Read author’s articles
Alert Triangle Risk Disclaimer
Disclaimer: Some past publications may be outdated. We recommend following our news to stay up to date with the latest information. For any questions, feel free to contact our support team via the chat below.
The content provided here is for informational purposes only. It is not intended as personal investment advice and does not constitute a solicitation or invitation to engage in any financial transactions, investments, or related activities. Past performance is not a reliable indicator of future results.
The financial products offered by the Company are complex and come with a high risk of losing money rapidly due to leverage. These products may not be suitable for all investors. Before engaging, you should consider whether you understand how these leveraged products work and whether you can afford the high risk of losing your money.
The Company does not accept clients from the Restricted Jurisdictions as indicated in our website/ T&C. Some services or products may not be available in your jurisdiction.
The applicable legal entity and its respective products and services depend on the client’s country of residence and the entity with which the client has established a contractual relationship during registration.

Today in markets

Browse Crypto News

Register Now

Trading involves risk

Get started in minutes

Our clients love how fast and simple our sign-up is. It takes just a few minutes to get started!

Get Started Get Started
Get started in minutes

Need Help?

Risk Warning:
Trading in leveraged products carries a high level of risk and may not be suitable for all investors.