HTTP Parameter Pollution (HPP) Basics
You'll learn: How attackers exploit inconsistent handling of duplicate HTTP parameters to manipulate application behavior.
What is HTTP Parameter Pollution?
HTTP Parameter Pollution occurs when an attacker sends multiple parameters with the same name in a single request. The vulnerability arises because different web servers, application frameworks, and middleware handle duplicate parameters differently—some use the first value, others use the last, and some concatenate all values.
The analogy: Imagine two cashiers at different stores. When you hand them two coupons with the same code, one cashier applies the first coupon and ignores the second, while the other applies the last one. An attacker who knows this can manipulate which coupon gets used by controlling the order.
How Different Systems Handle Duplicates
When a request contains amount=100&amount=1, different technologies behave differently:
- PHP/Apache: Uses the last value (
1) - ASP.NET/IIS: Concatenates with commas (
100,1) - Node.js: Creates an array (
['100', '1']) - JSP/Tomcat: Uses the first value (
100)
The Attack
Attackers exploit this by:
- Finding parameters that pass through multiple systems (e.g., WAF → web server → application)
- Crafting requests like
price=999&price=1 - Banking on the WAF validating one value while the application uses another
This can bypass security controls, manipulate business logic (remember pricing vulnerabilities?), or confuse authorization checks.
Real Impact
HPP can enable bypassing of input validation, SQL injection filter evasion, or overriding critical parameters like user IDs or permissions—building on the mass assignment and parameter tampering concepts you've already learned.
Key Takeaway: HTTP Parameter Pollution exploits inconsistent duplicate parameter handling across systems, allowing attackers to manipulate which value is actually processed by the application versus security controls.