π‘οΈ AWS ELB Application Load Balancer is not configured to drop invalid HTTP headersπ’
- Contextual name: π‘οΈ Application Load Balancer is not configured to drop invalid HTTP headersπ’
- ID:
/ce/ca/aws/elb/load-balancer-drop-invalid-headers - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
RELIABILITY
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
- AWS Security Hub: [ELB.4] Application Load Balancer should be configured to drop invalid http headers
Descriptionβ
Descriptionβ
This policy identifies AWS ELB Application Load Balancers that are not configured to drop invalid HTTP header fields. By default, the
routing.http.drop_invalid_header_fields.enabledattribute is set tofalse, which allows the load balancer to forward HTTP headers that do not conform to protocol specifications to target groups.Note: The
routing.http.drop_invalid_header_fields.enabledattribute was introduced to provide baseline protection against HTTP desync by dropping malformed HTTP headers. Therouting.http.desync_mitigation_modeattribute (AWS ELB Load Balancer is not configured with defensive or strictest desync mitigation mode) was later added to offer more comprehensive and configurable protection against HTTP desync attacks. You are not required to enable both attributes; instead, you should select the option that best aligns with your applicationβs security and compatibility requirements.Rationaleβ
Enabling this feature helps protect backend applications from HTTP Request Smuggling and HTTP Desynchronization attacks. These attack techniques exploit malformed or ambiguous HTTP headers to bypass security controls, poison web caches, or hijack user sessions. By dropping invalid headers at the load balancer level, only well-formed and standards-compliant requests are allowed to reach backend services, reducing the overall attack surface.
... see more
Remediationβ
Remediationβ
Enable Drop Invalid Header Fields Attributeβ
Configure the Application Load Balancer to drop HTTP header fields that do not conform to protocol specifications. This ensures that only well-formed requests are forwarded to backend target groups.
From Command Lineβ
Run the following AWS CLI command, replacing the placeholder with the ARN of the Application Load Balancer:
aws elbv2 modify-load-balancer-attributes \
--load-balancer-arn {{load-balancer-arn}} \
--attributes Key=routing.http.drop_invalid_header_fields.enabled,Value=trueAfter the command completes successfully, the load balancer will reject requests containing invalid HTTP headers.