DeFiFoundry
50,000 USDC
View results
Submission Details
Severity: low
Invalid

Lack of Access Control in VaultReader::getPositionInfo()

Summary

The contract lacks explicit access control mechanisms for its functions.

Vulnerability Details

Public and external functions like getPositionInfo(), willPositionCollateralBeInsufficient(), and getPriceImpactInCollateral() do not have any access restrictions.

function getPositionInfo(
bytes32 key,
MarketPrices memory prices
) external view returns (PositionData memory) {
// Function body
}

Impact

Unauthorized users could potentially call sensitive functions, leading to information leakage or manipulation of contract state.

Tools Used

Manual code review

Recommendations

  • Implement access control modifiers (e.g., onlyOwner, onlyAuthorized)

  • Use OpenZeppelin's AccessControl library for role-based access control

  • Clearly define and enforce which roles or addresses should have access to each function

Updates

Lead Judging Commences

n0kto Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.