Skip to content
Back to skills

Api Content Type Confusion

BSecurity

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

Pro shows the line behind each finding and how to fix it

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill api-content-type-confusion --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Content Type Confusion?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Content Type Confusion
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-api-content-type-confusion/badge)](https://www.skillsdirectory.com/skills/anandjogawade-api-content-type-confusion)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.