header-injection
Skill20 starsChanged 4 months agoMITView on GitHub
Detects HTTP response header construction from user input vulnerable to CRLF
1 other project uses a version of this.
Adopted by
Most recently taken up by
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- conjure-3301/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository52 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- authentication-failuresSkill
- broken-access-controlSkill
- concurrency-correctnessSkill
- contract-reviewSkill
- cryptographic-failuresSkill
- crypto-library-misuseSkill
- csrfSkill
- exceptional-conditionsSkill
- excessive-agencySkill
- file-uploadSkill
- graphql-securitySkill
- hardcoded-secretsSkill
- hotspotsSkill
- injectionSkill
- insecure-designSkill
- insecure-local-storageSkill
- insecure-output-handlingSkill
- insecure-plugin-designSkill
- integrity-failuresSkill
- ipc-securitySkill
- llm-supply-chainSkill
- logging-failuresSkill
- mass-assignmentSkill
- mcp-securitySkill
- memory-api-misuseSkill
- model-dosSkill
- model-theftSkill
- multi-agent-trustSkill
- nosql-injectionSkill
- numeric-trust-boundarySkill
- oauth-implementationSkill
- open-redirectSkill
- overrelianceSkill
- path-traversalSkill
- privilege-handlingSkill
- prompt-injectionSkill
- prototype-pollutionSkill
- pr-reviewSkill
- race-conditionSkill
- rag-securitySkill
- redosSkill
- security-cleanupSkill
- security-misconfigurationSkill
- security-reviewSkill
- sensitive-disclosureSkill
- ssrfSkill
- supply-chainSkill
- threat-modelSkill
- token-smugglingSkill
- training-data-poisoningSkill
- unsafe-api-consumptionSkill
The file
Files
HTTP Header Injection Security Check (CWE-113)
What this checks
Protects against HTTP response header injection where user input containing CR/LF characters is included in response headers, allowing attackers to inject arbitrary headers or split the HTTP response. Exploitation leads to cache poisoning, session fixation, XSS via injected headers, and response splitting.
Vulnerable patterns
- Response header value set directly from a request parameter with no CR/LF stripping
Content-Dispositionfilename interpolated from user input without normalizationLocationredirect header built from a caller-supplied URL with no validation- Forwarded request header (correlation ID, user agent, custom header) echoed into an outgoing response without sanitization
- Email or SMTP header value built from form input without rejecting newline characters
Fix immediately
Flag the vulnerable code and explain the risk. Translate the principles below to the audited file's language and HTTP framework — use that stack's documented header API and string-sanitization helpers.
For each finding, establish these properties:
- Every header value derived from user input is stripped of CR/LF before it reaches the header-set call. A single newline sequence in a value ends the header block and starts a new header (or a new response body). The strip happens at or before the call site — relying on the framework to reject it is fragile across versions.
- Forwarded headers are sanitized too. Values read from incoming requests (correlation IDs, user agents, custom headers) are attacker-controlled just like form inputs. Echoing them into outgoing responses or logs without stripping is the same vulnerability.
- Content-Disposition filenames are normalized — CR/LF stripped, quotes
escaped, and for international characters use the RFC 5987
filename*form rather than raw UTF-8 in the header value. - Redirect Location headers are validated too. A newline sequence in the
target URL splits the response; see the
open-redirectskill for target-host validation.
Verification
- Every HTTP response header value derived from user input has CR and LF characters stripped or rejected before being set
- Content-Disposition filenames from user input are sanitized for CR/LF and special characters
- Forwarded headers (correlation IDs, request IDs) from incoming requests are sanitized before inclusion in outgoing responses
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

