Skip to content

A1 update name and add recommendation #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions 2019/en/src/0xa1-missing-object-level-access-control.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
A1:2019 Missing Object Level Access Control
A1:2019 Broken Object Level Authorization
===========================================

| Threat agents/Attack vectors | Security Weakness | Impacts |
| - | - | - |
| API Specific : Exploitability **3** | Prevalence **3** : Detectability **2** | Technical **3** : Business Specific |
| Attackers can exploit API endpoints that are vulnerable to broken object access control by manipulating the ID of an object that is sent in the request. This may lead to unauthorized access to sensitive data. This issue is extremely common in API based applications because the server component usually does not fully track the client’s state, and instead relies more on parameters like object IDs, that are sent from the client to decide which objects to access. | This has been the most common and impactful attack on APIs. Authorization and access control mechanisms in modern applications are complex and wide-spread. Even if the application implements a proper infrastructure for authorization checks, developers might forget to use these checks before accessing a sensitive object. Access control detection is not typically amenable to automated static or dynamic testing. | Unauthorized access can result in data disclosure to unauthorized parties, data loss, or data manipulation. Unauthorized access to objects can also lead to full account takeover. |
| Attackers can exploit API endpoints that are vulnerable to broken object authorization by manipulating the ID of an object that is sent in the request. This may lead to unauthorized access to sensitive data. This issue is extremely common in API based applications because the server component usually does not fully track the client’s state, and instead relies more on parameters like object IDs, that are sent from the client to decide which objects to access. | This has been the most common and impactful attack on APIs. Authorization and access control mechanisms in modern applications are complex and wide-spread. Even if the application implements a proper infrastructure for authorization checks, developers might forget to use these checks before accessing a sensitive object. Access control detection is not typically amenable to automated static or dynamic testing. | Unauthorized access can result in data disclosure to unauthorized parties, data loss, or data manipulation. Unauthorized access to objects can also lead to full account takeover. |

## Is the API Vulnerable?

Object access control is a mechanism that is usually implemented at the code
Object level authorization is a mechanism that is usually implemented at the code
level to validate that one user can access only objects that they should have
access to.

Every API endpoint that receives an ID of an object and performs any type of
action on the object should implement object level access control checks. The
action on the object should implement object level authorization checks. The
checks should validate that the logged-in user does have access to perform the
requested action on the requested object.

Expand Down Expand Up @@ -42,15 +42,17 @@ other user account data.

## How To Prevent

* Implement a proper access control mechanism that relies on the user policies
* Implement a proper authorization mechanism that relies on the user policies
and hierarchy.
* Prefer not to use an ID that has been sent from the client, but instead use an
ID that is stored in the session object when accessing a database record by
the record ID.
* Use an access control mechanism to check if the logged in user has access to
* Use an authorization mechanism to check if the logged in user has access to
perform the requested action on the record in every function that uses an
input from the client to access a record in the database.
* Prefer to use random and unpredictable values as GUIDs for records’ IDs.
* Write tests to evaluate the authorization mechanism. Do not deploy vulnerable
changes that break the tests.

## References

Expand Down