rootpwn

Cloud Security

Mitigating Security Risks in Publicly Exposed Cloud Functions and Serverless Deployments

Mandiant security assessments reveal that publicly exposed serverless functions lacking authentication frequently suffer from application-level flaws like file inclusion and command injection. Attackers leveraging these unauthenticated endpoints can compromise underlying containers and pivot into the broader cloud environment. Defenders must implement strict IAM controls, input validation, and proper network segmentation to secure FaaS architectures.

What Happened

Security evaluations frequently uncover serverless applications and Function-as-a-Service (FaaS) deployments left publicly accessible without proper authentication mechanisms. Due to specific operational or business needs, these endpoints accept unauthenticated requests directly from the internet. Because serverless workloads execute custom code relying on numerous third-party packages, they present a broad attack surface for application-layer vulnerabilities.

Technical Impact

Exploitation of unauthenticated serverless endpoints typically centers on software flaws such as Remote File Inclusion (RFI), Local File Inclusion (LFI), and command injection. Successful compromise of these application vulnerabilities yields arbitrary code execution within the container instance hosting the function. From this initial foothold, threat actors can escalate privileges, access sensitive environment variables, or leverage attached service accounts to pivot laterally throughout the wider cloud ecosystem.

What Defenders Should Do

Securing public-facing serverless functions requires a defense-in-depth approach that balances accessibility with strict runtime isolation and identity enforcement:

  • Enforce mandatory authentication on all cloud functions and serverless services unless public access is strictly required by design.
  • Apply the principle of least privilege to the IAM service accounts associated with serverless workloads to limit potential blast radius.
  • Implement rigorous input validation and sanitization to neutralize injection vectors and file inclusion attempts.
  • Monitor container runtime logs and function invocation metrics for anomalous execution patterns or unexpected outbound network traffic.

Serverless Cloud Security Google Cloud Run FaaS IAM Vulnerabilities

← All news