Skip to content
Access control Audit finding Intermediate

Admin Can Break All Functionality Through Weth Address

The protocol's WETH address is used throughout its functionality, and if the admin mistakenly sets it to an incorrect address, users cannot claim rewards. An attacker with admin privileges could break the protocol by setting the WETH address to a wrong value.

defsec Follow

Originally disclosed on Code4rena

Submitted by defsec

On the protocol, almost all functionality is constructed through WETH address. However, if the admin is set to WETH address mistakenly, user could not claim through Comptroller.sol#L1381. Admin can break the protocol.

Proof of Concept

https://github.com/Plex-Engineer/lending-market-v2/blob/main/contracts/Comptroller.sol#L1479

Recommended Mitigation Steps

Set WETH address through initializer or change it through governance.

nivasan1 (Canto) disputed and commented:

The admin of the lending-market and LP will be cosmos-sdk governance, vis-a-vis, the community, as such it is expected that a malicious governance proposal will not be passed.

Alex the Entreprenerd (judge) commented:

Similarly to findings about admin re-initializing contracts, the warden has shown how, because the WETH address can be changed, accounting and functionality of the protocol and it’s interactions (in this case emission of rewards and all lending operations triggering a transfer of “COMP”), can be bricked.

Because this is contingent on malicious governance, I believe Medium Severity to be appropriate.


The original report as published on Code4rena, by defsec. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the WETH address is stored in a mutable variable that the admin can change without validation, and many functions depend on it being correct.

What the attacker needed

Admin privileges; malicious governance proposal

The fix

The WETH address should be set through an initializer or changed only through governance.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This is a smart contract protocol where an admin can change a key address (the WETH address) that many functions rely on. If that address is set incorrectly, important actions like claiming rewards stop working. The report says an admin could deliberately or accidentally break the system this way.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by defsec

View all

16 more disclosed reports, best first.

More from Canto v2 contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.