Written by: Mio Kanzaki(Security Analyst (AI))Reviewed by: 千葉圭介Updated
HTTP header injection is a flaw in how a site builds the opening part of its reply, the HTTP header, which carries instructions such as "move to this page" or "store this cookie". If a value from outside contains a line break and the site lets it through, an extra header line can be added. Sites that build a redirect or cookie from a URL or form value are affected, and visitors are harmed. Ask your agency or host whether the header code refuses line breaks. We publish no attack steps.
Check this first: sites that should be reviewed
If any of these fits your site, review how it builds headers.
- A redirect's destination comes partly from a URL or form value.
- Settings such as language are built from a URL or form value and saved in a cookie.
- Rules forwarding old URLs to new ones were added to the web server configuration.
- A cache server, reverse proxy, or CDN sits in front.
- You run a platform such as KUSANAGI and do not read the provider's notices.
- Custom code writes headers by hand instead of using the framework's standard function.
IPA's material covers sites that build the Location header (the destination) or the Set-Cookie header (a cookie) from external parameters. Take particular care if cookies keep users logged in, or if a cache server sits in front of the site.
How does HTTP header injection happen?
A server's reply has header lines first, then the body. Each header line ends with a line break (two control characters, CR and LF). If a line is built from an outside value and its line breaks pass through, a new line appears. MITRE's CWE-113 defines the weakness as failing to neutralise line breaks in header values, and OWASP names untrusted input reaching the response header unchecked as the cause.
In the diagram, step 2 is the dividing line. Headers are complicated, so IPA advises using the header output function the language or runtime provides.
What damage can it cause?
IPA names three threats: a fake display or embedded script, as in cross-site scripting; arbitrary cookies stored in a visitor's browser; and cache poisoning, where a cache server keeps fake content so a swapped page reaches many people for long. Visitors see false content on a screen they trust, while the owner finds nothing changed on the site.
How does it differ from similar flaws?
Open redirect lets outsiders choose the destination itself, while header injection adds lines to the reply, sometimes through the same forwarding feature. Cache poisoning makes a cache keep fake content, and a changed header is one route. XSS can follow from a changed header too.
What cases have public bodies published? KUSANAGI and WebLogic
JVN, the portal run by JPCERT/CC and IPA, has published several flaws of this type. We cover two.
KUSANAGI (JVNVU#92635551)
JVNVU#92635551 (9 November 2026) concerns KUSANAGI from GMO Prime Strategy, Inc. The flaw sat in a redirect rule inside an Nginx configuration file for WordPress (CVE-2026-117477, CWE-113). A crafted URL can make the HTTP response include an arbitrary header.
KUSANAGI 7 is affected in all versions, as are the Free, Business and Premium Editions of KUSANAGI 8. For KUSANAGI 9, the Security and Enterprise Editions are affected up to 10.7.2-1, and the Free, Business and Premium Editions up to 9.12.2-1. Apache httpd setups are not affected. The CVSS v3.1 base score is 6.1 and v4.0 is 5.1. JVN's remedy is to update as the developer advises, or to apply mitigations if that is not possible.
Oracle WebLogic Server (JVN#93541851)
JVN#93541851 (24 January 2024) covers Oracle WebLogic Server 12.2.1.4.0 and 14.1.1.0.0 (CVE-2024-20927). JVN says a third party could abuse it for XSS and similar attacks, causing page tampering or script execution. Mitsui Bussan Secure Directions, Inc. reported it to IPA. The remedy is to update as the vendor advises.
What the two cases show
The flaw is not always in code you wrote: KUSANAGI's was a forwarding rule in a server configuration file. A CVSS v3.1 score of 6.1 is not extreme, yet visitors' replies could be changed. Both cases start with updating as the provider advises, so owners must notice when their platform's provider publishes a flaw.
How can you check your own site?
Check only sites you manage.
- List your platform and version. In WordPress, open Updates in the dashboard for waiting updates.
- Search JVN iPedia, the vulnerability database. If an entry mentions HTTP header injection and lists your version, update.
- Read the provider's notices, such as KUSANAGI's announcements or your host's vulnerability page.
- Ask your agency. Is the redirect or cookie value built from a URL or form value? Do headers use the framework's standard function? Do forwarding rules use part of the URL?
The Network tab in your browser's developer tools shows whether a URL or form value appears unchanged in a reply header. Testing with crafted values is assessment work, so do not try it alone.
How much of the check can you do yourself?
These steps show whether a known flaw applies. Confirming that line breaks are removed at every entry point (URL, form, cookie, other headers) is a job for an expert who can see your real setup.
How to prevent HTTP header injection
For developers
IPA names two root fixes. One is to use the header output function the runtime or language provides, applying the fix patch if it has a known line-break defect. The other, if you must build a header yourself, is a check that refuses line breaks, for example by adding a space after a break, deleting everything after it, or stopping the process.
Stripping line-break codes from all external input is only a supplementary measure, because it breaks fields that need them. CWE-113 advises accepting only forms that match the specification exactly, not relying on a deny list alone, and converting input to its internal form before checking.
- Do not build redirects or cookies from URL or form values. Let visitors pick a number from a list kept on the server.
- Check that Nginx or Apache forwarding rules never copy part of the URL into a header.
For site owners
- Update the core, plugins, themes, and server platform, and delete unused plugins (item 1 on our fix menu).
- Assign someone to read notices from your platform and host, and search JVN iPedia monthly.
- A WAF (a filter that blocks suspicious traffic) helps, but IPA's root fix is correcting the header-building code (item 9 on the fix menu).
- Send your agency any custom forwarding rules for review.
What can you do yourself, and when should you call an expert?
Call an expert if you wrote or changed forwarding rules or header-output code, if a cache server or CDN sits in front, or if cookies are handled behind login. The free URL check (JPY 0) shows only what is visible from outside, so it cannot tell whether this flaw exists. Yen amounts below exclude tax; "from" means the starting price.
- WordPress/CMS site assessment: from JPY 49,800 (excl. tax), up to 30 pages
- Web application assessment, Lite: from JPY 98,000 (excl. tax), up to 10 screens
- Web application assessment, Standard: from JPY 198,000 (excl. tax), up to 20 screens, with manual checks behind login
- Individual vulnerability fix: from JPY 10,000 per issue (excl. tax)
The amount depends on how many screens you have, whether screens sit behind login, how many paid plugins you run, and how urgent the work is. We re-test once after your fixes at no extra charge, and the formal quote comes after the free assessment.
Use the free URL check to see what is visible from outside. If your site builds redirects or cookies from URL values, contact us to agree an assessment scope.
What does cyber-shield check?
Our web application assessment uses automated scanning and a person's judgement, limited to the scope signed off in the consent form. We check how Location and Set-Cookie values are built, whether line breaks are handled at every entry point, and whether forwarding rules write part of the URL into a header. We also check whether a cache server or CDN stores input-dependent replies, and whether open redirect or XSS compounds the result. A written report follows, and we re-test once after your fixes.
Frequently asked questions
How is HTTP header injection different from XSS?
XSS lets someone else's instructions into a page the visitor sees. Header injection adds extra lines to the server's reply header. IPA says the same threats as XSS can follow, plus planted cookies and fake cache content.
Does HTTPS stop it?
No. HTTPS protects traffic on the way, but this flaw arises when the site itself builds a reply containing an outside value, so it also occurs inside an encrypted connection.
Does it affect WordPress sites?
Yes. The KUSANAGI case of November 2026 came from a redirect rule in an Nginx configuration file for WordPress. The same weakness can enter through the server, a plugin, or a custom theme.
Is removing line breaks from input enough?
IPA calls it a supplementary measure. The root fix is the output function built for headers. Stripping breaks everywhere also breaks fields that need them, so limit it to values used in headers.
How much does it cost to check for HTTP header injection?
The free URL check is JPY 0 but shows only what is visible from outside, so it cannot say whether this flaw exists. A WordPress/CMS site assessment is from JPY 49,800 (excl. tax), Lite web application assessment from JPY 98,000 (excl. tax), and Standard, with manual checks behind login, from JPY 198,000 (excl. tax).
Next step
Today, list your platform and version and search JVN iPedia for them. For the view from outside, use the free URL check. Then contact us to agree an assessment scope.
Frequently asked questions
How is HTTP header injection different from XSS?
XSS lets someone else's instructions into a page the visitor sees. Header injection adds extra lines to the server's reply header. IPA says the same threats as XSS can follow, plus planted cookies and fake cache content.
Does HTTPS stop it?
No. HTTPS protects traffic on the way, but this flaw arises when the site itself builds a reply containing an outside value, so it also occurs inside an encrypted connection.
Does it affect WordPress sites?
Yes. The KUSANAGI case of November 2026 came from a redirect rule in an Nginx configuration file for WordPress. The same weakness can enter through the server, a plugin, or a custom theme.
Is removing line breaks from input enough?
IPA calls it a supplementary measure. The root fix is the output function built for headers. Stripping breaks everywhere also breaks fields that need them, so limit it to values used in headers.
How much does it cost to check for HTTP header injection?
The free URL check is JPY 0 but shows only what is visible from outside, so it cannot say whether this flaw exists. A WordPress/CMS site assessment is from JPY 49,800 (excl. tax), Lite web application assessment from JPY 98,000 (excl. tax), and Standard, with manual checks behind login, from JPY 198,000 (excl. tax).