OWASP Serverless Top 10 #5: Broken Access Control

A serverless application can consist of hundreds of microservices. Different functions, resources, services, and events, all orchestrated together to create a complete system logic. The stateless nature of serverless architecture requires a careful access control configuration for each of the resources, which could be onerous. Attackers will target over-privileged functions in order to gain unauthorized access to resources in the account rather than having control over the environment.

Security Weakness and Impact

In serverless, we do not own the infrastructure, so removing admin/root access to endpoints, servers, network and other accounts (SSH, logs, etc.) is not an issue. Rather, granting functions access to unnecessary resources or excessive permissions on resources is a potential backdoor to the system.

Access control weaknesses are common due to the lack of automated detection and lack of testing by application developers. Organizations that would try any kind of single permission model are prone to fail. Any functions that do not follow the “least privilege” principle are subject to potential broken access control.

The impact relies on the compromised resource. Simple cases could lead into data leakage from a cloud storage or a database. More complex scenarios in which a compromised function has permissions to create other resources could end in significant money loss or even full control over resources or the account.

How to Prevent

  • Examine each function carefully and try to follow the “least privilege” principle on each
  • Review each function before delivery to identify excessive permissions
  • Automate this process of permission configuration for functions
  • Follow the cloud-providers best practices

Serverless Top 10

Read more about the OWASP Serverless Top 10.

SEE DEMO
.