Category: Web Security

  • What Is IDOR? Insecure Direct Object Reference Explained with Real Examples

    IDOR is one of the most common security bugs we find when testing web applications and APIs. It is simple to understand, often easy to exploit, and it can expose the private data of every user on a platform. In this guide we explain what an IDOR vulnerability is, how attackers find it, real examples, and how developers can fix it for good.

    What is IDOR?

    IDOR stands for Insecure Direct Object Reference. It happens when an application uses an ID that the user can change (such as an invoice number, user ID or file name) to fetch data, but never checks whether that user is actually allowed to see or change that data.

    Think of a hotel where every room key opens any door, as long as you know the room number. You only booked room 101, but nothing stops you from walking into room 102. That is IDOR.

    IDOR is part of Broken Access Control, which is ranked A01 in the OWASP Top 10:2025. In APIs the same problem is called BOLA (Broken Object Level Authorization) and it is number one in the OWASP API Security Top 10 (2023). You can read our simple guide to all ten categories in OWASP Top 10 (2025) explained.

    A simple IDOR example

    You log in to an online store and open your latest invoice. The address bar shows:

    https://shop.example.com/invoice?id=1001

    Out of curiosity you change 1001 to 1002 and press Enter. The page now shows another customer's name, address, phone number and order details. The application checked that you were logged in, but it never checked that invoice 1002 belongs to you. Every invoice in the system is now readable by anyone with an account.

    Where IDOR vulnerabilities hide

    IDs are not always in the address bar. During a penetration test we look for object references in every part of a request:

    • URL parameters: /profile?user_id=482
    • API paths: /api/v1/users/482/orders
    • JSON request bodies: {"account_id": 482, "amount": 500}
    • File downloads: /download?file=salary_slip_482.pdf
    • GraphQL queries: query { order(id: 9001) { address phone } }
    • Hidden form fields, cookies and headers
    • Mobile and desktop apps that call the same backend APIs

    Types of IDOR

    • Read IDOR: you can view data that belongs to someone else, such as invoices, chats, medical reports or ID documents.
    • Write IDOR: you can change someone else's data, for example updating another user's email address or shipping address.
    • Delete IDOR: you can delete other users' records, files or comments.
    • Function level issues: a normal user can call an admin action by changing an ID or role value. In APIs this is called BFLA (Broken Function Level Authorization).

    Write IDOR is often the most dangerous. If an attacker can change the email address on someone else's account, they can trigger a password reset and take over that account completely.

    Why IDOR happens

    Most IDOR bugs come from one wrong assumption: "the user is logged in, so the request must be fine." Being logged in (authentication) only proves who you are. It does not prove you own the object you are asking for (authorization). When the server trusts the ID sent by the browser or the app without checking ownership, IDOR appears.

    It is also easy to miss in code review. One endpoint may have the check and the very next one may not, especially when new features are added quickly.

    How security testers find IDOR

    Automated scanners rarely find IDOR because they do not understand who owns what. It needs manual testing. This is the approach we follow, and only ever on applications we have written permission to test:

    1. Create two test accounts (User A and User B) with different data.
    2. Log in as User A and capture every request with Burp Suite or a similar proxy.
    3. Note every ID in the requests: numbers, UUIDs, file names and encoded values.
    4. Replay User A's requests using User B's session, or swap in User B's IDs.
    5. Test every method, not just GET. Try PUT, PATCH, POST and DELETE on the same object.
    6. Decode values that look random. Base64 or hashed IDs are often still predictable.
    7. Compare the responses. Any data from the other account means the check is missing.

    Burp Suite extensions such as Autorize help by replaying requests with a second session automatically. Our API security testing checklist covers BOLA and BFLA tests in more detail.

    Important: testing someone else's application without written permission is illegal in India under the IT Act, 2000, and in most other countries. Practice on intentionally vulnerable labs instead.

    How to fix and prevent IDOR

    • Check ownership on the server for every request. Before returning or changing an object, confirm it belongs to the logged in user or that their role allows it.
    • Take the user from the session, not the request. Use the identity in the session or token instead of trusting a user_id sent by the client.
    • Deny by default. If no rule clearly allows the action, block it.
    • Centralise authorization. Put access checks in shared middleware or a policy layer so new endpoints cannot skip them.
    • Use random IDs as an extra layer only. UUIDs make guessing harder, but they are not a fix. IDs leak through emails, logs and shared links.
    • Write access control tests. Add automated tests that call each endpoint as a different user and expect a 403 or 404.
    • Log and alert on users who request many objects they do not own.

    Quick IDOR checklist for developers

    • Does every endpoint that takes an ID check who owns that object?
    • Are update and delete endpoints protected, not just view pages?
    • Are file download links checked for ownership?
    • Do mobile and desktop app APIs have the same checks as the website?
    • Do you have tests that try to access another user's data?

    Frequently asked questions

    Is IDOR the same as BOLA?

    Yes, they describe the same problem. IDOR is the older name used for web applications. BOLA is the name used in the OWASP API Security Top 10.

    How serious is an IDOR vulnerability?

    It depends on the data. An IDOR that exposes public profile pictures is low risk. One that exposes bank statements, medical records or lets you take over accounts is usually rated high or critical using CVSS.

    Can automated scanners detect IDOR?

    Rarely. Scanners do not know which data belongs to which user, so IDOR is mainly found through manual testing with multiple accounts.

    Get your application tested for IDOR

    At Bugfynd we test web applications, APIs and thick client apps manually, the way a real attacker would, with every finding explained in plain language and a free retest after you fix it. See what you receive in our sample pentest reports, or learn to find bugs like this yourself in our web application pentesting course taught in English and Telugu.

    Questions or a project to discuss? Email contact@bugfynd.com or message us on WhatsApp.

  • OWASP Top 10 (2025) Explained with Simple, Real-World Examples

    The OWASP Top 10 is the world’s best-known list of the most critical security risks to web applications. It is published by the Open Worldwide Application Security Project (OWASP), a non-profit community, and is used by developers, testers and auditors everywhere. The latest edition is the OWASP Top 10:2025 — the first update since 2021.

    Here is each category explained in simple words, with an everyday example and what to do about it.

    A01:2025 – Broken Access Control

    What it means: users can do or see things they should not be allowed to.

    Example: you open /invoice?id=1001 to view your invoice, change it to 1002, and see another customer’s invoice. In this edition, server-side request forgery (SSRF) is also part of this category.

    Fix: check permissions on the server for every request — never rely on hidden buttons or the user interface.

    A02:2025 – Security Misconfiguration

    What it means: the application or server is set up insecurely.

    Example: default admin passwords, directory listing switched on, or detailed error messages showing database names to visitors.

    Fix: use hardened configuration baselines, remove defaults and unused features, and review settings regularly.

    A03:2025 – Software Supply Chain Failures

    What it means: risks from the third-party code, libraries, build tools and services your software depends on. This is a new, broader category that replaces “vulnerable and outdated components”.

    Example: an old JavaScript library with a known vulnerability, or a compromised package pulled into your build.

    Fix: keep an inventory of dependencies, update them regularly, and only use trusted, verified sources.

    A04:2025 – Cryptographic Failures

    What it means: sensitive data is not properly protected with encryption.

    Example: passwords stored with a weak hash like MD5, or a login page served over plain HTTP.

    Fix: use HTTPS everywhere, hash passwords with modern algorithms such as bcrypt or Argon2, and never write your own encryption.

    A05:2025 – Injection

    What it means: user input is treated as code. This includes SQL injection and cross-site scripting (XSS).

    Example: typing ' OR '1'='1 into a login box logs you in without a password because the input becomes part of the SQL query.

    Fix: use parameterised queries, validate input, and encode output before showing it in a page.

    A06:2025 – Insecure Design

    What it means: the flaw is in the design itself, not just a coding mistake.

    Example: a “forgot password” flow that lets anyone reset any account by answering a guessable security question.

    Fix: think about abuse cases early — use threat modelling and secure design patterns before writing code.

    A07:2025 – Authentication Failures

    What it means: weaknesses in login and identity checks.

    Example: no limit on login attempts, so an attacker can try thousands of leaked passwords (credential stuffing).

    Fix: rate-limit logins, support multi-factor authentication, and block common or breached passwords.

    A08:2025 – Software or Data Integrity Failures

    What it means: the application trusts code or data without checking it has not been tampered with.

    Example: an app that downloads updates without verifying a digital signature, or accepts serialized objects from users.

    Fix: verify signatures and checksums, and never trust data the client can modify.

    A09:2025 – Security Logging & Alerting Failures

    What it means: attacks happen, but nobody notices.

    Example: thousands of failed logins overnight with no alert — the breach is discovered months later.

    Fix: log security events, protect the logs, and make sure someone is alerted to suspicious activity.

    A10:2025 – Mishandling of Exceptional Conditions

    What it means: a new category about what happens when things go wrong — errors, unexpected input or failures.

    Example: when a payment service times out, the app “fails open” and marks the order as paid.

    Fix: handle errors safely and consistently, and make sure failures default to the secure option.

    How to use the OWASP Top 10

    OWASP describes the list as an awareness document, not a complete checklist. Use it to train developers, prioritise reviews, and make sure your security testing covers the most common risks. For a thorough test, pair it with the OWASP Web Security Testing Guide and the Application Security Verification Standard (ASVS).

    Want to learn to find these issues yourself? Our web application pentesting crash course covers each category with hands-on labs — in English and Telugu.


    Need a security test? Bugfynd offers manual web application, API, thick client and source code security testing with CVSS-rated reports and a free retest. Book a free 30-minute consultation or see our sample reports.

  • What Is a Web Application Penetration Test? A Plain-English Guide

    If you run a website, a customer portal or a mobile app with a web backend, sooner or later someone — a client, an investor or an auditor — will ask: “Has this been penetration tested?” This guide explains what a web application penetration test actually is, what happens during one, and how to get real value from it — in plain English.

    What is a web application penetration test?

    A web application penetration test (often called a web app pentest) is an authorised, simulated attack on your application. A security tester tries to break in the same way a real attacker would — but with your written permission, within an agreed scope, and with the goal of helping you fix every weakness they find.

    The output is a report that explains each vulnerability, how serious it is, how it was proven, and exactly how to fix it.

    Penetration test vs. vulnerability scan

    These two are often confused, but they are very different:

    • A vulnerability scan is automated. A tool checks your site for known issues — outdated software, missing security headers, common misconfigurations. It is fast and useful, but it produces false positives and misses anything that needs human thinking.
    • A penetration test is led by a person. The tester uses tools and manual techniques to chain small weaknesses together, test business logic, and prove real impact.

    A simple example: a scanner will rarely notice that changing order_id=1043 to order_id=1044 in a request shows you someone else’s order. A human tester checks this on purpose. This flaw — called IDOR or broken access control — sits at number one on the OWASP Top 10 list of web application risks.

    What does a pentester actually test?

    A good web app pentest follows a recognised methodology such as the OWASP Web Security Testing Guide (WSTG). Typical areas include:

    • Authentication: login, password reset, multi-factor authentication, account lockout.
    • Session management: how cookies and tokens are created, protected and expired.
    • Access control: can a normal user reach admin functions, or see another user’s data?
    • Injection: SQL injection, command injection and cross-site scripting (XSS).
    • Business logic: changing prices, reusing coupons, skipping payment steps.
    • File uploads, configuration and error handling: what leaks when something goes wrong.

    Black box, grey box or white box?

    • Black box: the tester gets only the URL — like an outside attacker. Realistic, but slower and less thorough.
    • Grey box: the tester gets test accounts for each user role. This is the most common and usually the best value, because access-control flaws between roles can be tested properly.
    • White box: the tester also gets source code or architecture details. The deepest coverage, often combined with a source code review.

    How a typical engagement runs

    1. Scoping: agree what is in scope (domains, APIs, user roles), what is out of scope, and the testing window.
    2. Authorisation: a signed agreement and NDA. Testing without written permission is illegal — in India, under the IT Act, 2000.
    3. Reconnaissance and mapping: the tester maps every page, parameter and API call.
    4. Testing and exploitation: manual and tool-assisted testing to find and safely prove vulnerabilities.
    5. Reporting: every finding with a severity score, evidence and remediation steps.
    6. Retest: after your developers fix the issues, the tester confirms they are really closed.

    What should be in the report?

    The report is what you are really paying for. A useful pentest report includes:

    • An executive summary in plain language for management.
    • A severity rating for each finding — usually using CVSS — so you know what to fix first.
    • Steps to reproduce and screenshots, so your developers can see the problem themselves.
    • Clear remediation guidance — not just “validate input”, but how and where.

    You can see what this looks like in our sample reports, built on intentionally vulnerable practice applications.

    How much does a web application pentest cost?

    There is no single price, because the effort depends on a few things:

    • Size: the number of pages, forms, API endpoints and user roles.
    • Depth: black, grey or white box; whether APIs and mobile backends are included.
    • Complexity: payment flows, multi-tenant setups and custom business logic take longer to test properly.
    • Retesting and compliance needs: some standards require specific evidence or formats.

    Be careful with offers that look too cheap: a “pentest” that is really just an automated scan with a logo on the report will not find the logic flaws that cause real breaches. Ask any provider for a sample report before you commit.

    How often should you test?

    A good rule of thumb: test before a major launch, after significant changes (new payment flow, new user roles, a big redesign) and at least once a year. Many security standards and enterprise clients expect an annual test.

    Key takeaways

    • A pentest is an authorised, human-led simulated attack — much deeper than a scan.
    • Grey-box testing with real user roles usually gives the best value.
    • The report and the retest matter as much as the testing itself.
    • Always get written permission, a clear scope and an NDA in place first.

    Need a security test? Bugfynd offers manual web application, API, thick client and source code security testing with CVSS-rated reports and a free retest. Book a free 30-minute consultation or see our sample reports.