Open hats-bug-reporter[bot] opened 2 weeks ago
Indeed, it is possible to claim a humanity not corresponding to your address if you already had this humanityId previously (note that you could have it on another chain, this is why we shouldn't check this humanityId has ever been used as it could have been used on another platform).
Therefore, this isn't checked at code level, but checked by challengers. As per the PoH Registry Policy:
The default humanity being the bytes20 of your address.
So if you try to register with the humanityId of someone else, your request should be denied.
After double checking it appears that the registration rules themselves do not define what is the default Humanity ID(you would have to read the comments of the smart contract to make sense of the "default Humanity ID") so we'll change that and attribute a Low reward (it doesn't really fit the scope but since we end up doing a change we should reward, the reward will be added to the total pool to ensure it cannot lead to someone finding vulns in scope getting less).
Github username: -- Twitter username: -- Submission hash (on-chain): 0xb8fdbe65424eb007daea82fa0c63224f01bd2c8c730a98a5dd6652c670671dfa Severity: medium
Description: Description\ The
claimHumanity
function in the ProofOfHumanity.sol contract does not verify that the provided _humanityId corresponds to the caller's address. This oversight can potentially allow a malicious user to observe the mempool and call the claimHumanity function with a specific _humanityId before the legitimate user does. This affects the accountHumanity mapping, associating the malicious actor's address with the _humanityId._requestHumanity Function:
Attack Scenario\
Legitimate User (Alice):
Alice wants to claim humanity with the following details:
Malicious User (Bob):
Outcome:
Attachments
This issue allows a malicious user to affect the accountHumanity mapping, potentially leading to:
Unauthorized association of _humanityId with a malicious actor's address. Denial of service for legitimate users attempting to claim humanity.