Application Security Issues in AI Edge and Serverless Runtimes: AWS Lambda, Vercel Edge Functions, and Cloudflare Workers

This series shows how vulnerabilities propagate through the stack and provides a framework for defending AI applications in production.

written by
Mahesh Babu
published on
September 8, 2025
topic
Application Security

Introduction

AI workloads are increasingly deployed on serverless runtimes like AWS Lambda, Vercel Edge Functions, and Cloudflare Workers. These platforms reduce operational overhead but introduce new application-layer risks. Product security teams must recognize that serverless runtimes are not inherently safer—they simply shift the attack surface.

AWS Lambda: Metadata Service Exploitation

AWS Lambda functions often run with IAM roles attached. Attackers who compromise a Lambda environment can query the cloud metadata service at 169.254.169.254 to obtain temporary credentials. In multiple incidents, leaked Lambda credentials were used to pivot into broader AWS accounts. Without strict IAM scoping, this vulnerability escalates quickly from a function-level issue to account-wide compromise.

Vercel Edge Functions: Input Validation Gaps

Vercel Edge Functions run close to the user and execute JavaScript at the edge. Input validation errors can have amplified impact because attacks propagate across distributed nodes. In one red team test, unvalidated input in an Edge Function enabled persistent XSS that spread globally within minutes. Application teams deploying AI inference at the edge often underestimate this propagation risk.

Cloudflare Workers: Secrets Exposure and Durable Objects

Cloudflare Workers integrate tightly with Durable Objects and KV storage. Misconfigured Workers have been caught logging secrets or exposing them via debugging endpoints. In one 2023 report, API keys were left in plaintext logs accessible from Cloudflare dashboards. This issue is especially relevant for AI applications where sensitive tokens (OpenAI, Anthropic, Hugging Face) are frequently handled by Workers.

MITRE ATT&CK Mapping

Platform Threat Vector MITRE Technique(s) Example
AWS Lambda Metadata service exploitation T1552 – Unsecured Credentials Attackers stealing IAM tokens via 169.254.169.254
Vercel Edge Functions Input validation failures T1059.007 – JavaScript Execution Malicious payload causing global XSS via edge deployment
Cloudflare Workers Secrets exposure in logs T1530 – Data from Cloud Storage Object API keys logged in plaintext in Worker dashboards

Conclusion

Serverless runtimes simplify scaling but expand security risk. AWS Lambda exposes IAM credentials through metadata services. Vercel Edge Functions can magnify small input validation errors into global security incidents. Cloudflare Workers frequently mishandle secrets and storage. Application security teams must enforce strict IAM scoping, sanitize inputs aggressively, and ensure no secrets are logged or exposed during execution.

References

  • AWS. (2023). Security best practices for Lambda. AWS Documentation. https://docs.aws.amazon.com/lambda/latest/dg/security.html
  • Vercel. (2024). Edge function security considerations. Vercel Docs. https://vercel.com/docs/edge-network
  • Cloudflare. (2024). Workers security practices. Cloudflare Docs. https://developers.cloudflare.com/workers/platform/security/
  • MITRE ATT&CK®. (2024). ATT&CK Techniques. MITRE. https://attack.mitre.org/

Blog written by

Mahesh Babu

Head of Marketing

More blogs

View all

From Discovery to Resolution: A Single Source of Truth for Vulnerability Statuses

Continuous visibility from first discovery to final resolution across code repositories and container images, showing who fixed each vulnerability, when it was resolved and how long closure took. Kodem turns issue statuses into ownership for engineers, progress tracking for leadership and defensible risk reduction for application security.

October 27, 2025

Kai Gets Internet Access: Turning Context Into Intelligence for Product Security Teams

For years, product security teams have lived with a gap. Tools surfaced findings — CVEs, outdated packages, risky dependencies — but rarely the context to make sense of them. Engineers still had to open a browser, type a CVE into Google, skim through NVD, vendor advisories, GitHub issues, and random blogs to answer basic questions: Is this actually exploitable in our environment? Is there a safe upgrade path? Has anyone seen this exploited in the wild? This release closes that gap.

October 15, 2025

When NPM Goes Rogue: The @ctrl/tinycolor Supply-Chain Attack

On September 15, 2025, researchers at StepSecurity and Socket disclosed a large, sophisticated supply-chain compromise in the NPM ecosystem. The incident centers around the popular package @ctrl/tinycolor (with over two million weekly downloads), but it extends far beyond: 40+ other packages across multiple maintainers were also compromised.

September 16, 2025

A Primer on Runtime Intelligence

See how Kodem's cutting-edge sensor technology revolutionizes application monitoring at the kernel level.

5.1k
Applications covered
1.1m
False positives eliminated
4.8k
Triage hours reduced

Platform Overview Video

Watch our short platform overview video to see how Kodem discovers real security risks in your code at runtime.

5.1k
Applications covered
1.1m
False positives eliminated
4.8k
Triage hours reduced

The State of the Application Security Workflow

This report aims to equip readers with actionable insights that can help future-proof their security programs. Kodem, the publisher of this report, purpose built a platform that bridges these gaps by unifying shift-left strategies with runtime monitoring and protection.

Get real-time insights across the full stack…code, containers, OS, and memory

Watch how Kodem’s runtime security platform detects and blocks attacks before they cause damage. No guesswork. Just precise, automated protection.

Stay up-to-date on Audit Nexus

A curated resource for the many updates to cybersecurity and AI risk regulations, frameworks, and standards.