PoolTogether - dev0cloo's results

A protocol for no-loss prize savings

General Information

Platform: Code4rena

Start Date: 07/07/2023

Pot Size: $121,650 USDC

Total HM: 36

Participants: 111

Period: 7 days

Judge: Picodes

Total Solo HM: 13

Id: 258

League: ETH

PoolTogether

Findings Distribution

Researcher Performance

Rank: 83/111

Findings: 1

Award: $22.96

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Awards

22.9603 USDC - $22.96

Labels

bug
2 (Med Risk)
downgraded by judge
satisfactory
duplicate-300

External Links

Lines of code

https://github.com/GenerationSoftware/pt-v5-vault/blob/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/Vault.sol#L282

Vulnerability details

Impact

When a vault is initialized, it sets Max Token Approval for the Yield Vault which allows the Yield Vault to ALWAYS have access to the funds in the vault. Since vaults can be created by anyone as long as they provide an ERC-4626 compliant yield source, an attacker could set up a malicious ERC-4626 contract and set that as the yield source for a newly created Vault. The attacker could then have the malicious contract use SafeTransferFrom to periodically empty the vault of assets that haven't yet been sent to the malicious yield vault.

Proof of Concept

https://github.com/GenerationSoftware/pt-v5-vault/blob/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/Vault.sol#L282

Tools Used

Manual review

Vaults should only approve tokens when they are being transferred out.

Assessed type

Token-Transfer

#0 - c4-judge

2023-07-16T10:28:49Z

Picodes marked the issue as duplicate of #324

#1 - c4-judge

2023-08-06T10:44:49Z

Picodes changed the severity to 2 (Med Risk)

#2 - c4-judge

2023-08-06T10:45:18Z

Picodes marked the issue as satisfactory

Findings Information

Awards

22.9603 USDC - $22.96

Labels

bug
2 (Med Risk)
satisfactory
duplicate-300

External Links

Lines of code

https://github.com/GenerationSoftware/pt-v5-vault/blob/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/Vault.sol#L254

Vulnerability details

Impact

Since vaults can be created by anyone as long as they provide an ERC-4626 compliant yield source, an attacker could set up a malicious ERC-4626 contract and set that as the yield source for a newly created Vault. The attacker could then have the malicious contract use revert whenever a withdraw call is made to it.

Proof of Concept

https://github.com/GenerationSoftware/pt-v5-vault/blob/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/Vault.sol#L254

Tools Used

Manual Review

Assessed type

DoS

#0 - c4-judge

2023-07-16T21:47:39Z

Picodes marked the issue as duplicate of #324

#1 - c4-judge

2023-08-06T10:45:12Z

Picodes marked the issue as satisfactory

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter