Authentication Bypass by Assumed-Immutable Data

Incomplete Base
Structure: Simple
Description

This vulnerability occurs when an authentication system incorrectly treats certain data as unchangeable, when in fact an attacker can manipulate it to bypass login or verification checks.

Extended Description

Developers often assume that specific data points, like hidden form fields, environment variables, or certain HTTP headers, are secure and cannot be altered by a user. However, attackers can intercept and modify this 'assumed-immutable' data during transit or exploit client-side controls, tricking the application into granting unauthorized access. To prevent this, never trust client-side data for critical security decisions. Always re-validate authentication state and user permissions on the server using a trusted, server-controlled session mechanism. Treat all data from the client—including cookies, headers, and hidden parameters—as potentially malicious and subject to verification against the authoritative server-side session store.

Common Consequences 1
Scope: Access Control

Impact: Bypass Protection Mechanism

Potential Mitigations 1
Phase: Architecture and DesignOperationImplementation
Implement proper protection for immutable data (e.g. environment variable, hidden form fields, etc.)
Demonstrative Examples 1
In the following example, an "authenticated" cookie is used to determine whether or not a user should be granted access to a system.

Code Example:

Bad
Java
java
Modifying the value of a cookie on the client-side is trivial, but many developers assume that cookies are essentially immutable.
Observed Examples 9
CVE-2002-1730Authentication bypass by setting certain cookies to "true".
CVE-2002-1734Authentication bypass by setting certain cookies to "true".
CVE-2002-2064Admin access by setting a cookie.
CVE-2002-2054Gain privileges by setting cookie.
CVE-2004-1611Product trusts authentication information in cookie.
CVE-2005-1708Authentication bypass by setting admin-testing variable to true.
CVE-2005-1787Bypass auth and gain privileges by setting a variable.