Skip to content
Access control Audit finding Beginner

ZkSync ACLManager EOA as EMERGENCY_ADMIN

The zkSync ACLManager contract grants the EMERGENCY_ADMIN role to an externally owned account rather than a contract or multisig. If that account's private key were leaked, an attacker could use the emergency powers to grief users or temporarily halt protocol assets.

mhmd_alfa Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

29328 - [SC - Insight] zkSync ACLManager EOA as EMERGENCY_ADMIN

Submitted on Mar 14th 2024 at 03:29:05 UTC by @mhmd_alfa for Boost | ZeroLend

Report ID: #29328

Report type: Smart Contract

Report severity: Insight

Target: https://explorer.zksync.io/address/0x9A60cce3da06d246b492931d2943A8F574e67389

Impacts:

  • Griefing (e.g. no profit motive for an attacker, but damage to the users or the protocol)
  • Temporary freezing of funds for at least 1 hour

Description

Brief/Intro

An EOA 0x0f6e98a756a40dd050dc78959f45559f98d3289d has EMERGENCY_ADMIN role. Leaked private key could lead to griefing and/or malicious halt of the protocol assets.

Proof of Concept

  1. go to https://explorer.zksync.io/address/0x9A60cce3da06d246b492931d2943A8F574e67389#contract
  2. get EMERGENCY_ADMIN_ROLE = 0x5c91514091af31f62f596a314af7d5be40146b2f2355969392f055e12e0982fb
  3. inspect hasRole(0x5c91514091af31f62f596a314af7d5be40146b2f2355969392f055e12e0982fb,0x0f6e98a756a40dd050dc78959f45559f98d3289d) --> true

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

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 emergency admin role was assigned to a single externally owned account instead of a multisig or timelocked contract, so one private key controls emergency powers.

Impact

If the private key were leaked, an attacker could grief users or temporarily freeze funds for at least an hour; the report does not claim any key was actually compromised.

What the attacker needed

Private key of the emergency admin EOA

How it was found

  1. Open the ACLManager contract on the zkSync block explorer.
  2. Read the EMERGENCY_ADMIN_ROLE identifier from the contract.
  3. Call hasRole with that role and the suspected account address and observe it returns true.

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.

A role is a permission inside a smart contract that lets an address do special things. Here that powerful emergency permission is held by a single ordinary wallet (an externally owned account, meaning one private key controls it) instead of a safer setup like a multisig that needs several approvals. If that one key ever leaked, whoever held it could misuse the emergency powers.

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 mhmd_alfa

View all

3 more disclosed reports, best first.

More from ZeroLend

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.