Skip to content

ALB does not drop HTTP headers

Description

This policy ensures that Application Load Balancers (ALBs) are configured to drop HTTP headers that do not conform to RFC specifications. This improves security by preventing header injection attacks and other potential misuse of faulty headers.

Code Example

go
resource "aws_alb" "test_success" {
    name               = "test-lb-tf"
    internal           = false
                    load_balancer_type = "network"
                    subnets            = aws_subnet.public.*.id
 +                  drop_invalid_header_fields = true
}

Remediation

Terraform

  • Resource: aws_alb
  • Arguments: drop_invalid_header_fields

Rule Details

FieldValue
IDIAC-0182
SeverityMEDIUM
IaC TypeCloudformation
FrameworksCloudFormation, Terraform, TerraformPlan, Serverless
Checkov IDCKV_AWS_131

References