Open hats-bug-reporter[bot] opened 2 months ago
In setUp()
set the requiredNumberOfVouches
to 1, actually copy pasted from previous report so forgot to change it.
In description I wrote : "... even after someone else claimed it already", here 'claimed' means not fully claimed, I wanted to say: even after someone else called claimHumanity()
for this humanityId already.
Additionally, although it is visible I did not mention it in report so mentioning here, it is a front running attack where the front run is done just after challenge period ends, here front run is only required if the claimer calls the executeRequest()
little after challenge period ends, if claimer does not do that then front running is not required.
At the end of the test we can confirm that the owner of the dirtyId
is the malUser
:
(, , , , address owner2, ) = poh.getHumanityInfo(dirtyId);
assertEq(owner2, malUser, "MalUser is not owner!");
- We are assmuning there is no dispute.
If two users are claiming the same Humanity ID, one of them is necessarily wrong. Per contest rules are excluded: Issues about challengers missing some invalid profile submissions/removals (for the purpose of this review, we will assume challengers are perfect and omniscient and that they always challenge invalid actions before the deadline).
Even without that, I don't see why he would lose his deposit as if the first user called execute request for both, the deposit would have been reimbursed there.
- We are assmuning there is no dispute. If two users are claiming the same Humanity ID, one of them is necessarily wrong. Per contest rules are excluded: Issues about challengers missing some invalid profile submissions/removals (for the purpose of this review, we will assume challengers are perfect and omniscient and that they always challenge invalid actions before the deadline).
Even without that, I don't see why he would lose his deposit as if the first user called execute request for both, the deposit would have been reimburse there.
But by doing this the attacker can DOS the user to get humanity of his choice. Should not it be considered as low severity? 🤔
But by doing this the attacker can DOS the user to get humanity of his choice. Should not it be considered as low severity? 🤔
This report hasn't been able to demonstrate that.
There is only one person who can claim a specific humanity (not from a code point of view, but from a registration rule point of view).
As per the competition rules, are excluded: Issues about challengers missing some invalid profile submissions/removals (for the purpose of this review, we will assume challengers are perfect and omniscient and that they always challenge invalid actions before the deadline).
So if you need to have a challengeable profil not challenged (we assume challenger challenge invalid requests) for the vulnerability to work, it is not a vulnerability.
Github username: -- Twitter username: itsabinashb Submission hash (on-chain): 0xacee50e90397527cb53e289f6428f9902f3146dcc588a6d449d179f65adfe116 Severity: high
Description: Description
As after expiration of a humanityId the ownership is not removed the previous owner can use it to renew his Humanity even after someone else claimed it already, which results to loss of funnds of the user who claimed this humanity.
Attack scenario
There is malicious user whose Humanity has expired.
One normal user used this humamityId to claim humanity. He called claimHumanity() with that humanityId.
The malicious user still is the owner of that humanityId.
Malicious user called renewHumanity(), got vouched & called advanceState().
Now the normal user calls the advanceState.
Till now everything is okay.
We are assmuning there is no dispute.
Now malicious user called the executeRequest() for both request ids - one of him and another of normal user before the normal user. Now he is Human.
Now if the normal user call the executeRequest() with his requestId the call will because request is already executed . As result he lost all his deposit.
Proof of Concept (PoC) File Initialize foundry, follow the instruction here. Create a folder named Test & create a file called poh.t.sol. Then paste this in that file: