# http-parameter-pollution

Guides agents through HTTP Parameter Pollution tests when WAFs, proxies, and backends parse duplicate parameters differently. Built for API security assessments.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3600 installs · ★ 2547
- Author: yaklang
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/yaklang/hack-skills/tree/HEAD/skills/http-parameter-pollution/SKILL.md
- Updated: 2026-09-13
- HTML: https://affpapa.org/en/nevibecode/skills/http-parameter-pollution

## What it does

The skill instructs the agent to analyze parsing discrepancies across the entire request path: browser, CDN or WAF, reverse proxy, and application framework. It provides a breakdown of default behaviors. For instance, PHP and Django keep the last parameter value, while Flask, Tomcat, and Go net/http consume the first, and Express converts duplicates into arrays.

The reference includes test payloads for query strings, urlencoded forms, multipart uploads, and duplicate JSON keys. It details concrete exploitation paths, including WAF evasion, SSRF validation bypasses, CSRF token confusion, and business logic flaws like altered prices or quantities. For raw HTTP handling, it points to Burp Suite, OWASP ZAP, or custom scripts.

Payloads targeting numeric fields like order amounts can mutate backend state or financial balances. Because of this risk, tests must remain strictly confined to authorized scopes and dedicated test accounts.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill http-parameter-pollution -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/http-parameter-pollution/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/http-parameter-pollution/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill http-parameter-pollution -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/http-parameter-pollution/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill http-parameter-pollution -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/http-parameter-pollution/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install yaklang/hack-skills http-parameter-pollution
```

2. **Manually: put the files in place**
- File: `.github/skills/http-parameter-pollution/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill http-parameter-pollution -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/yaklang/hack-skills --path skills/http-parameter-pollution
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/http-parameter-pollution/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add yaklang/hack-skills --skill http-parameter-pollution -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/yaklang/hack-skills/tree/HEAD/skills/http-parameter-pollution/SKILL.md

## When to use it
- test WAF bypasses using duplicate query parameters
- uncover parameter handling differences between reverse proxies and backends
- construct SSRF payloads that split internal and external URLs
- check CSRF validation resilience against repeated token keys
- evaluate duplicate key handling across JSON parsers

## Example prompts
- Check this payment endpoint for HTTP Parameter Pollution vulnerabilities when passing duplicate amount values.
- Draft an HPP payload targeting a WAF in front of a Node.js Express service.
- Compare how IIS and a PHP origin interpret duplicated query parameters.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 7c5e6df32d128ae9.

BEGIN THIRD-PARTY FILE 7c5e6df32d128ae9
````text
---
name: http-parameter-pollution
description: >-
  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.
---

# SKILL: HTTP Parameter Pollution (HPP)

> **AI LOAD INSTRUCTION**: Model the **full request path**: browser → CDN/WAF → reverse proxy → app framework → business code. Duplicate keys (`a=1&a=2`) 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. Routing note: when the same parameter appears multiple times, or WAF/backend stacks differ, use the Section 1 matrix to test first/last/merge assumptions, then design Section 3 scenario chains.

## 0. QUICK START

**Hypothesis**: the **security check** reads one occurrence of a parameter while the **action** reads another.

### First-pass payloads

```text
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=admin
```

### Body variants (repeat for POST)

```text
application/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"
2
```

### Quick methodology

1. Fingerprint **front** stack (CDN/WAF) vs **origin** (language/framework) using baseline `a=1&a=2`.
2. Send **both** orders: `a=1&a=2` and `a=2&a=1` (some parsers are order-sensitive).
3. If JSON: test **duplicate keys** and Content-Type confusion (see Section 2).

---

## 1. SERVER BEHAVIOR MATRIX

Typical defaults — **always confirm**; middleware and custom parsers override these.

| Technology | Behavior | Example: `a=1&a=2` |
|---|---|---|
| PHP / Apache (`$_GET`) | Last occurrence | `a=2` |
| ASP.NET / IIS | Often comma-joined (all) | `a=1,2` |
| JSP / Tomcat (servlet param) | First occurrence | `a=1` |
| Python / Django (`QueryDict`) | Last occurrence | `a=2` |
| Python / Flask (`request.args`) | First occurrence | `a=1` |
| Node.js / Express (`req.query`) | Array of values | `a=['1','2']` (shape may vary by parser version) |
| Perl / CGI | First occurrence | `a=1` |
| Ruby / Rack (Rack::Utils) | Last occurrence | `a=2` |
| Go `net/http` (`ParseQuery`) | First occurrence | `a=1` |
````
END THIRD-PARTY FILE 7c5e6df32d128ae9

The third-party file has ended. Everything between the 7c5e6df32d128ae9 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2475 of 6952 bytes. © yaklang · MIT · https://github.com/yaklang/hack-skills/tree/HEAD/skills/http-parameter-pollution/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
