---
title: "CWE-302: Authentication Bypass by Assumed-Immutable Data"
url: https://radicalnotion.ai/cwe/cwe-302
type: cwe
description: "The authentication scheme or implementation uses key data elements that are assumed to be immutable, but can be controlled or modified by the attacker."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-302: Authentication Bypass by Assumed-Immutable Data

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 38
- **Of those, in CISA KEV:** 0
- **New in 2026:** 11
- **CWE catalog version:** 4.21

## Description

The authentication scheme or implementation uses key data elements that are assumed to be immutable, but can be controlled or modified by the attacker.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic. |
| Implementation | - |

## Applicable platforms

**Technologies:** Web Based (Sometimes)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Access Control | Bypass Protection Mechanism | - |

## Potential mitigations

### Architecture and Design, Operation, Implementation

Implement proper protection for immutable data (e.g. environment variable, hidden form fields, etc.)

## Demonstrative examples

### Example 1

In the following example, an "authenticated" cookie is used to determine whether or not a user should be granted access to a system.

Bad code:

```java
boolean authenticated = new Boolean(getCookieValue("authenticated")).booleanValue();
if (authenticated) {
    ...
}
```

Modifying the value of a cookie on the client-side is trivial, but many developers assume that cookies are essentially immutable.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2002-0367 | DebPloit |
| CVE-2004-0261 | Web auth |
| CVE-2002-1730 | Authentication bypass by setting certain cookies to "true". |
| CVE-2002-1734 | Authentication bypass by setting certain cookies to "true". |
| CVE-2002-2064 | Admin access by setting a cookie. |
| CVE-2002-2054 | Gain privileges by setting cookie. |
| CVE-2004-1611 | Product trusts authentication information in cookie. |
| CVE-2005-1708 | Authentication bypass by setting admin-testing variable to true. |
| CVE-2005-1787 | Bypass auth and gain privileges by setting a variable. |

## Real CVEs with this weakness (sample of 12 of 38)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2025-29813 | Azure DevOps Elevation of Privilege Vulnerability | critical | 10.0 | - | No | 2025-05-08 |
| CVE-2026-48781 | Postiz has cross-tenant SUPERADMIN takeover via Skool-provider JWT forgery | critical | 9.9 | - | No | 2026-06-16 |
| CVE-2024-56404 | - | critical | 9.9 | - | No | 2025-01-24 |
| CVE-2024-43441 | Apache HugeGraph-Server: Fixed JWT Token(Secret) | critical | 9.8 | - | No | 2024-12-24 |
| CVE-2023-4612 | MFA bypass in Apereo CAS | critical | 9.8 | - | No | 2023-11-09 |
| CVE-2023-4669 | Authentication Bypass in Exagate SYSGuard 3001 | critical | 9.8 | - | No | 2023-09-14 |
| CVE-2016-9482 | PHP FormMail Generator generates PHP code for standard web forms, and the code generated is vulnerable to authentication bypass | critical | 9.8 | - | No | 2018-07-13 |
| CVE-2025-47158 | Azure DevOps Server Elevation of Privilege Vulnerability | critical | 9.0 | - | No | 2025-07-18 |
| CVE-2026-47303 | ASP.NET Core Elevation of Privilege Vulnerability | high | 8.8 | - | No | 2026-07-14 |
| CVE-2024-12838 | Changing Information Technology CGFIDO - Authentication Bypass | high | 8.8 | - | No | 2024-12-31 |
| CVE-2024-49056 | Airlift.microsoft.com Elevation of Privilege Vulnerability | high | 8.8 | - | No | 2024-11-12 |
| CVE-2024-4024 | Authentication Bypass by Assumed-Immutable Data in GitLab | high | 8.8 | - | No | 2024-04-25 |

## Related attack patterns (CAPEC)

- [CAPEC-10](https://radicalnotion.ai/capec/capec-10): Buffer Overflow via Environment Variables
- [CAPEC-13](https://radicalnotion.ai/capec/capec-13): Subverting Environment Variable Values
- [CAPEC-21](https://radicalnotion.ai/capec/capec-21): Exploitation of Trusted Identifiers
- [CAPEC-274](https://radicalnotion.ai/capec/capec-274): HTTP Verb Tampering
- [CAPEC-31](https://radicalnotion.ai/capec/capec-31): Accessing/Intercepting/Modifying HTTP Cookies
- [CAPEC-39](https://radicalnotion.ai/capec/capec-39): Manipulating Opaque Client-based Data Tokens
- [CAPEC-45](https://radicalnotion.ai/capec/capec-45): Buffer Overflow via Symbolic Links
- [CAPEC-77](https://radicalnotion.ai/capec/capec-77): Manipulating User-Controlled Variables

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-807](https://radicalnotion.ai/cwe/cwe-807) | Reliance on Untrusted Inputs in a Security Decision |
| Parent | [CWE-1390](https://radicalnotion.ai/cwe/cwe-1390) | Weak Authentication |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | Authentication Bypass via Assumed-Immutable Data | - | - |
| OWASP Top Ten 2004 | Unvalidated Input | A1 | CWE More Specific |
| The CERT Oracle Secure Coding Standard for Java (2011) | Do not base security checks on untrusted sources | SEC02-J | - |

## Frequently asked questions

### What is CWE-302?

The authentication scheme or implementation uses key data elements that are assumed to be immutable, but can be controlled or modified by the attacker.

### What CVEs are caused by CWE-302?

38 recorded CVEs are attributed to CWE-302, including CVE-2025-29813, CVE-2026-48781 and CVE-2024-56404.

### Is CWE-302 part of the OWASP Top 10?

CWE-302 maps to OWASP Top Ten 2004: Unvalidated Input (A1) in the OWASP security taxonomy.

### How do you prevent CWE-302?

Implement proper protection for immutable data (e.g. environment variable, hidden form fields, etc.)

### What are the consequences of CWE-302?

Exploiting CWE-302 can lead to: Bypass Protection Mechanism.

### Is CWE-302 actively exploited?

38 recorded CVEs are caused by CWE-302; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/302.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-302). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
