Categories: OWASP - Top 10

A4-Insecure Direct Object References

Insecure Direct Object References prevalence are quiet common and this risk can be easily exploited, anyway the impact of risk would be moderate.

Here is the sample scenario, we are having a attacker, webserver and a Database.Here what the attacker to do is simply changing the ID in the URL, now the website saves the request and it goes to database and fetch different record than the permitted for the user. If the Insecure Direct Object References is successful then the database passes request to the website and data provided to the attacker.

UNDERSTANDING DIRECT OBJECT REFERENCES

In this example an legitimate user asking for account balance, so hitting a balance resource and a query string(ID=) , now take the other user’s they are hitting the same URL and the only difference is the account ID.

Here is the thing about these URL’s ID=(this is untrusted data),this query string value has been easily manipulated that any one of the user can change the account ID and fetch the balance of other users.In the system we need to implement validation, if the users manipulates the request,they will not be permitted to unauthorized area.

COMMON DEFENSES

  • Implement access controls, be explicit about who can access the resources.
  • Use Indirect reference map, Don’t expose internal key’s externally.
  • If possible map them to the temporary one’s.
  • Avoid predictable keys, (Incrementing integers and Natural keys are discoverable).
Gurubaran

Gurubaran is a co-founder of Cyber Security News and GBHackers On Security. He has 10+ years of experience as a Security Consultant, Editor, and Analyst in cybersecurity, technology, and communications.

View Comments

Recent Posts

Cisco Nexus Vulnerability Allows Attackers to Inject Malicious Commands

Cisco Systems has issued a critical security advisory for a newly disclosed command injection vulnerability…

1 minute ago

New Wi-Fi Jamming Attack Can Disable Specific Devices

A newly discovered Wi-Fi jamming technique enables attackers to selectively disconnect individual devices from networks…

10 minutes ago

GitLab Vulnerabilities Allow Attackers to Bypass Security and Run Arbitrary Scripts

GitLab has urgently released security updates to address multiple high-severity vulnerabilities in its platform that…

2 hours ago

LibreOffice Flaws Allow Attackers to Run Malicious Files on Windows

A high-severity security vulnerability (CVE-2025-0514) in LibreOffice, the widely used open-source office suite, has been…

2 hours ago

Cisco Nexus Switch Vulnerability Allows Attackers to Cause DoS

Cisco Systems has disclosed a high-severity vulnerability (CVE-2025-20111) in its Nexus 3000 and 9000 Series…

3 hours ago

Silver Fox APT Hackers Target Healthcare Services to Steal Sensitive Data

A sophisticated cyber campaign orchestrated by the Chinese Advanced Persistent Threat (APT) group, Silver Fox,…

12 hours ago