Navigation
  • SEARCH HERE
  • SOLUTIONS
    • Information Security Solutions
      • Enterprise Application Security Solutions in Asia
      • Network & Infrastructure Security Solutions
      • Zero Trust Security
      • Security Information and Event Management
      • Remote Monitoring & Management (RMM)
      • File Integrity Management
      • Systems Administration Tools
      • Data Loss Prevention
      • Data / Password Recovery
      • IT Management Solution Offering | Distributor in Asia
      • Identity and Access Management Solution Offering | Distributor in Asia
      • Employee Activity Monitoring (EAM)
      • Digital Forensic Investigation
    • Software Development Solutions
      • Integrated Development Environments
      • Development Components
        • UI Tools
        • Networking Components
        • Office Components
        • Barcode Components
        • Communication Components
      • Imaging Solutions
      • Software Localization
      • Release Automation & Management
      • eLearning Authoring Solutions
      • Charting Solutions
      • PDF Solutions
      • Reporting Solutions
      • Testing & QA
      • Text Retrieval / Enterprise Search
      • Database
  • Services
    • Live Solution Walkthroughs
    • Implementation Services
    • Best Practices Consulting
    • Pre-Sales and Post-Sales Services
  • What's New
    • Our Event
    • Our Blogs
    • Special Offers
  • About
    • About LOGON Software Asia
    • Our Partnership
  • Publishers - Join our network
  • Resellers - Expand your portfolio
  • Procurement Managers
Site logo
  • Solutions
    • Information Security Solutions
      • Identity and Access Management
        • Privileged Access Management (PAM)
        • Multi-Factor Authentication (MFA)
        • Identification Verification (IV)
        • Self-Service Password Reset (SSPR)
      • Network & Infrastructure Security
        • DDoS Mitigation and Protection
        • Digital Forensic Investigation
        • Malware Detection & Analysis
        • Network Monitoring Software
        • Email Security
        • Log Monitoring
      • Endpoint & Device Security
        • Patch Management
        • Remote Monitoring & Management (RMM)
        • Employee Activity Monitoring (EAM)
        • Mobile Device Management (MDM)
      • IT Management
        • IT Service Management
        • IT Asset Management
        • Software Asset Management
        • Hardware Asset Management
        • Software License Management
        • Systems Administration Tools
      • Application Security
        • Development Security | Shift Left AppSec | SAST, SCA, IAST
        • Runtime Protection Solutions | DAST, RASP, WAF, Container Security
        • Strategic Management Solutions | ASPM, MAST, VAPT
      • Data Security
        • Data / Password Recovery
        • File Integrity Management
        • Data Loss Prevention
      • Cloud Security
        • Cloud Security Posture Management
        • Cloud Work Protection
      • External Attack Surface Management
        • Cyber Threat Intelligence
        • Third Party Risk Management
      • Security Operations & Incident Management
        • Security Information and Event Management
        • Security Orchestration, Automation and Response (SOAR)
      • Zero Trust Security
    • Software Development Solutions
      • Integrated Development Environments
      • Imaging Solutions
      • UI Tools
      • Charting Solutions
      • Developer Tools
      • Database
      • Networking Components
      • Office Components
      • Barcode Components
      • Release Automation & Management
      • Software Localization
      • Communication Components
      • Automated Testing
      • eLearning Authoring Solutions
      • Reporting Solutions
      • Text Retrieval / Enterprise Search
      • Testing & QA
  • Services
        • Live Walkthrough Sessions

          Experience the full feature of our key solutions through live platform

          View All Sessions >
        • Implementation Services
        • Pre-Sales and Post-Sales Services
        • Best Practices Consulting
  • Partners
    • Our Partners
    • Partner with LOGON Today!
      • Vendors - Join Our Network
      • Resellers - Expand Your Portfolio
      • Procurement Managers
  • Resources
        • ABOUT US

        • About Us
        • Our Locations
        • Careers@LOGON - We are hiring !
        • DISCOVER

        • Our BlogsNEW BLOGS
        • Our EventsJOIN UPCOMING EVENTS
        • LOGON to CyberSecurity PodcastNEW EPISODES
        • GET HELP

        • Contact Us
        • Help Desk
        • Request a Demo
        • Request a Quote
        • COMPLIANCE

        • 🇭🇰 Hong Kong PDPO
        • 🇮🇳 India DPDP Act
        • 🇸🇬 Singapore PDPA
        • 🇹🇭 Thailand PDPA
  • More results...

View large
Acunetix Blog

What is HTTP header injection? | Acunetix

What is HTTP header injection?

This article is originally posted by our partner, Acunetix. Click here to view their original article.

The HTTP header injection vulnerability is a web application security term that refers to a situation when the attacker tricks the web application into inserting extra HTTP headers into legitimate HTTP responses. HTTP header injection is a technique that can be used to facilitate malicious attacks such as cross-site scripting, web cache poisoning, and more. These, in turn, may lead to information disclosure, use of your application in phishing attacks, and other severe consequences.

HTTP header injection is a specific case of a more generic category of attacks: CRLF injections. If the attacker is able to inject a CRLF sequence (carriage return and line feed) into the response, they are able to add various fake entries or change existing data: not just headers but even the entire response body.

 

What causes HTTP header injection vulnerabilities?

Just like most web application security vulnerabilities, HTTP header injection vulnerabilities (and CRLF injection vulnerabilities in general) are the result of overtrusting user input. If the developer of a web application uses external data directly in HTTP responses, it’s usually possible to perform an HTTP header injection attack.

For example, imagine that your business moved to a new domain and, for convenience, you want user bookmarks to still work. The original domain was example.com but now your site is available at example.info. If your regular user visits an obsolete URL such as http://www.example.com/page1, you want the web server to automatically redirect the user to the respective new URL: http://www.example.info/page1.

To achieve the above goal, you can build a simple web application at example.com that takes the path from the HTTP request and appends it to http://www.example.info/. If the developer of that application does not eliminate CR and LF special characters from the input data before appending it to the new base URL, an attacker may use this application to perform HTTP header injection attacks.

 

Anatomy of an HTTP header injection attack

HTTP header injection attacks are in many ways similar to cross-site scripting (XSS) attacks. As such, there are reflected HTTP header injection attacks and (less common) stored HTTP header injection attacks.

 

Reflected HTTP header injection

Imagine that you are the owner of the example.com domain and that an attacker wants to take advantage of your HTTP header injection vulnerability described above. They prepare a phishing campaign and send the following URL: http://example.com/page1%0d%0aLocation:vulnweb.com

As a result of the HTTP header injection, the CRLF characters are inserted into the response and followed by a new Location: header. The web browser (depending on the browser type and configuration) will redirect the user to the attacker’s site (here: vulnweb.com).

 

Stored HTTP header injection

Stored HTTP header injection vulnerabilities and related attacks are quite rare. In this case, malicious user input is stored by the web application, for example in a database, and then used directly in the HTTP response sent to other users.

Just like in the case of stored cross-site scripting vulnerabilities, stored HTTP header injection is more dangerous because it may potentially affect all users that visit your website or use your web application.

 

Consequences of HTTP header injection attacks

We described the simplest case of an HTTP header injection attack above – the attacker may exploit an HTTP header injection vulnerability directly to use your domain as a basis for a phishing attack.

However, there are more potential consequences of HTTP header injection. For example, the attacker may use HTTP header injection to inject new headers that loosen the same-origin policy security restrictions, thus making it possible to perform other attacks that would otherwise be impossible, for example, CSRF.

Another potential use of HTTP header injection attacks is HTTP response splitting. In such a case, the attacker not only injects new HTTP response headers but also the entire response body. Using the Content-Length header, they are able to make the victim’s browser completely ignore the legitimate body of the response (and remaining legitimate headers).


How to detect and avoid HTTP header injection vulnerabilities

The best way to detect HTTP header injection vulnerabilities is to use a renowned web vulnerability scanner such as Acunetix®. Acunetix has tests for CRLF injection and specific tests for HTTP header injection as well. Since the impact of CRLF injection, in general, may be severe (similar to the impacts of cross-site scripting), these vulnerabilities should not be treated lightly despite not being specifically mentioned in the OWASP Top 10.

Since HTTP header injection is the result of improper neutralization of CRLF sequences, the best way to avoid such vulnerabilities is to encode CRLF sequences from user input before using it in HTTP responses. This also prevents consequences of other attacks that exploit CRLF injection, which can even lead to sensitive information breaches, corruption of log files, or code execution.


