Content-type / parser confusion and server-side parameter pollution — switch request format (form, JSON, XML or multipart) to hit a different parser, bypass WAFs, unlock XXE, or inject params into server-to-server requests (SSPP). Tier 1. Use when an API accepts or can be coerced into multiple body formats.
16 stars
0 votes
0 copies
3 views
Added November 17, 2026
securityapibackend
Works with
api
mcp
Security analysis
B88/100
criticalAccesses sensitive system or user directories
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Api Content Type Confusion?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-api-content-type-confusion)
---
name: api-content-type-confusion
description: Content-type / parser confusion and server-side parameter pollution — switch request format (form, JSON, XML or multipart) to hit a different parser, bypass WAFs, unlock XXE, or inject params into server-to-server requests (SSPP). Tier 1. Use when an API accepts or can be coerced into multiple body formats.
---
# Content-Type Confusion & Server-Side Parameter Pollution
Change the format, hit a different parser, bypass the filter. And where your input is placed into a backend request, pollute its parameters (SSPP). Points ref: `${CLAUDE_PLUGIN_ROOT}/payloads/INJECTION-POINTS.md`.
## Trigger phrases
`content type confusion, parser confusion, sspp, server side parameter pollution, json to xml, xxe via content type, format switch, waf parser bypass`
## Method
1. **Format switching** — take a working request and change `Content-Type` + reformat the body to match: JSON↔XML↔`x-www-form-urlencoded`↔multipart. Watch for: info-leak errors, defense bypass (WAF parses JSON not XML), or a different code path.
```http
Content-Type: application/json {"user":"a","role":"admin"}
Content-Type: application/xml <root><user>a</user><role>admin</role></root>
Content-Type: application/x-www-form-urlencoded user=a&role=admin
```
2. **JSON→XML to unlock XXE** — a JSON-safe endpoint that also accepts XML may feed an XXE-vulnerable parser; inject a DOCTYPE (`${CLAUDE_PLUGIN_ROOT}/payloads/xxe.md`, chain `api-soap-wsdl`):
```xml
<!DOCTYPE foo [<!ENTITY xxe SYSTEM "file:///etc/passwd">]><root><x>&xxe;</x></root>
```
3. **Mismatched header vs body** — send `Content-Type: application/json` with an XML body (or vice-versa); duplicate/charset tricks (`;charset=`, `application/json;x=1`). Use Burp **Content-Type Converter** BApp.
4. **SSPP (your input → backend's own request)** — inject parameter delimiters to add/override backend params:
- Query-string: truncate with `%23`(`#`)/`&`; inject `&admin=true`; override an existing param by appending a duplicate (backend last-wins); add an invalid param to probe parsing.
- REST path: inject `/`, `%2f`, `..` into path-segment values that build the backend URL.
- Structured (JSON/XML): inject extra keys/elements the backend merges.
5. **Detect** via differential responses / error leaks; confirm with OAST if it pivots to SSRF (`api-oast-blind`).
## Bypass / evasion
This *is* a WAF-bypass primitive: WAFs that only parse JSON miss XML/multipart payloads; charset and duplicate-type tricks confuse normalizers. See `${CLAUDE_PLUGIN_ROOT}/payloads/waf-bypass.md`.
## Modern / rare techniques
- **[RARE] SSPP** — user input reflected into a server→server request lets you inject/override backend params (e.g., `&role=admin`, `&reset_token=...`).
- **[RARE] Multipart parser discrepancy** — duplicate parts / mismatched part Content-Type parsed differently by WAF vs app.
- **[RARE] JSON→XML XXE pivot** — the headline chain: safe JSON endpoint turns injectable once coerced to XML.
## Escalation / chaining
Unlocks `api-injection`/XXE (`api-soap-wsdl`) past a WAF; SSPP → privilege/parameter tampering, SSRF (`api-ssrf`), auth bypass. Chain with `api-gateway-smuggling` for layered edge bypass.
## Backend & tooling
Preferred Kali path (WSL+Kali / Kali-MCP / HexStrike). Burp Content-Type Converter + Repeater; interactsh for SSRF-pivot confirmation. See `zazy-orchestrator`.
## Verification (background, before reporting)
Confirm the format switch/SSPP changed server behaviour (new code path, injected param honored, XXE fired) via an independent repro or OAST; distinguish a benign error from real parser confusion. True positives only.
## Evidence
Before/after requests (original format vs switched) + response proving the different parser/bypass, or the SSPP payload honored by the backend. Impact + remediation (canonicalize/validate before downstream requests, allow-list params, strict content-type handling, disable external entities).