/security-agent-skills:hunting-crlf-and-response-splittingfrom security-agent-skills
Hunts CRLF injection where untrusted input reaches response headers, log lines, or email headers without stripping newlines. Covers response splitting, header injection, log forging, and email header injection.
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.
Headers, log lines, and email headers are all line-oriented: a carriage return and line feed ends one field and begins the next. When untrusted input flows into one of these unescaped, an attacker who supplies a CRLF sequence stops writing a value and starts writing structure. A newline in a redirect location injects a header, or a blank line followed by a body splits the response into a second one the attacker controls. A newline in a log line forges an entry that frames another user or hides an action. A newline in a mail header adds recipients or spoofs fields. The bug is not the input; it is a writer that concatenates untrusted text into a line-structured format without rejecting the line terminators. You find these by locating every header, log, and email write fed request data and checking whether CR and LF survive.
Test CRLF injection only against systems you own or are authorized to assess, on non-production infrastructure, using benign markers rather than live cache-poisoning or spoofed mail when you confirm. A confirmed split can affect other users through a shared cache, so keep every probe within the authorized scope and prefer an isolated instance. If you can't name the authorization, stop.
Establish whether the writer rejects CR and LF first. For each header, log, and email sink, determine whether the runtime or framework already forbids carriage returns and line feeds in the value, or whether a hand-built string or a permissive stack passes them through. This is the false-positive killer: most modern header APIs reject bare CR and LF, so an injected newline never reaches the wire, while a manually-assembled header or an older interface may not. Name the writer's behavior before crafting input.
Map every line-structured write fed untrusted input. Trace request values into response header assignments, into log-writing calls, and into outbound mail header fields. Note whether the value is set through an API that validates it or concatenated into a raw string. Each such write is a candidate sink.
Distinguish header injection from full response splitting. A single injected header (a forged Set-Cookie, a cache-control override) is one impact; a CRLF followed by a blank line and a body splits the response so the attacker controls a second message, which enables reflected content and cache poisoning. Decide which the sink allows based on how much of the response line structure the input reaches.
Follow the consumer of the injected line. A split response matters when a shared cache stores it or a browser renders the injected content; a forged cookie matters when the app trusts it; a forged log entry matters when an operator or a downstream parser trusts the log; an injected mail header matters when the mail transfer agent acts on it. Identify who consumes the injected structure and what they do with it.
Check the neutralization that actually closes it. The reliable control is to reject or strip CR and LF (and related separators) before the value reaches the writer, or to use an API that encodes or forbids them, and for logs to encode newlines in untrusted fields. Determine which stands between the input and each sink, and whether it covers every write rather than the obvious one.
Confirm and record. Confirm by injecting a benign marker header or a benign extra log field through
the sink and observing it appear as structure on an isolated instance, and for splitting, a controlled
second response or a poisoned cache entry keyed to a marker. Kill the lead if the writer rejects CR and
LF, if the input is encoded or stripped before the write, or if no request data reaches a line-structured
sink. Record the input, the sink, whether it is header injection or a full split, and the consumer, or set
a kill_reason.
Confirm. A redirect endpoint copies a request parameter into the Location header by string concatenation on a stack that does not validate header values. A parameter containing a CRLF, a blank line, and a body splits the response into a second one whose content the attacker controls, and a shared cache stores it against the request key on an isolated instance. Confirmed HTTP response splitting to cache poisoning,
high, remediation = set the Location through an API that rejects CR and LF, strip line terminators from the parameter before use, and validate the redirect target against an allowlist.Kill. The same endpoint sets the Location through a framework API that rejects any value containing CR or LF, strips line terminators from the parameter first, and the log writer encodes newlines in untrusted fields. A parameter carrying a CRLF is rejected before the header is written and no second response is produced. Killed,
kill_reason= "header is set through an API that forbids CR and LF and the input is stripped first, and logs encode newlines; no injected line reaches a header, a split response, or a forged log entry."
You need every response header, log, and outbound email write fed request data, and for each whether the writer rejects CR and LF or concatenates a raw string, plus who consumes the resulting line. For each sink, decide whether an injected newline survives to become structure and whether the consumer treats it as a new header, a split response, a forged record, or an added recipient. Reading the writer settles most leads; a benign marker header, log field, or a cache entry keyed to a marker on an isolated instance settles the rest.
testing-web-cache-attacks - a split response stored by a shared cache is a poisoning primitive that skill
covers, so response splitting feeds directly into it.auditing-open-redirect-and-forced-navigation - the Location header is a shared sink; a redirect target
can be both an open redirect and a CRLF injection point, so audit them together.auditing-session-lifecycle-and-fixation - an injected Set-Cookie header can fix or overwrite a session,
connecting header injection to the session concerns there.testing-smtp-smuggling-and-email-spoofing - email header injection is the application-layer cousin of the
message-boundary confusion that skill treats at the protocol layer.What SKILL.md sets; muted values are Claude Code's defaults
194 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.npx claudepluginhub unboundcompute/security-agent-skills --plugin security-agent-skillsOther plugins' skills for the same job