Authorization (AZ2)
How to play?This card is relatated to improper integrity controls for attributes which influence data flows.
Scenario: Tim’s Manipulation of Data Routing
Envision a scenario where Tim, exploiting weaknesses in authorization controls, influences the direction or forwarding of data within a system. This issue arises from:
- Inadequate Authorization Checks: The system lacks robust authorization mechanisms to verify and control where data is sent or who can redirect it.
- Manipulable Data Routing Mechanisms: Data forwarding or routing functionalities are vulnerable to manipulation.
Example
Tim discovers that an application’s data export feature does not properly authenticate users’ permissions for forwarding data. He gains access to this feature and begins redirecting sensitive data, originally intended for internal use, to external locations under his control. This redirection occurs without triggering any security alerts, as the system fails to validate whether Tim has the authorization to specify data destinations.
Threat Modeling
STRIDE
This scenario maps primarily to STRIDE: Tampering.
Tampering involves unauthorized modification of data or its flow. Tim is able to redirect or forward data to locations under his control, altering the intended path or destination of sensitive information. The core issue is manipulating the system’s handling of data, which fits the definition of Tampering.
What can go wrong?
Such vulnerabilities can lead to unauthorized data disclosure, data breaches, and the potential compromise of sensitive information. This can manifest in various forms, including but not limited to:
- Unauthorized data redirection to external or malicious locations
- Data leakage due to insufficient authorization checks on routing mechanisms
- Compromise of data integrity through unauthorized manipulation of data flow
For more things that can go wrong, see the Common Attack Patterns related to this card in the table below.
What are we going to do about it?
- Implement stringent authorization checks for any function that involves sending, forwarding, or routing data.
- Ensure the application enforces authorization rules on a trusted server-side component, rather than relying on client-side controls.
- Ensure that the system verifies user permissions before allowing data to be redirected or exported.
- Regularly audit and update authorization mechanisms to protect against unauthorized data routing or forwarding.
- Verify that users are not able to define unauthorized virtual locations/addresses (e.g, database table names, file system paths, sms, email, domains, and URL paths).
- Make sure multi-tenant applications properly segregate data and prevent unauthorized access or redirection between tenants.
- Make sure the application has proper protections against CSRF attacks and mix-up attacks for any function that involves sending, forwarding, or routing data, especially when using authorization tokens.
For detailed advice on how to mitigate threats related to the card, see the ASVS and OWASP Developer Guide requirements in the table below.
Mappings
OWASP ASVS (v5.0): 3.2.1,3.3.2,3.4.1,3.4.2,3.4.3,3.4.4,3.4.5,3.4.6,3.4.7,3.4.8,3.5.1,3.5.2,3.5.3,3.5.4,3.5.5,3.5.6,3.5.7,3.5.8,3.7.2,3.7.3,3.7.4,8.3.1,8.4.1,10.2.1,10.2.2,13.1.1,13.2.4,13.2.5,15.3.2
OWASP DevGuide: P7
STRIDE: Tampering
CAPEC™: 62,94,154,157,173,240,481,569
CAPEC Map
| Code | Title | ASVS |
|---|---|---|
| 62 | Cross Site Request Forgery | 3.3.2,3.5.1,3.5.2,3.5.3,3.5.4,3.5.5,3.5.6,3.5.7,3.5.8,3.7.3,10.2.1 |
| 94 | Adversary in the Middle (AiTM) | 3.4.1,3.7.4 |
| 104 | Cross Zone Scripting | 3.4.2,3.5.2,3.5.3,3.5.5,3.5.8 |
| 154 | Resource Location Spoofing | 10.2.2,13.1.1,13.2.4,13.2.5,15.3.2 |
| 157 | Sniffing Attacks | 3.4.1,3.7.4 |
| 173 | Action Spoofing | 3.4.2,3.4.3,3.4.6,3.4.7,3.4.8,3.5.1,3.5.2,3.5.3,3.5.5,3.5.7,3.5.8,3.7.2,3.7.3 |
| 240 | Resource Injection | 13.1.1,13.2.4,13.2.5,15.3.2 |
| 481 | Contradictory Destinations in Traffic Routing Schemes | 13.1.1,13.2.4,13.2.5,15.3.2 |
| 569 | Collect Data as Provided by Users | 3.2.1,3.4.4,3.4.5,3.4.8,3.5.8,3.7.2,3.7.3,3.7.4 |