---
title: "CAPEC-59: Session Credential Falsification through Prediction"
url: https://radicalnotion.ai/capec/capec-59
type: capec
description: "This attack targets predictable session ID in order to gain privileges. The attacker can predict the session ID used during a transaction to perform spoofing and session hijacking."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-59: Session Credential Falsification through Prediction

- **Abstraction:** Detailed
- **Status:** Draft
- **Typical severity:** High
- **Likelihood of attack:** High
- **CAPEC catalog version:** 3.9

## Description

This attack targets predictable session ID in order to gain privileges. The attacker can predict the session ID used during a transaction to perform spoofing and session hijacking.

## Execution flow

### Step 1: Explore

\[Find Session IDs\] The attacker interacts with the target host and finds that session IDs are used to authenticate users.

- An attacker makes many anonymous connections and records the session IDs assigned.
- An attacker makes authorized connections and records the session tokens or credentials issued.

### Step 2: Explore

\[Characterize IDs\] The attacker studies the characteristics of the session ID (size, format, etc.). As a results the attacker finds that legitimate session IDs are predictable.

- Cryptanalysis. The attacker uses cryptanalysis to determine if the session IDs contain any cryptographic protections.
- Pattern tests. The attacker looks for patterns (odd/even, repetition, multiples, or other arithmetic relationships) between IDs
- Comparison against time. The attacker plots or compares the issued IDs to the time they were issued to check for correlation.

### Step 3: Experiment

\[Match issued IDs\] The attacker brute forces different values of session ID and manages to predict a valid session ID.

- The attacker models the session ID algorithm enough to produce a compatible session IDs, or just one match.

### Step 4: Exploit

\[Use matched Session ID\] The attacker uses the falsified session ID to access the target system.

- The attacker loads the session ID into their web browser and browses to restricted data or functionality.
- The attacker loads the session ID into their network communications and impersonates a legitimate user to gain access to data or functionality.

## Prerequisites

- The target host uses session IDs to keep track of the users.
- Session IDs are used to control access to resources.
- The session IDs used by the target host are predictable. For example, the session IDs are generated using predictable information (e.g., time).

## Skills required

- **Low:** There are tools to brute force session ID. Those tools require a low level of knowledge.
- **Medium:** Predicting Session ID may require more computation work which uses advanced analysis such as statistical analysis.

## Consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Access Control, Authorization | Gain Privileges | - |

## Mitigations

- Use a strong source of randomness to generate a session ID.
- Use adequate length session IDs
- Do not use information available to the user in order to generate session ID (e.g., time).
- Ideas for creating random numbers are offered by Eastlake \[RFC1750\]
- Encrypt the session ID if you expose it to the user. For instance session ID can be stored in a cookie in encrypted format.

## Example instances

Jetty before 4.2.27, 5.1 before 5.1.12, 6.0 before 6.0.2, and 6.1 before 6.1.0pre3 generates predictable session identifiers using java.util.random, which makes it easier for remote attackers to guess a session identifier through brute force attacks, bypass authentication requirements, and possibly conduct cross-site request forgery attacks. See also: CVE-2006-6969

mod\_usertrack in Apache 1.3.11 through 1.3.20 generates session ID's using predictable information including host IP address, system time and server process ID, which allows local users to obtain session ID's and bypass authentication when these session ID's are used for authentication. See also: CVE-2001-1534

## Related weaknesses (CWE)

- [CWE-6](https://radicalnotion.ai/cwe/cwe-6): J2EE Misconfiguration: Insufficient Session-ID Length
- [CWE-200](https://radicalnotion.ai/cwe/cwe-200): Exposure of Sensitive Information to an Unauthorized Actor
- [CWE-285](https://radicalnotion.ai/cwe/cwe-285): Improper Authorization
- [CWE-290](https://radicalnotion.ai/cwe/cwe-290): Authentication Bypass by Spoofing
- [CWE-330](https://radicalnotion.ai/cwe/cwe-330): Use of Insufficiently Random Values
- [CWE-331](https://radicalnotion.ai/cwe/cwe-331): Insufficient Entropy
- [CWE-346](https://radicalnotion.ai/cwe/cwe-346): Origin Validation Error
- [CWE-384](https://radicalnotion.ai/cwe/cwe-384): Session Fixation
- [CWE-488](https://radicalnotion.ai/cwe/cwe-488): Exposure of Data Element to Wrong Session
- [CWE-539](https://radicalnotion.ai/cwe/cwe-539): Use of Persistent Cookies Containing Sensitive Information
- [CWE-693](https://radicalnotion.ai/cwe/cwe-693): Protection Mechanism Failure

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-196](https://radicalnotion.ai/capec/capec-196) | Session Credential Falsification through Forging |

## Taxonomy mappings

| Taxonomy | Entry | Id |
| --- | --- | --- |
| WASC | Credential/Session Prediction | 18 |
| OWASP Attacks | Session Prediction | - |

## Frequently asked questions

### What is CAPEC-59?

This attack targets predictable session ID in order to gain privileges. The attacker can predict the session ID used during a transaction to perform spoofing and session hijacking.

### How does a Session Credential Falsification through Prediction attack work?

It typically unfolds over 4 phases. It begins with: \[Find Session IDs\] The attacker interacts with the target host and finds that session IDs are used to authenticate users.

### How do you prevent CAPEC-59?

Use a strong source of randomness to generate a session ID.

### What weaknesses does CAPEC-59 target?

CAPEC-59 exploits 11 CWE weaknesses, including CWE-6 (J2EE Misconfiguration: Insufficient Session-ID Length), CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor), CWE-285 (Improper Authorization) and CWE-290 (Authentication Bypass by Spoofing).

### How severe is CAPEC-59?

MITRE rates CAPEC-59 as High severity with high likelihood of attack.

Primary source: [MITRE CAPEC](https://capec.mitre.org/data/definitions/59.html)

---

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