Course contentsShow
← Security
Lesson 809 of 3,05217. Web Security - Authorization and Access ControlFree lesson

Parameter Tampering for Authorization Bypass

Manipulating hidden fields, cookies, or headers containing role or permission data to elevate privileges.

Parameter Tampering for Authorization Bypass

What you'll learn: How attackers manipulate hidden data in requests—like role identifiers or permission flags—to gain unauthorized access.


What Is Parameter Tampering?

Web applications often send authorization data alongside user requests: hidden form fields indicating role=user, cookies storing isAdmin=false, or HTTP headers containing permission levels. Parameter tampering is the practice of modifying these client-controlled values to trick the server into granting elevated privileges.

Since all client-side data can be intercepted and modified (using browser dev tools, proxy tools, or custom scripts), attackers can change a parameter from role=customer to role=admin before sending it back to the server.

How It Works

Consider a purchase form with a hidden field:

<input type="hidden" name="discount" value="0">
<input type="hidden" name="userLevel" value="bronze">

An attacker intercepts this request and changes:

  • discount=0 → discount=100
  • userLevel=bronze → userLevel=platinum

If the server trusts these values without validating them against server-side records, the attacker receives unauthorized discounts or access.

Common Vulnerable Patterns

  • Cookies: role=guest changed to role=admin
  • Query parameters: ?isManager=false changed to ?isManager=true
  • Headers: X-User-Role: viewer changed to X-User-Role: editor
  • JSON payloads: {"permissions": ["read"]} changed to {"permissions": ["read", "write", "delete"]}

Real-World Impact

This weakness enables both horizontal (accessing other users' data) and vertical (gaining admin rights) privilege escalation, as covered in previous lessons. It's a direct result of failing server-side authorization checks.

Key Takeaway: Never trust client-supplied authorization data—always validate roles, permissions, and access rights against authoritative server-side records on every sensitive operation.