# Ensure Application Load Balancer is dropping invalid packets to prevent header based http request smuggling

- Source: https://support.icompaas.com/support/solutions/articles/62000223609-ensure-application-load-balancer-is-dropping-invalid-packets-to-prevent-header-based-http-request-smu
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [Security Controls](https://support.icompaas.com/support/solutions/62000065178) › [AWS Services](https://support.icompaas.com/support/solutions/folders/62000097507)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

### **Description:**

The Application Load Balancer is a feature of Elastic Load Balancing that allows a developer to configure and route incoming end-user traffic to applications based in the AWS public cloud. HTTP request smuggling vulnerabilities arise when the frontend and the backend interpret the boundary of an HTTP request differently causing desynchronization between them. This is due to numerous frontend and backend libraries deviating from RFC specifications when dealing with both the Content-Length and the Transfer-Encoding header.

Therefore, Amazon Elastic Load Balancing (ELB) service introduced the Drop Invalid Header Fields feature (i.e. "routing.http.drop\_invalid\_header\_fields.enabled" flag) to improve security by enabling users to control whether an Application Load Balancer will forward non-standard headers sent in requests by clients to load balancer targets. We are setting drop\_invalid\_header\_fields from false to true prevents HTTP desync attacks

### **Rationale:**

Passing unknown or invalid headers through to the target poses a potential risk of compromise. By setting drop\_invalid\_header\_fields to true, anything that does not conform to well-known, defined headers will be removed by the load balancer.

### **Impact:**

Removing these header values prevents HTTP desync attacks and vulnerabilities.  

### **Default value:**

By default application load balancers are not configured to drop invalid HTTP header values. 

  

### **Pre-Requisite:**

1.  Before implementation, you have at least an Application Load Balancer in your AWS account.
    
2.  If you have multiple Load Balancer classics and applications both make sure to implement only in the application load balancer
    

### **Remediation:**

### **Test Plan:**

1.  Sign in to the AWS Management Console.
    
2.  Navigate to the Amazon EC2 console at [https://console.aws.amazon.com/ec2/home](https://support.icompaas.com/support/solutions/articles/%E2%80%8Bhttps%3A//console.aws.amazon.com/ec2/home)
    
3.  In the left navigation panel, under the **LOAD BALANCING** section, choose **Load Balancers**.![](https://support.icompaas.com/assets/kb/1beae915c48d9d80.png)
    
4.  Select the Application Load Balancer that you want to examine. An Application Load Balancer (ALB) has the **Type** attribute value set to the **application** in the **Type** column. ![](https://support.icompaas.com/assets/kb/1f6561e19d8c6385.png) 
    
5.  Select the **Description** tab to access the configuration information available for the selected load balancer. ![](https://support.icompaas.com/assets/kb/8a821fb27d232f2c.png) 
    
6.  In the **Attributes** section, verify the **Drop Invalid Header Fields** configuration attribute value. If the **Drop Invalid Header Fields** attribute value is set to **Disabled**, the Drop Invalid Header Fields feature is not enabled for the selected Amazon Application Load Balancer (ALB). ![](https://support.icompaas.com/assets/kb/935366602eefeb6f.png) 
    
7.  Repeat steps no. 4 – 6 for each Application Load Balancer created within the current AWS region.
8.  Change the AWS cloud region from the navigation bar and repeat the audit process for other regions.

  

  

**Using AWS CLI:**

**To describe the Drop Invalid Header Fields feature status, available for the selected load balancer:** 

aws elbv2 describe-load-balancer-attributes  
  --region us-east-1  
  --load-balancer-arn arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/cc-web-production-alb/abcdabcdabcdabcd  
  --query 'Attributes\[?(Key == \`routing.http.drop\_invalid\_header\_fields.enabled\`)\].Value | \[\]'

The command output should return the requested configuration status (**true** for enabled, **false** for disabled).

### **Implementation:**

1.  Sign in to the AWS Management Console.
    
2.  Navigate to the Amazon EC2 console at [https://console.aws.amazon.com/ec2/home](https://support.icompaas.com/support/solutions/articles/%E2%80%8Bhttps%3A//console.aws.amazon.com/ec2/home)
    
3.  In the left navigation panel, under **LOAD BALANCING**, choose **Load Balancers**.
    
4.  Select the Application Load Balancer that you want to configure. 
    
5.  Select the **Description** tab and click on the **Edit attributes** button available in the **Attributes** section. ![](https://support.icompaas.com/assets/kb/971d4a7b5c9c74de.png) 
    
6.  Within the **Edit load balancer attributes** configuration box, select the **Drop Invalid Header Fields** configuration checkbox to enable the Drop Invalid Header Fields security feature for the selected Application Load Balancer. Click **Save** to apply the configuration changes. ![](https://support.icompaas.com/assets/kb/03749acb80d044ad.png) 
    
7.  Repeat steps no. 4 – 6 to enable the feature for other Application Load Balancers (ALBs) available within the current AWS region.
8.  Change the AWS cloud region from the navigation bar and repeat the remediation process for other regions.

  

  

**Using AWS CLI:**

**To enable the Drop Invalid Header Fields security feature for the selected load balancer:** 

aws elbv2 modify-load-balancer-attributes  
  --region us-east-1  
  --load-balancer-arn arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/cc-web-production-alb/abcdabcdabcdabcd  
  --attributes Key=routing.http.drop\_invalid\_header\_fields.enabled,Value=true

**The command output should return the configuration attributes for the modified Application Load Balancer.** 

### **Backout plan:**

1.  Sign in to the AWS Management Console.
    
2.  Navigate to the Amazon EC2 console at [h](https://console.aws.amazon.com/ec2/ "https://console.aws.amazon.com/ec2/")[ttps://console.aws.amazon.com/ec2](https://console.aws.amazon.com/ec2/ "https://console.aws.amazon.com/ec2/")[/](https://console.aws.amazon.com/ec2/ "https://console.aws.amazon.com/ec2/").
    
3.  In the left navigation panel, under **LOAD BALANCING**, choose **Load Balancers**.
    
4.  Select the Application Load Balancer that you want to reconfigure.
    
5.  Select the **Description** tab and click on the **Edit attributes** button available in the **Attributes** section.
    
6.  Within the **Edit load balancer attributes** configuration box, select the **Drop Invalid Header Fields** configuration checkbox to disable the Drop Invalid Header Fields security feature for the selected Application Load Balancer. Click **Save** to apply the configuration changes.
    

  

**Using AWS CLI:**

**To disable the Drop Invalid Header Fields security feature for the selected load balancer set that to False:** 

aws elbv2 modify-load-balancer-attributes  
  --region us-east-1  
  --load-balancer-arn arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/cc-web-production-alb/abcdabcdabcdabcd  
  --attributes Key=routing.http.drop\_invalid\_header\_fields.enabled,Value=False

### **References:**

-   [![](https://support.icompaas.com/assets/kb/4393178b8643ee1a.png)](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html)[Application Load Balancers - Elastic Load Balancing](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html) 
    
-   [https://aws.amazon.com/elasticloadbalancing/features/](https://aws.amazon.com/elasticloadbalancing/features/ "https://aws.amazon.com/elasticloadbalancing/features/")
    
-   [elbv2 — AWS CLI 2.5.2 Command Reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/elbv2/index.html)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
