HTTP Parameter Pollution: The Dirty Little Secret That Gave Me F
The application mishandled duplicate HTTP parameters, allowing an attacker to manipulate redirects, escalate privileges, and access other users' data. By supplying multiple values for the same parameter, the attacker could redirect to an external site, log in as admin, and retrieve sensitive information like API keys.
Free Link🎈
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the backend does not properly validate or sanitise duplicate parameters, leading to unexpected behaviour when multiple values are supplied.
Impact
An attacker could redirect users to malicious sites, gain admin access, and obtain sensitive user information including API keys and internal IDs.
What the attacker needed
None
The fix
The application should be fixed to consistently handle duplicate parameters, for example by rejecting requests with multiple values or by using only the first or last value after proper validation.
How it was found
- Identify a login endpoint with a redirect parameter.
- Supply two redirect parameters with different values to trigger an open redirect.
- Send a POST request with a role parameter in the query string and a different role in the body to escalate privileges.
- Access a profile endpoint with duplicate user parameters to retrieve another user's details.
- Test encoded separators to see if they are treated as new parameters.
- Craft a URL with duplicate mode parameters to render the admin panel.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
HTTP Parameter Pollution (HPP) happens when a website receives multiple values for the same parameter (like ?user=1&user=2) and handles them inconsistently. This can let an attacker change the website's behaviour, such as redirecting to a malicious site or accessing another user's account.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.