Check ID:
Provider: AWS
Service:
Severity: MEDIUM
Categories:
Resource type:
awslambda_function_url_cors_policyProvider: AWS
Service:
awslambdaSeverity: MEDIUM
Categories:
internet-exposedResource type:
AwsLambdaFunctionWhat this check verifies
Lambda function URL CORS policy is reviewed forAllowOrigins. The presence of * indicates a wide origin allowance in the CORS configuration.
Risk
Wildcard origins allow any website to call the endpoint from a browser and read responses, weakening origin isolation. This can lead to data exposure (C) and unauthorized actions (I) if state-changing methods are reachable, enabling scripted abuse and cross-origin attacks.Recommendation
Apply least privilege to CORS:- Restrict
AllowOriginsto trusted domains; avoid* - Limit
AllowMethods/AllowHeaders; disableAllowCredentialsunless required - Prefer authenticated access (e.g.,
AWS_IAM) and enforce resource policies for defense in depth
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
References
- https://support.icompaas.com/support/solutions/articles/62000229584-ensure-lambda-function-url-cors-configurations-were-checked
- https://docs.aws.amazon.com/lambda/latest/api/API_Cors.html
- https://tutorialsdojo.com/how-to-configure-aws-lambda-function-url-with-cross-origin-resource-sharing/
- https://dev.to/rimutaka/aws-lambda-function-url-with-cors-explained-by-example-14df
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = awslambda_function_url_cors_policy. 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