Delegatecall Vulnerability
Pronunciation: DEL-ih-gayt-kawl vul-nur-uh-BIH-lih-tee
Definition
A delegatecall vulnerability lets external contract code execute in the caller's storage context and corrupt state, privileges, or upgrade control. For Delegatecall Vulnerability, an attempted action, a detected indicator, a confirmed compromise, and a realized loss are separate states that require different evidence and response.
Overview
Meaning and scope
A delegatecall vulnerability lets external contract code execute in the caller’s storage context and corrupt state, privileges, or upgrade control. For Delegatecall Vulnerability, an attempted action, a detected indicator, a confirmed compromise, and a realized loss are separate states that require different evidence and response.
Mechanism and operation
In EVM systems, delegatecall executes another contract’s code while preserving the caller’s address, storage, balance context, and original caller information. This enables proxy patterns and reusable libraries but grants the target code powerful influence over caller state. Vulnerabilities arise from untrusted target addresses, incompatible storage layouts, unsafe initialization, selector collisions, compromised implementations, or upgrade authorization failures. Malicious code can overwrite owners, implementation slots, balances, or other critical variables. Developers should restrict targets, use standardized proxy layouts, lock initializers, separate upgrade authority, review storage changes, and test every implementation transition. Delegatecall extends the caller’s authority to external code, making target trust, storage compatibility, initialization, and upgrades security-critical.
Practical payment example
An upgradeable payment contract executes external logic in its own storage context. Auditors test whether a malicious implementation could overwrite owner slots or drain escrowed assets.
Operational checks
Assessment of Delegatecall Vulnerability should trace delegatecall vulnerability lets external contract code execute in the caller’s storage context and corrupt state, privileges, or upgrade control from prerequisite and entry point through observable impact on the affected service. Prevention, detection, containment, and recovery for the Delegatecall weakness should be tested against the architecture associated with privileges, and upgrade control.
Distinctions and limits
Verification must inspect the active implementation and proxy configuration rather than only the visible proxy address. A theoretical weakness or scanner result involving privileges, and upgrade control should not be reported as exploitation without corroborating logs, transactions, or configuration evidence.
Related reading
Related definitions: Vulnerabilities, authorization.
Example
An upgradeable payment contract executes external logic in its own storage context. Auditors test whether a malicious implementation could overwrite owner slots or drain escrowed assets.
Comparison
Verification must inspect the active implementation and proxy configuration rather than only the visible proxy address. A theoretical weakness or scanner result involving privileges, and upgrade control should not be reported as exploitation without corroborating logs, transactions, or configuration evidence.
Key Takeaway
Delegatecall extends the caller's authority to external code, making target trust, storage compatibility, initialization, and upgrades security-critical.
Sources
- NIST Documentation: Cyberframework — NIST (2026-07-30)