Table of Contents

BBC Ch 17: Application Logic Errors and Broken Access Control

Source: Bug Bounty Bootcamp by Vickie Li

Unlike injection vulnerabilities, logic errors and broken access control are triggered by perfectly valid HTTP requests. No illegal characters or malformed input are needed – the attacker simply uses the application in an unintended way.

Application Logic Errors

Application logic errors (business logic vulnerabilities) exploit the legitimate flow of an application to cause unintended outcomes.

Example: Skippable MFA Step

A three-step login (password → MFA code → security questions) may redirect users to step 3 after step 2, but not verify that step 2 was actually completed. An attacker can navigate directly to https://example.com/security_questions/ and skip MFA entirely.

Example: Unverified Payment Method

An online shop verifies credit cards only when a new card is used. It determines whether a card is new by checking for the presence of a saved_card parameter. Submit saved_card=1 alongside a fake card number to bypass card verification and order items without payment:

POST /new_order
item_id=123&quantity=1&saved_card=1&card_number=0000-0000-0000-0000

Broken Access Control

Exposed Admin Panels

Admin panels may be hidden at obscure URLs but accessible without authentication:

Common bypasses:

Directory Traversal

If a file parameter is passed directly to a file-read operation without sanitization:

http://example.com/upload?file=../../../../../etc/shadow

The ../ sequence escapes the uploads directory and traverses to the filesystem root. Target files: /etc/shadow (hashed passwords), config files, log files, source code.

Prevention

Hunting for Logic Errors and Broken Access Control

Step 1: Learn the Application

Browse the application as a normal user. Read engineering blogs, documentation, and release notes. New features are often the least tested. Learn business rules: what actions should be allowed for which user roles?

Step 2: Intercept and Catalog Requests

Proxy all traffic. Note every request involved in:

For each request, identify parameters that control:

Step 3: Think Outside the Box

Try these common manipulations:

Escalating the Attack

5-Step Checklist

  1. Learn the application: business rules, user roles, authentication flows, payment logic.
  2. Intercept and catalog every sensitive request with a proxy.
  3. Attempt to skip steps in multi-step flows, access post-login pages directly, or add admin cookies.
  4. Try directory traversal on file parameters; check for exposed admin panels.
  5. Escalate findings; draft report explaining the business impact and how the flaw can be exploited.