/security-agent-skills:hunting-host-header-and-url-parsing-trustfrom security-agent-skills
Hunts trust in Host/forwarded-host headers and inconsistent URL parsing where apps build absolute links, key caches, route requests, or match allowlists from attacker-influenced input. Covers password-reset poisoning, cache poisoning, virtual-host routing, and parser-differential bypasses.
Ships in security-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
An application often needs to know its own address, to put a link in an email or to decide where a request belongs. The easy way is to read it from the incoming request: the Host header, or a forwarded-host header a proxy added. But those are attacker-controlled, and a server that builds a password-reset link from the Host sends the victim a link pointing at the attacker's domain. A shared cache that keys on a header the origin reflects serves the poisoned response to everyone. A router that trusts a forwarded host reaches an internal virtual host. The related trap is URL parsing: when the component that checks a URL and the component that uses it disagree about where the host ends, an allowlist passes a URL that resolves somewhere else. The bug is trusting the request's account of the host, or one parser's reading of a URL, as if it were authoritative. You find it by tracing where self-URLs, cache keys, routes, and allowlists get their host.
Test host and URL-parsing trust only against systems you own or are authorized to assess, on non-production infrastructure, using a benign host you control and benign markers rather than poisoning a live cache or sending real reset links to third parties. A confirmed cache-poisoning or reset-link case reaches other users, so keep every probe in scope and prefer an isolated instance. If you can't name the authorization, stop.
Establish where the host actually comes from first. For each place the app names itself, keys a cache, routes, or matches an allowlist, determine whether it uses a fixed configured base URL and a trusted parser, or derives the host from the incoming Host or forwarded header and parses the URL ad hoc. This is the false-positive killer: a service that builds links from a configured base and routes on a trusted value cannot be poisoned through the header, while one that reflects the request host can. Name the source of the host before crafting a request.
Map every host consumer. Trace the Host and any forwarded-host header, and every parsed URL, into absolute-link builders, cache keys, routing decisions, and redirect or fetch allowlist checks. Each consumer that takes the host from the request or a differently-parseable URL is a candidate sink.
Separate header trust from parser differentials. One class is trusting the header value: the app copies the Host or forwarded host into a link, a cache key, or a route. The other is a URL that the checking parser and the using parser read differently, so the host the allowlist approves is not the host the fetch or redirect reaches. Decide which class each sink belongs to.
Follow the consumer to its impact. A poisoned self-URL in a reset or verification email points the victim at the attacker; a header reflected into a cached response poisons every client on that key; a trusted forwarded host routes to an internal virtual host the client should not reach; a parser differential passes an allowlist and resolves to an internal or attacker address. Identify which impact the sink yields.
Check the defense that actually holds. The reliable controls are building external URLs from a fixed configured base rather than the request, validating the Host against an allowlist of known hostnames, trusting forwarded headers only from a known proxy and stripping client-supplied ones at the edge, keying caches on the values that actually vary the response, and parsing URLs once with a single strict parser whose result both the check and the use share. Determine which stands at each sink.
Confirm and record. Confirm by sending a request with a crafted host or ambiguous URL and observing the
poisoned link in the outbound message, the reflected host in a cached response, the internal route, or the
allowlist passing a URL that resolves elsewhere, on an isolated instance with benign markers. Kill the lead
if the sink uses a configured base and a validated host, if forwarded headers come only from a trusted
proxy, or if one strict parser governs both check and use. Record the header or URL, the sink, the class,
and the impact, or set a kill_reason.
Confirm. A password-reset flow builds the reset link from the incoming Host header. A request with the Host set to a domain the tester controls causes the reset email to contain a link to that domain carrying the victim's reset token, on an isolated instance with a test mailbox. Confirmed password-reset poisoning through host-header trust,
high, remediation = build the reset URL from a fixed configured base URL, validate the Host against an allowlist of known hostnames, and strip client-supplied forwarded-host headers at a trusted edge.Kill. The same flow builds the reset link from a configured base URL, validates the incoming Host against an allowlist and rejects unknown hosts, trusts a forwarded host only from the known proxy, and the redirect allowlist parses each URL once with a strict parser shared by check and fetch. A crafted Host is rejected and the email link always points at the configured domain. Killed,
kill_reason= "external URLs come from a configured base with a validated Host, forwarded headers are trusted only from the edge proxy, and one strict parser governs the allowlist; the attacker cannot influence the host the app uses."
You need every builder of a self-URL, every cache key and routing decision, and every allowlist parse, with the source of the host each uses and whether one strict parser governs both check and use. For each, decide whether the attacker can set the host through a header or split the parse through an ambiguous URL, and what the consumer then does. Reading where the host and the parse come from settles most leads; a crafted host or ambiguous URL producing a poisoned link, a reflected cache entry, an internal route, or an allowlist bypass on an isolated instance settles the rest.
auditing-open-redirect-and-forced-navigation - the redirect allowlist that a parser differential defeats
is the sink that skill audits, so URL-parsing trust and open redirect meet on the target check.testing-web-cache-attacks - a header reflected into a cached response is the poisoning primitive that skill
treats, and the cache-key analysis is shared.hunting-unicode-normalization-and-canonicalization-bypass - encoded or ambiguous hosts that split check
from use are a canonicalization failure that skill analyzes directly.hunting-dns-rebinding-and-ssrf-pivots - a fetch allowlist beaten by a parser differential feeds the
server-side request forgery reach that skill covers.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub unboundcompute/security-agent-skills --plugin security-agent-skills194 skills in this plugin
/adjudicating-dependency-cve-reachabilityDecide whether a CVE in a dependency actually exposes your application before you scramble to patch: is the vulnerable function on a real call path from your code, do the trigger preconditions hold, and can an attacker control the input that reaches it. Use when an advisory, SCA scan, or dependency bot flags a CVE and you must separate a genuine exposure from unreachable noise, or justify why you are or are not affected. Covers pinning the vulnerable symbol, call-path reachability, precondition checks, and taint from your entry points./adjudicating-taint-pathsDecide whether a whitebox lead is a real bug by tracing taint from an untrusted source to a dangerous sink and confirming every hop against live source. Use after a scanner, a candidate list, or your own reading surfaces a "this looks dangerous" sink (SQL exec, system/exec, file open, deserialize, template render, redirect target, memcpy) and you must decide whether attacker- controlled input actually reaches it - or kill the lead with evidence. Covers forward and reverse taint, witness paths, sanitizer analysis, and the evidence rules that separate a finding from a false positive.Other plugins' skills for the same job