
HTTP parameter pollution (HPP) is an attack where the same parameter is sent more than once in a request. Different parts of a system may handle the duplicates differently, and an attacker can use that to bypass validation or change the application's behaviour.
HPP can affect both server-side and client-side components. The attacker adds extra parameters, or overrides existing ones, in the query string, the request body or cookies. Depending on the application, this can lead to cross-site scripting, privilege escalation or authorization bypass.
This demonstration uses bWAPP, a deliberately vulnerable web application for practice, available from sourceforge.net/projects/bwapp. Only test applications you own or are authorised to test.
Submit the form on the page and look at the resulting URL. For example:
http://localhost/bWAPP/hpp-3.php?movie=9&name=test&action=vote
This request has three parameters. Now add the movie parameter a second time with a different value:
http://localhost/bWAPP/hpp-3.php?movie=9&name=test&action=vote&movie=2
If the application is vulnerable, it uses the second value, and the vote is counted for a different movie than the one selected.
Different components (WAF, framework, back end) may pick the first, last or all values of a duplicated parameter, so validation and use can disagree.
Reject or normalise duplicate parameters consistently, and validate the exact value your application uses.
Try Vooki Pro free for 7 days
Check how your application handles duplicated parameters. The trial unlocks every feature for 7 days, and scanning runs on your own machine.
Related: HTTP request smuggling · Scanning applications behind a WAF or rate limits