abusing-hop-by-hop-headers

Tests HTTP proxies and CDNs for hop-by-hop header stripping enabling access-control bypass and cache poisoning.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill abusing-hop-by-hop-headers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: abusing-hop-by-hop-headers
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/web-application-security/abusing-hop-by-hop-headers
Command: npx skills add https://github.com/xalgord/xalgorix --skill abusing-hop-by-hop-headers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Intermediaries like proxies, load balancers, and CDNs can be tricked into stripping security-relevant headers when an attacker names them in the HTTP Connection header, leading to IP-based access-control bypass, broken authentication assumptions, and cache poisoning. This Skill provides a structured methodology to detect and confirm these misconfigurations during authorized assessments.

Core Features & Use Cases

  • Header Stripping Detection: Systematically tests candidate headers (X-Forwarded-For, Authorization, Cookie, X-Api-Key) by designating them as hop-by-hop via the Connection header and diffing responses against a baseline.
  • Access-Control Bypass Testing: Verifies whether stripping a spoofed X-Forwarded-For header causes the backend to trust the proxy IP and grant access to restricted endpoints like admin panels.
  • Cache Poisoning Validation: Confirms whether marking session headers hop-by-hop causes shared caches to store and serve personalized content to other users.
  • Use Case: During a web application pentest against a target behind a CDN, you discover /admin returns 403 normally but 200 when sending Connection: close, X-Forwarded-For, proving an IP allowlist bypass.

Quick Start

Ask the AI to test the target application behind its proxy for hop-by-hop header abuse by probing whether the Connection header can strip X-Forwarded-For and bypass the admin panel's IP restrictions.

Frequently Asked Questions about abusing-hop-by-hop-headers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test for hop-by-hop header abuse in a web application?

Send a request with a security-relevant header like X-Forwarded-For, then repeat it while listing that header in the Connection header (e.g., Connection: close, X-Forwarded-For). If the response status or body changes, the proxy stripped the header, indicating a misconfiguration.

What is the Connection header attack on HTTP proxies?

The Connection header lets a client designate arbitrary headers as hop-by-hop, so compliant proxies remove them before forwarding. Attackers exploit this to strip X-Forwarded-For, Authorization, or Cookie headers, bypassing IP allowlists or poisoning shared caches.

Which headers are standard hop-by-hop headers in HTTP?

RFC 2616 section 13.5.1 defines Keep-Alive, Transfer-Encoding, TE, Connection, Trailer, Upgrade, Proxy-Authorization, and Proxy-Authenticate as hop-by-hop. Any additional header named in the Connection header must also be treated as hop-by-hop by compliant proxies.

Can hop-by-hop header stripping bypass IP-based access control?

Yes, when a backend trusts X-Forwarded-For for IP allowlisting. Stripping the attacker's spoofed XFF makes the backend see only the trusted proxy IP, potentially granting access to restricted endpoints like admin panels or bypassing rate limits and geofencing.

How do I confirm cache poisoning from hop-by-hop headers?

Send a request marking a session header like Cookie as hop-by-hop, then issue a clean follow-up request from a different session. If the second request receives the personalized or attacker-influenced response, confirmed by Age or X-Cache headers, the cache was poisoned.

What tools are needed to test hop-by-hop header vulnerabilities?

Burp Suite Repeater is used to craft Connection header variations and diff responses against a baseline. curl handles quick manual probes, Param Miner discovers hidden headers, and simple Python scripts with the requests library automate testing across candidate headers.