It occurs when a website embeds user input in a server-side request to an internal API without adequate encoding.
To test for server-side parameter pollution in the query string, place query syntax characters like #
, &
, and =
in your input and observe how the application responds.
%23
#
%26
&
For example, you could modify the query string to the following:
GET /userSearch?name=peter%26name=carlos&back=/home
This results in the following server-side request to the internal API:
GET /users/search?name=peter&name=carlos&publicProfile=true
The internal API interprets two name
parameters. The
impact of this depends on how the application processes the second
parameter. This varies across different web technologies. For example:
PHP parses the last parameter only. This would result in a user search for carlos
.
ASP.NET combines both parameters. This would result in a user search for peter,carlos
, which might result in an Invalid username
error message.
Node.js / express parses the first parameter only. This would result in a user search for peter
, giving an unchanged result.
In Burp's browser, trigger a password reset for the administrator
user.
In Proxy > HTTP history, notice the POST /forgot-password
request and the related /static/js/forgotPassword.js
JavaScript file.