Check ID:
Provider: AWS
Service:
Severity: MEDIUM
Categories:
Resource type:
cloudfront_distributions_origin_traffic_encryptedProvider: AWS
Service:
cloudfrontSeverity: MEDIUM
Categories:
encryptionResource type:
AwsCloudFrontDistributionWhat this check verifies
CloudFront distributions are evaluated for TLS to origins. The check ensures custom origins useorigin_protocol_policy=https-only, or match-viewer only when the viewer protocol policy disallows HTTP. For S3 origins, it inspects the viewer protocol policy and flags allow-all as permitting non-encrypted paths.
Risk
Unencrypted origin links enable on-path interception and manipulation. Secrets, cookies, and PII can be exposed, and responses altered, undermining confidentiality and integrity. This increases chances of session hijacking, cache poisoning, and malicious content injection.Recommendation
Enforce end-to-end HTTPS. Setorigin_protocol_policy to https-only and viewer policy to https-only or redirect-to-https. Use trusted certificates and modern TLS (TLSv1.2+), disabling weak protocols. Apply least privilege and defense in depth by restricting direct origin access and preferring private connectivity.
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
aws cloudfront get-distribution-config —id <DISTRIBUTION_ID> —output json > current-config.json && echo ‘Manually edit current-config.json to change Origins[].CustomOriginConfig.OriginProtocolPolicy to https-only’, then run:’ && echo ‘aws cloudfront update-distribution —id <DISTRIBUTION_ID> —distribution-config file://current-config.json —if-match $(aws cloudfront get-distribution-config —id <DISTRIBUTION_ID> —query “ETag” —output text)’
References
- https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https.html
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/CloudFront/cloudfront-traffic-to-origin-unencrypted.html
- https://docs.aws.amazon.com/securityhub/latest/userguide/cloudfront-controls.html#cloudfront-9
- https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-cloudfront-to-custom-origin.html
- https://docs.aws.amazon.com/whitepapers/latest/secure-content-delivery-amazon-cloudfront/custom-origin-with-cloudfront.html
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = cloudfront_distributions_origin_traffic_encrypted. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks