You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| API Specific : Exploitability **3**| Prevalence **2** : Detectability **1**| Technical **2** : Business Specific |
7
-
| Exploitation requires the attacker to send legitimate API calls to the API endpoint they should not have access to. These endpoints might be exposed to anonymous users or regular, non-privileged users. It is easier to discover these flaws in APIs since APIs are more structured, and the way to access certain functions is more predictable (e.g. replacing the HTTP method from `GET` to `PUT`, or changing the “users” string in the URL to "admins") |Access control checks for a function or resource are usually managed via configuration, and sometimes at the code level. Implementing proper checks can be a confusing task since modern applications can contain many types of roles or groups and complex user hierarchy (e.g. sub-users, users with more than one role) | Such flaws allow attackers to access unauthorized functionality. Administrative functions are key targets for this type of attack |
7
+
| Exploitation requires the attacker to send legitimate API calls to the API endpoint they should not have access to. These endpoints might be exposed to anonymous users or regular, non-privileged users. It is easier to discover these flaws in APIs since APIs are more structured, and the way to access certain functions is more predictable (e.g. replacing the HTTP method from `GET` to `PUT`, or changing the “users” string in the URL to "admins") |Authorization checks for a function or resource are usually managed via configuration, and sometimes at the code level. Implementing proper checks can be a confusing task since modern applications can contain many types of roles or groups and complex user hierarchy (e.g. sub-users, users with more than one role) | Such flaws allow attackers to access unauthorized functionality. Administrative functions are key targets for this type of attack |
8
8
9
9
## Is the API Vulnerable?
10
10
11
-
The best way to find missing function or resource level access control is to
11
+
The best way to find broken function level authorization issues is to
12
12
perform deep analysis of the authorization mechanism while keeping in mind the
13
13
user hierarchy, different roles or groups in the application, and asking the
14
14
following questions:
@@ -41,7 +41,7 @@ about the invite including the user’s role and the user’s email.
41
41
An attacker duplicated the request and manipulated the HTTP method and endpoint
42
42
to `POST /api/invites/new`. This endpoint should only be accessed by
43
43
administrators using the admin console which does not implement function level
44
-
access control checks.
44
+
authorization checks.
45
45
46
46
The attacker exploits the issue and sends himself an invite to create an
47
47
admin account:
@@ -56,7 +56,7 @@ POST /api/invites/new
56
56
57
57
An API contains an endpoint that should be exposed only administrators -
58
58
`GET /api/admin/v1/users/all`. This endpoint returns the details of all the
59
-
users on the application and does not implement function level access control
59
+
users on the application and does not implement function level authorization
60
60
checks. An attacker who learned the API structure takes an educated guess and
61
61
manages to access this endpoint which exposes sensitive details of the users of
62
62
the application.
@@ -70,13 +70,13 @@ code.
70
70
71
71
* The enforcement mechanism(s) should deny all access by default, requiring
72
72
explicit grants to specific roles for access to every function.
73
-
* Review your API endpoints against function level access control flaws, while
73
+
* Review your API endpoints against function level authorization flaws, while
74
74
keeping in mind the business logic of the application and groups hierarchy.
75
75
* Make sure that all of your administrative controllers inherit from an
76
-
administrative abstract controller that implements access control checks based
76
+
administrative abstract controller that implements authorization checks based
77
77
on the user’s group/role.
78
78
* Make sure that administrative functions inside a regular controller implements
79
-
access control checks based on the user’s group and role.
79
+
authorization checks based on the user’s group and role.
0 commit comments