Serverless environments reduce infrastructure management, but they also remove many of the stable control points defenders rely on. Functions are ephemeral, stateless, and event-driven, which makes visibility, forensics, and consistent policy enforcement harder. That gap can hide privilege abuse, malicious code execution, misconfigurations, and denial-of-wallet abuse unless controls are designed for short-lived workloads.
Why This Matters for Security Teams
Serverless does not remove risk, it shifts it into places traditional controls see less clearly. Security teams often inherit an operating model where code deploys quickly, privileges are granted loosely, and execution happens outside a stable host footprint. That creates blind spots for identity governance, runtime monitoring, and incident response, especially when functions are chained together through APIs, queues, and event triggers.
This is why NHI discipline matters here. Function roles, execution tokens, webhooks, and service-to-service secrets are all non-human identities in practice, and they are frequently the first place attackers look for overreach. NHIMG’s research on The State of Non-Human Identity Security shows how often organisations struggle with visibility and control across these identities, while the NIST Cybersecurity Framework 2.0 remains clear that governance must cover assets, access, and continuous monitoring rather than only perimeter enforcement.
In practice, many security teams encounter abuse of serverless permissions only after an event-driven workflow has already been used to reach data, invoke downstream services, or generate unexpected cloud spend.
How It Works in Practice
Serverless risk comes from the way control points disappear as the workload becomes more ephemeral. There is no persistent server to harden, but there is still an identity, a policy boundary, and a blast radius. Each function invocation typically assumes a role, reads secrets, calls other services, and emits logs. If those permissions are too broad, the attacker does not need a long-lived foothold. They only need one invocation path.
Security teams should think in terms of runtime authorization and workload identity, not just deployment-time checks. The practical model is to bind each function to the minimum privilege needed, issue short-lived secrets where possible, and monitor every high-risk action at the point of use. That aligns with guidance in Top 10 NHI Issues and with the access and monitoring expectations in NIST CSF 2.0.
- Treat each function role as a non-human identity with its own owner, purpose, and expiry.
- Prefer short-lived tokens and automated rotation over embedded static secrets.
- Log invocation context, downstream API calls, and privilege changes, not just function success or failure.
- Use policy-as-code to block unexpected destinations, data classes, or admin actions at request time.
This guidance breaks down when functions are allowed to inherit broad platform roles across many business processes, because the resulting permissions become too generic to attribute or constrain effectively.
Common Variations and Edge Cases
Tighter serverless controls often increase engineering overhead, so organisations have to balance deployment speed against the cost of deeper governance. That tradeoff is real, especially when multiple teams share event buses, CI pipelines, and cross-account integrations.
Best practice is evolving for cross-service tracing, ephemeral forensics, and just-in-time access in serverless estates. There is no universal standard for this yet, but the direction is consistent: reduce standing privilege, make each execution auditable, and design policies around the actual event context rather than a generic role description. For broader identity maturity, NHIMG’s Ultimate Guide to NHIs — Why NHI Security Matters Now and the challenges section in Ultimate Guide to NHIs — Key Challenges and Risks are useful reference points.
- Cold starts and rapid autoscaling can hide bursty abuse from tools that assume stable hosts.
- Third-party event sources and managed integrations can create trust chains that security teams do not fully own.
- Shared libraries and CI/CD templates can replicate a single misconfiguration across many functions.
These controls tend to break down when organisations optimise solely for speed and reuse because broad templates and inherited permissions make every new function look safe until it is exercised in an unexpected path.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Serverless functions rely on short-lived NHI credentials that must be rotated and constrained. |
| OWASP Agentic AI Top 10 | A-04 | Autonomous event-driven execution can chain actions unexpectedly, similar to agentic abuse paths. |
| CSA MAESTRO | M1 | MAESTRO covers governance for autonomous, orchestrated workloads that expand privilege dynamically. |
| NIST AI RMF | AIRMF supports risk management for dynamic, context-dependent automated workloads. | |
| NIST CSF 2.0 | PR.AC-4 | Least-privilege and access monitoring are central to reducing serverless blast radius. |
Inventory function identities and automate rotation of any secret or token that outlives its invocation.
Related resources from NHI Mgmt Group
- Why do Salesforce environments create more data exposure risk than many security teams expect?
- Why do public development environments create more NHI risk than many teams expect?
- Why do security configuration changes create more operational risk than many teams expect?
- Why do untrusted AI model files create a larger security risk than many teams expect?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 27, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org