Referred Solution

Acunetix

Acunetix is an application security testing solution for securing your websites, web applications, and APIs. As the first company to build a fully dedicated and fully automated web vulnerability scanner, Acunetix carries unparalleled experience in the field of web security. The Acunetix web vulnerability scanner is recognized as a leading solution for most of the demanding sectors including many fortune 500 companies.

View Product

Book a Demo with our Acunetix Specialist

Book a Demo
Contact Us Today

FOLLOW US ON

  • LinkedIn
  • Facebook
  • Instagram
  • Twitter
  • YouTube
Read Next:
Application Security BlogArtificial IntelligenceBlogLOGON Blog
AI-Augmented Penetration Testing: Meeting the Scale Challenge
Application Security BlogArtificial IntelligenceBlogIT Management BlogLOGON Blog
The First Autonomous AI Cyber Attack is Here: Is Your Enterprise Ready?
Application Security BlogBlogLOGON Blog
Shift Left, Verify Right: The Blueprint for Modern Application Security Across Asia

Privacy Policy Company Overview

COMPANY

Our Location Career with LOGON Our Partners

SERVICES

Training Services Implementation Services Pre-Sales and Post-Sales Services Best Practices Consulting

GET IN TOUCH

Phone:
Hong Kong: +852 2512 8491
India: +91 70220 22744 / +91 63668 26133
Email: [email protected] ©2025 LOGON International Ltd. All rights reserved
logon logo WHITE

Search engine

Use this form to find things you need on this site

More results...

Fill in the form below
  • This field is for validation purposes and should be left unchanged.
  • This field is hidden when viewing the form
  • This field is hidden when viewing the form

Watch On-demand Webinar

  • This field is for validation purposes and should be left unchanged.

Get Your Free UserLock Trial

  • This field is for validation purposes and should be left unchanged.

Download Your Free Trial 10-Day Trial Today

  • Downloading and evaluating Smart Package Studio is quick and easy
  • Includes a short introductory guide that suggests smart features to try
  • Access the full functionality of Smart Package Studio during the trial
  • This field is for validation purposes and should be left unchanged.

Request for Priority Support with our support team

  • This field is for validation purposes and should be left unchanged.
  • Drop files here or
    Max. file size: 30 MB.

    Get Free Assessment of your Web Asset

    Request a free non-intrusive security assessment of your website. Get a report with an overview of client-side security risks.

    • This field is for validation purposes and should be left unchanged.
    • This field is hidden when viewing the form

    Recommend a Topic

    • This field is for validation purposes and should be left unchanged.

    Partner with Us on the next episode

    • This field is for validation purposes and should be left unchanged.

    Watch On-demand Webinar

    • This field is for validation purposes and should be left unchanged.
    Start PreCrime Network for Free

    Oops! We could not locate your form.

    Book a Free Demo Today

    Get Your Free Trial

    Oops! We could not locate your form.

    Get Your Free Trial
    • This field is for validation purposes and should be left unchanged.
    • This field is hidden when viewing the form
    • This field is hidden when viewing the form
    Request for Training Quote

    Oops! We could not locate your form.

    Request for Training Quote

    Oops! We could not locate your form.

    Request for Training Quote

    Oops! We could not locate your form.

    Request for Training Quote
    • This field is for validation purposes and should be left unchanged.
    • Please enter a number from 1 to 20.
    • This field is hidden when viewing the form
    Request for Training Quote
    • This field is for validation purposes and should be left unchanged.
    • Please enter a number from 1 to 20.
    • This field is hidden when viewing the form
    Request for Training Quote
    • Please enter a number from 1 to 20.
    • DD slash MM slash YYYY
    Request for Training Quote
    • This field is for validation purposes and should be left unchanged.
    • Please enter a number from 1 to 20.
    • DD slash MM slash YYYY
    Request for Training Quote
    • This field is for validation purposes and should be left unchanged.
    • Please enter a number from 1 to 20.
    • DD slash MM slash YYYY
    Request for Training Quote
    • This field is for validation purposes and should be left unchanged.
    • Please enter a number from 1 to 20.
    • This field is hidden when viewing the form