---
title: "CWE-384: Session Fixation"
url: https://radicalnotion.ai/cwe/cwe-384
type: cwe
description: "Authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-384: Session Fixation

- **Abstraction:** Compound
- **Structure:** Composite
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 438
- **Of those, in CISA KEV:** 1
- **New in 2026:** 89
- **CWE catalog version:** 4.21

## Description

Authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions.

Such a scenario is commonly observed when:

A web application authenticates a user without first invalidating the existing session, thereby continuing to use the session already associated with the user.

An attacker is able to force a known session identifier on a user so that, once the user authenticates, the attacker has access to the authenticated session.

The application or container uses predictable session identifiers.

In the generic exploit of session fixation vulnerabilities, an attacker creates a new session on a web application and records the associated session identifier. The attacker then causes the victim to associate, and possibly authenticate, against the server using that session identifier, giving the attacker access to the user's account through the active session.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | - |
| Implementation | - |

## Applicable platforms

**Technologies:** Web Based (Undetermined), Web Server (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Access Control | Gain Privileges or Assume Identity | - |

## Potential mitigations

### Architecture and Design

Invalidate any existing session identifiers prior to authorizing a new user session.

### Architecture and Design

For platforms such as ASP that do not generate new values for sessionid cookies, utilize a secondary cookie. In this approach, set a secondary cookie on the user's browser to a random value and set a session variable to the same value. If the session variable and the cookie value ever don't match, invalidate the session, and force the user to log on again.

### Operation (Firewall)

Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth \[REF-1481\].

Effectiveness: Moderate. An application firewall might not cover all possible input vectors. In addition, attack techniques might be available to bypass the protection mechanism, such as using malformed inputs that can still be processed by the component that receives those inputs. Depending on functionality, an application firewall might inadvertently reject or modify legitimate requests. Finally, some manual effort may be required for customization.

## Demonstrative examples

### Example 1

The following example shows a snippet of code from a J2EE web application where the application authenticates users with LoginContext.login() without first calling HttpSession.invalidate().

Bad code:

```java
private void auth(LoginContext lc, HttpSession session) throws LoginException {
    ...
    lc.login();
    ...
}
```

### Example 2

The following example shows a snippet of code from a J2EE web application where the application authenticates users with a direct post to the \<code\>j\_security\_check\</code\>, which typically does not invalidate the existing session before processing the login request.

Bad code:

```html
<form method="POST" action="j_security_check">
    <input type="text" name="j_username">
    <input type="text" name="j_password">
</form>
```

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2022-2820 | Website software for game servers does not properly terminate user sessions, allowing for possible session fixation |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-102489 | Undisclosed RCE in Zammad v6.3 and higher | critical | 9.4 | - | Yes | 2026-09-30 |
| CVE-2024-38513 | Fiber Session Middleware Token Injection Vulnerability | critical | 10.0 | - | No | 2024-07-01 |
| CVE-2021-20151 | - | critical | 10.0 | - | No | 2021-12-30 |
| CVE-2026-18527 | IBM Application Runtime Expert (ARE) for IBM i is vulnerable to a user gaining elevated privileges and sensitive information \[, \]. | critical | 9.9 | - | No | 2026-08-28 |
| CVE-2026-92609 | Apache Qpid Broker-J: Missing HTTP-session renewal after successful authentication | critical | 9.8 | - | No | 2026-09-25 |
| CVE-2026-75171 | - | critical | 9.8 | - | No | 2026-09-04 |
| CVE-2025-67446 | - | critical | 9.8 | - | No | 2026-06-04 |
| CVE-2025-7015 | Session Hijacking in Akinsoft's QR Menu | critical | 9.8 | - | No | 2026-01-29 |
| CVE-2025-59841 | FlagForgeCTF's Improper Session Handling Allows Access After Logout | critical | 9.8 | - | No | 2025-09-25 |
| CVE-2025-52689 | Weak Session ID Check in the OmniAccess Stellar Web Management Interface | critical | 9.8 | - | No | 2025-07-16 |
| CVE-2025-45949 | - | critical | 9.8 | - | No | 2025-04-28 |
| CVE-2025-28238 | - | critical | 9.8 | - | No | 2025-04-18 |

## Related attack patterns (CAPEC)

- [CAPEC-196](https://radicalnotion.ai/capec/capec-196): Session Credential Falsification through Forging
- [CAPEC-21](https://radicalnotion.ai/capec/capec-21): Exploitation of Trusted Identifiers
- [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-59](https://radicalnotion.ai/capec/capec-59): Session Credential Falsification through Prediction
- [CAPEC-60](https://radicalnotion.ai/capec/capec-60): Reusing Session IDs (aka Session Replay)
- [CAPEC-61](https://radicalnotion.ai/capec/capec-61): Session Fixation

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-610](https://radicalnotion.ai/cwe/cwe-610) | Externally Controlled Reference to a Resource in Another Sphere |
| Parent | [CWE-1462](https://radicalnotion.ai/cwe/cwe-1462) | Improper Session Management |
| Requires | [CWE-346](https://radicalnotion.ai/cwe/cwe-346) | Origin Validation Error |
| Requires | [CWE-441](https://radicalnotion.ai/cwe/cwe-441) | Unintended Proxy or Intermediary |
| Requires | [CWE-472](https://radicalnotion.ai/cwe/cwe-472) | External Control of Assumed-Immutable Web Parameter |
| Related | [CWE-340](https://radicalnotion.ai/cwe/cwe-340) | Generation of Predictable Numbers or Identifiers |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| 7 Pernicious Kingdoms | Session Fixation | - | - |
| OWASP Top Ten 2004 | Broken Authentication and Session Management | A3 | CWE More Specific |
| WASC | Session Fixation | 37 | - |

## Frequently asked questions

### What is CWE-384?

Authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions.

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

438 recorded CVEs are attributed to CWE-384, including CVE-2026-102489, CVE-2024-38513 and CVE-2021-20151. 1 is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

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

CWE-384 maps to OWASP Top Ten 2004: Broken Authentication and Session Management (A3) in the OWASP security taxonomy.

### How do you prevent CWE-384?

Invalidate any existing session identifiers prior to authorizing a new user session.

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

Exploiting CWE-384 can lead to: Gain Privileges or Assume Identity.

### Is CWE-384 actively exploited?

Yes. 1 CWE-384 vulnerability is in CISA's KEV catalog of actively exploited flaws, out of 438 recorded CVEs.

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

---

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