Skip to content

Commit 27fac6c

Browse files
committed
Merge branch 'PR-25' into develop
2 parents 46e011e + ee6d527 commit 27fac6c

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

2019/en/src/0xa3-excessive-data-exposure.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,20 @@ the site.
3939

4040
## How To Prevent
4141

42-
* Never rely on the client side to perform sensitive data filtering.
42+
* Never rely on the client side to filter sensitive data.
4343
* Review the responses from the API to make sure they contain only legitimate
4444
data.
45-
* Explicitly define and enforce data returned by all API methods, including
46-
errors. Whenever possible: use schemas for responses, patterns for all strings
47-
and clear field names.
48-
* Define all sensitive and personally identifiable information (PII) that your
49-
application stores and works with and review all API calls returning such
50-
information to see if these responses can be a security issue.
45+
* Backend engineers should always ask themselves "who is the
46+
consumer of the data?" before exposing a new API endpoint.
47+
* Avoid using generic methods such as to_json() and to_string().
48+
Instead, cherry-pick specific properties you really want to return
49+
* Classify sensitive and personally identifiable information (PII) that
50+
your application stores and works with, reviewing all API calls returning such
51+
information to see if these responses pose a security issue.
52+
* Implement a schema-based response validation mechanism as an extra layer of
53+
security. As part of this mechanism define and enforce data returned by all
54+
API methods, including errors.
55+
5156

5257
## References
5358

2019/en/src/0xa4-lack-of-resources-and-rate-limiting.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ errors.
4949
[file descriptors, and processes][4].
5050
* Implement a limit on how often a client can call the API within a defined
5151
timeframe.
52-
* For sensitive operations such as login or password reset, consider rate limits
53-
by API method (e.g., authentication), client (e.g., IP address), property
54-
(e.g., username).
5552
* Notify the client when the limit is exceeded by providing the limit number and
5653
the time at which the limit will be reset.
5754
* Add proper server-side validation for query string and request body
@@ -60,8 +57,7 @@ errors.
6057
* Define and enforce maximum size of data on all incoming parameters and
6158
payloads such as maximum length for strings and maximum number of elements in
6259
arrays.
63-
* If your API accepts compressed files check compression ratios before expanding
64-
the files to protect yourself against "zip bombs".
60+
6561

6662
## References
6763

2019/en/src/0xa5-broken-function-level-authorization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ API5:2019 Broken Function Level Authorization
44
| Threat agents/Attack vectors | Security Weakness | Impacts |
55
| - | - | - |
66
| 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 that they should not have access to. These endpoints might be exposed to anonymous users or regular, non-privileged users. It’s 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", or changing the value of a parameter like "is_admin" from "false" to "true"). | 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. |
7+
| Exploitation requires the attacker to send legitimate API calls to the API endpoint that they should not have access to. These endpoints might be exposed to anonymous users or regular, non-privileged users. It’s 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. |
88

99
## Is the API Vulnerable?
1010

2019/en/src/0xa8-injection.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ Preventing injection requires keeping data separate from commands and queries.
8282
of injection.
8383
* Validate incoming data using sufficient filters to only allow valid values for
8484
each input parameter.
85-
* To prevent data leaks, define and enforce schemas for all API responses.
8685
* Define data types and strict patterns for all string parameters.
8786

8887
## References

0 commit comments

Comments
 (0)