CAPEC-196
Session Credential Falsification through Forging
An attacker creates a false but functional session credential in order to gain or usurp access to a service. Session credentials allow users to identify themselves to a service after an initial authentication without needing to resend the authentication information (usually a username and password) with every message. If an attacker is able to forge valid session credentials they may be able to bypass authentication or piggy-back off some other authenticated user's session. This attack differs from Reuse of Session IDs and Session Sidejacking attacks in that in the latter attacks an attacker uses a previous or existing credential without modification while, in a forging attack, the attacker must create their own credential, although it may be based on previously observed credentials.
On this page
Ask an AI about this attack pattern
Show the prompt
Explain the attack pattern CAPEC-196: Session Credential Falsification through Forging: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/196.html and https://cve.bz/cve/capec/196?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.
[Analyze and Understand Session IDs] The attacker finds that the targeted application use session credentials to identify legitimate users.
2 techniques
- An attacker makes many anonymous connections and records the session IDs.
- An attacker makes authorized connections and records the session tokens or credentials.
Experiment
They probe what they found.
[Create Session IDs.] Attackers craft messages containing their forged credentials in GET, POST request, HTTP headers or cookies.
1 technique
- The attacker manipulates the HTTP request message and adds their forged session IDs in to the requests or cookies.
Exploit
They carry out the attack.
[Abuse the Victim's Session Credentials] The attacker fixates falsified session ID to the victim when victim access the system. Once the victim has achieved a higher level of privilege, possibly by logging into the application, the attacker can now take over the session using the forged session identifier.
2 techniques
- The attacker loads the predefined or predicted session ID into their browser and browses to protected data or functionality.
- The attacker loads the predefined or predicted session ID into their software and utilizes functionality with the rights of the victim.
Prerequisites
The targeted application must use session credentials to identify legitimate users. Session identifiers that remains unchanged when the privilege levels change. Predictable session identifiers.
Skills required
- Medium skill
Forge the session credential and reply the request.
Resources required
Attackers may require tools to craft messages containing their forged credentials, and ability to send HTTP request to a web application.
Consequences
| Impact | Affects | Note |
|---|---|---|
| Modify Data | Integrity | |
| Read Data | Confidentiality | |
| Execute Unauthorized Commands | Authorization | Run Arbitrary Code |
| Gain Privileges | Accountability, Authentication, Authorization, Non-Repudiation | |
| Bypass Protection Mechanism | Access Control, Authorization |
Mitigations
Implementation: Use session IDs that are difficult to guess or brute-force: One way for the attackers to obtain valid session IDs is by brute-forcing or guessing them. By choosing session identifiers that are sufficiently random, brute-forcing or guessing becomes very difficult.
Implementation: Regenerate and destroy session identifiers when there is a change in the level of privilege: This ensures that even though a potential victim may have followed a link with a fixated identifier, a new one is issued when the level of privilege changes.
Weaknesses it exploits
Recent CVEs with these weaknesses
- 7.6CVE-2026-52803
Gogs is an open source self-hosted Git service. Prior to 0.15.0, Gogs does not regenerate the session ID after successful authentication. An attacker who forces a victim to use a known session ID can hijack the session after the victim log…
- 6.7CVE-2026-119452
GitLab has remediated an issue in GitLab CE/EE affecting all versions from 13.7.0 before 19.4.11, 19.5 before 19.5.9, and 19.6 before 19.6.2 that under certain conditions could have allowed an authenticated user with Maintainer-role permis…
- 10.0CVE-2026-78114
Session Fixation in the login flow of Apache JSPWiki versions 2.10 through 3.0.0 on all platforms. The session identifier was not replaced when a user authenticated, so an attacker who could set a known session identifier in the browser of…
- 7.2CVE-2026-133652
Flowintel , contained a session management vulnerability in its browser authentication mechanism. The session identifier used a bare numeric user ID rather than a credential-bound token, resulting in several related weaknesses: - Remember…
- 6.8CVE-2026-104773
CKAN is an open-source data management system for data hubs and data portals. Prior to 2.10.11 and 2.11.6, the web user registration flow authenticates a newly registered account without first regenerating the session identifier when serve…
- 7.1CVE-2026-128669
A Session Fixation vulnerability exists in the admin login endpoint (/admin/index.php) of PHPGurukul News Portal Project V4.1. The application fails to regenerate the session identifier (PHPSESSID) upon successful authentication. A remote …
- 5.4CVE-2026-128717
An issue in PHPGurukul Employee Leaves Management System (ELMS) Version 2.1 allows a remote attacker to escalate privileges via the PHP session management mechanism
- 5.9CVE-2026-74762
Apache Shiro is vulnerable to session fixation when a user is authenticated via the "Remember me" functionality. In affected versions, when a subject is restored from a "Remember me" cookie, the existing session is not invalidated, nor is …
The newest records naming one of them. Each weakness's page lists them all.
Related attack patterns
- Part of
- CAPEC-21 Exploitation of Trusted Identifiers
- Can lead to
Examples
This example uses client side scripting to set session ID in the victim's browser. The JavaScript code
This example uses client side scripting to set session ID in the victim's browser. The JavaScript code
document.cookie="sessionid=0123456789"
fixates a falsified session credential into victim's browser, with the help of crafted a URL link.
http://www.example.com/<script>document.cookie="sessionid=0123456789";</script>
A similar example uses session ID as an argument of the URL.
http://www.example.com/index.php/sessionid=0123456789
Once the victim clicks the links, the attacker may be able to bypass authentication or piggy-back off some other authenticated victim's session.
MITRE's words, unchanged: CAPEC-196 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.