Skip to content

Commit 94ec8c7

Browse files
committed
Merge branch 'feature/move-filter-manipulation' into develop
2 parents 2139e20 + 8749f7e commit 94ec8c7

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

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

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,13 @@ A3:2019 Excessive Data Exposure
44
| Threat agents/Attack vectors | Security Weakness | Impacts |
55
| - | - | - |
66
| API Specific : Exploitability **3** | Prevalence **2** : Detectability **2** | Technical **2** : Business Specific |
7-
| Exploitation of excessive data exposure is simple, and is usually done by using different clients while sniffing the traffic they produce to analyze the API responses and look for sensitive data exposure that should not be returned to the user. | APIs rely on clients to perform the data filtering. Since APIs are used as data sources, sometimes developers try to implement them in a generic way without thinking about the sensitivity of the exposed data. Automatic tools usually can’t detect this type of vulnerability because it’s hard to differentiate between legitimate data returned from the API and sensitive data that should not be returned without a deep understanding of the application. | Excessive Data Exposure commonly leads to exposure of sensitive data. |
7+
| Exploitation of Excessive Data Exposure is simple, and is usually done by sniffing the traffic to analyze the API responses looking for sensitive data exposure that should not be returned to the user. | APIs rely on clients to perform the data filtering. Since APIs are used as data sources, sometimes developers try to implement them in a generic way without thinking about the sensitivity of the exposed data. Automatic tools usually can’t detect this type of vulnerability because it’s hard to differentiate between legitimate data returned from the API and sensitive data that should not be returned without a deep understanding of the application. | Excessive Data Exposure commonly leads to exposure of sensitive data. |
88

99
## Is the API Vulnerable?
1010

11-
There are two types of Excessive Data Exposure:
12-
13-
* **Client Side Data Filtering**: The API returns sensitive data to the client
14-
by design. This data is usually filtered on the client side before being
15-
presented to the user. An attacker can easily sniff the traffic and see the
16-
sensitive data.
17-
* **Filter Manipulation**: the API performs data filtering in an unsafe manner
18-
based on filters from the client. An attacker can send malicious filters
19-
causing the API to return sensitive data they should not be exposed to.
11+
The API returns sensitive data to the client by design. This data is usually
12+
filtered on the client side before being presented to the user. An attacker can
13+
easily sniff the traffic and see the sensitive data.
2014

2115
## Example Attack Scenarios
2216

@@ -31,22 +25,31 @@ object.
3125

3226
### Scenario #2
3327

34-
An open source team chat solution provides the endpoint `/api/v1/users.list`
35-
which supports two parameters: `query` and `fields`. Using a regular user
36-
account and manipulating both parameters an attacker can enumerate admin
37-
accounts, exposing sensitive information such as the password reset token:
38-
`GET /api/v1/users.list?query={“roles”:{$in:“admin”}}&fields={“services.password.reset”:1, “username”:1”, “email.0”:1}`.
39-
Via password reset, the attacker can takeover one of the admin accounts.
28+
An IOT-based surveillance system allows administrators to create users with
29+
different permissions.
30+
An admin created a user for a new security guard that should have access only to
31+
specific buildings in the site.
32+
Once the security guard uses his mobile app, an API call is triggered to:
33+
`"/api/sites/111/cameras"` in order to receive data about the available cameras
34+
and show them on the dashboard.
35+
The response contains a list with details about cameras in the following format:
36+
`{"id":"xxx","live_access_token":"xxxx-bbbbb","building_id":"yyy"}`
37+
While the client GUI shows only cameras which the security guard should have
38+
access to, the actual API response contains a full list of all the cameras in
39+
the site.
4040

4141
## How To Prevent
4242

4343
* Never rely on the client side to perform sensitive data filtering.
4444
* Review the responses from the API to make sure they contain only legitimate
4545
data.
46-
* Be careful when performing data filtering based on filters from the client.
4746

4847
## References
4948

5049
### OWASP
5150

5251
### External
52+
53+
* [CWE-213: Intentional Information Exposure][1]
54+
55+
[1]: https://cwe.mitre.org/data/definitions/213.html

0 commit comments

Comments
 (0)