Skip to content

Missing Access Control in setMultipleAllowances() Function

Description

The setMultipleAllowances() function is missing the onlyOwner modifier, which allows unauthorized access and modification of allowances.

Examples

Insecure Code

solidity
function setMultipleAllowances(...) {...}

Secure Code

solidity
function setMultipleAllowances(...) onlyOwner {...}

Remediation

Add the onlyOwner modifier to the setMultipleAllowances() function to restrict access to the contract owner.

Rule Details

FieldValue
IDCODE-0802
CategoryAccessControl
SeverityCRITICAL
CWECWE-284
ConfidenceHIGH
ImpactHIGH
LikelihoodHIGH
ExploitabilityEASY
Tagsaccess control, smart contract
OWASPN/A

References