Skip to content

Instantly share code, notes, and snippets.

@davidpius95
davidpius95 / Finding.md
Created July 29, 2022 00:32
Vulnarability Findings

1

issue:

* Delegatecall to Untrusted Callee

Severity:

* High

Context:

* https://github.com/spearbit-audits/writing-exercise/blob/de45a4c5b654710812e9fa29dde6e12526fe4786/contracts/Implementation.sol#L17

Description of the attack:

* There exists a special variant of a message call, named delegatecall which is identical to a message call apart from the fact that the code at the target address is executed in the context of the calling contract and msg.sender and msg.value do not change their values. This allows a smart contract to dynamically load code from a different address at runtime. Storage, current address and balance still refer to the calling contract.