Skip to content

Unrestricted Oracle Price Update

Description

The function to update oracle price data is not restricted, allowing anyone to submit updates.

Examples

Insecure Code

solidity
function setOracleData(...) public {...}

Secure Code

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

Remediation

Add access control modifiers such as 'onlyOwner' or 'onlySybil' to restrict access to the oracle price update function.

Rule Details

FieldValue
IDCODE-0259
CategoryAccessControl
SeverityCRITICAL
CWECWE-284
ConfidenceLOW
ImpactHIGH
LikelihoodHIGH
ExploitabilityEASY
Tagsoracle, price, update, access control
OWASPN/A

References