CWE-602: Client-Side Enforcement of Server-Side Security
Description
The product is composed of a server that relies on the client to implement a mechanism that is intended to protect the server.
When the server relies on protection mechanisms placed on the client side, an attacker can modify the client-side behavior to bypass the protection mechanisms, resulting in potentially unexpected interactions between the client and server. The consequences will vary, depending on what the mechanisms are trying to protect.
- Abstraction
- ClassAn abstract weakness, independent of any specific language or technology.
- Likelihood of exploit
- Medium
- Status
- Draft
Common consequences
- Access ControlAvailability
Bypass Protection Mechanism; DoS: Crash, Exit, or Restart
Client-side validation checks can be easily bypassed, allowing malformed or unexpected input to pass into the application, potentially as trusted data. This may lead to unexpected states, behaviors and possibly a resulting crash.
- Access Control
Bypass Protection Mechanism; Gain Privileges or Assume Identity
Client-side checks for authentication can be easily bypassed, allowing clients to escalate their access levels and perform unintended actions.
Potential mitigations
- Architecture and Design
For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server. Even though client-side checks provide minimal benefits with respect to server-side security, they are still useful. First, they can support intrusion detection. If the server receives input that should have been rejected by the client, then it...
- Architecture and Design
If some degree of trust is required between the two entities, then use integrity checking and strong authentication to ensure that the inputs are coming from a trusted source. Design the product so that this trust is managed in a centralized fashion, especially if there are complex or numerous communication channels, in order to reduce the risks that the implementer will mistakenly omit a check in a single code path.
Related weaknesses
Parent weaknesses
Child weaknesses
CAPEC attack patterns that exploit it
- CAPEC-21Exploitation of Trusted Identifiers
- CAPEC-31Accessing/Intercepting/Modifying HTTP Cookies
- CAPEC-162Manipulating Hidden Fields
- CAPEC-202Create Malicious Client
- CAPEC-207Removing Important Client Functionality
- CAPEC-208Removing/short-circuiting 'Purse' logic: removing/mutating 'cash' decrements
- CAPEC-383Harvesting Information via API Event Monitoring
- CAPEC-384Application API Message Manipulation via Man-in-the-Middle
- CAPEC-385Transaction or Event Tampering via Application API Manipulation
- CAPEC-386Application API Navigation Remapping
- CAPEC-387Navigation Remapping To Propagate Malicious Content
- CAPEC-388Application API Button Hijacking