CAPEC-59
Session Credential Falsification through Prediction
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.
On this page
Ask an AI about this attack pattern
Show the prompt
Explain the attack pattern CAPEC-59: Session Credential Falsification through Prediction: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/59.html and https://cve.bz/cve/capec/59?via=ask-ai-copy, which lists recent CVEs with the weaknesses it exploits. Cite the sources.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this attack pattern's id and public links.
How the attack unfolds
Explore
The attacker looks for a way in.
[Find Session IDs] The attacker interacts with the target host and finds that session IDs are used to authenticate users.
2 techniques
- 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.
[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.
3 techniques
- 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.
Experiment
They probe what they found.
[Match issued IDs] The attacker brute forces different values of session ID and manages to predict a valid session ID.
1 technique
- The attacker models the session ID algorithm enough to produce a compatible session IDs, or just one match.
Exploit
They carry out the attack.
[Use matched Session ID] The attacker uses the falsified session ID to access the target system.
2 techniques
- 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 skill
There are tools to brute force session ID. Those tools require a low level of knowledge.
- Medium skill
Predicting Session ID may require more computation work which uses advanced analysis such as statistical analysis.
Consequences
| Impact | Affects | Note |
|---|---|---|
| Gain Privileges | Confidentiality, Access Control, Authorization |
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.
Weaknesses it exploits
- CWE-6 J2EE Misconfiguration: Insufficient Session-ID Length
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
- CWE-285 Improper Authorization
- CWE-290 Authentication Bypass by Spoofing
- CWE-330 Use of Insufficiently Random Values
- CWE-331 Insufficient Entropy
- CWE-346 Origin Validation Error
- CWE-384 Session Fixation
- CWE-488 Exposure of Data Element to Wrong Session
- CWE-539 Use of Persistent Cookies Containing Sensitive Information
- CWE-693 Protection Mechanism Failure
Recent CVEs with these weaknesses
- 5.3CVE-2026-140130
A flaw has been found in jobic10 student-management-using-django up to 066dcaeffc52fe52e9279d93e2a00c15909544ae. This affects the function get_students/save_attendance/get_student_attendance/update_attendance of the file main_app/staff_vie…
- 3.3CVE-2026-118999
Permission control vulnerability in the theme setting module. Impact: Successful exploitation of this vulnerability may affect service confidentiality.
- 7.7CVE-2026-130470
A cryptographic weakness exists in Foxit PDF Editor/Reader’s AES-256 file encryption implementation. Encryption keys are derived from predictable data rather than generated using a cryptographically secure random source, significantly redu…
- 5.5CVE-2026-140052
A vulnerability was identified in g-mr SmartCall up to 1.0.9. This vulnerability affects the function token of the file smart-maxkb/src/main/java/com/qidiangk/smart/maxkb/controller/TokenController.java of the component smart-maxkb. Such m…
- 6.2CVE-2026-119008
Vulnerability of improper data management in the location service module. Impact: Successful exploitation of this vulnerability may affect service confidentiality.
- 5.5CVE-2026-139893
A vulnerability has been found in 0xERR0R blocky up to 0.35.0. Impacted is the function configureDebugHandler of the file server/server_endpoints.go. Such manipulation leads to information disclosure. The attack may be performed from remot…
- 4.8CVE-2026-139892
A flaw has been found in MervinPraison PraisonAI up to 4.7.24. This issue affects the function _load_rules of the file praisonaiagents/permissions/manager.py of the component Permission Manager. This manipulation causes improper authorizat…
- 1.9CVE-2026-139891
A security vulnerability has been detected in KunAgent Kun up to 0.4.5. This affects the function launchResumeTurn of the file kun/src/loop/interrupted-turn-coordinator.ts of the component Turn Resume. The manipulation leads to incorrect a…
The newest records naming one of them. Each weakness's page lists them all.
Related attack patterns
- Part of
- CAPEC-196 Session Credential Falsification through Forging
Examples
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 sess…
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 …
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
MITRE's words, unchanged: CAPEC-59 at MITRE. CAPEC is Copyright © 2007–2026, The MITRE Corporation, used under the CAPEC terms of use: “The MITRE Corporation (MITRE) hereby grants you a non-exclusive, royalty-free license to use Common Attack Pattern Enumeration and Classification (CAPEC™) for research, development, and commercial purposes. Any copy you make for such purposes is authorized provided that you reproduce MITRE’s copyright designation and this license in any such copy.” CAPEC and the CAPEC logo are trademarks of The MITRE Corporation. Credits. All attack patterns.