Closed code423n4 closed 1 year ago
minhquanym marked the issue as primary issue
minhquanym marked the issue as high quality report
POC -> high quality
CJ42 marked the issue as disagree with severity
data is not always reliable, very low impact, to create a contract to spam you need LYX. We consider this as a Low/QA issue.
trust1995 changed the severity to QA (Quality Assurance)
trust1995 marked the issue as grade-c
Lines of code
https://github.com/code-423n4/2023-06-lukso/blob/main/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol#L152
Vulnerability details
Impact
When receiving and sending assets, checks are done so that data keys correspond to digital assets with a positive balance.
When receiving:
When sending:
However, it is possible to bypass the check during receiving tokens by transferring a 0 amount in a contract's constructor.
Proof of Concept
The following test written in foundry shows that it is possible to have data keys corresponding to digital assets with a balance of 0.
Recommended Mitigation Steps
It is recommended to check the data sent to
universalReceiver()
to see if the transferred amount is 0 or not.Assessed type
Context