---
title: "CAPEC-196: Session Credential Falsification through Forging"
url: https://radicalnotion.ai/capec/capec-196
type: capec
description: "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."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-196: Session Credential Falsification through Forging

- **Abstraction:** Standard
- **Status:** Draft
- **Typical severity:** Medium
- **Likelihood of attack:** Medium
- **CAPEC catalog version:** 3.9

## Description

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.

## Execution flow

### Step 1: Explore

\[Analyze and Understand Session IDs\] The attacker finds that the targeted application use session credentials to identify legitimate users.

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

### Step 2: Experiment

\[Create Session IDs.\] Attackers craft messages containing their forged credentials in GET, POST request, HTTP headers or cookies.

- The attacker manipulates the HTTP request message and adds their forged session IDs in to the requests or cookies.

### Step 3: Exploit

\[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.

- 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:** 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

| Scope | Impact | Note |
| --- | --- | --- |
| Integrity | Modify Data | - |
| Confidentiality | Read Data | - |
| Authorization | Execute Unauthorized Commands | Run Arbitrary Code |
| Accountability, Authentication, Authorization, Non-Repudiation | Gain Privileges | - |
| Access Control, Authorization | Bypass Protection Mechanism | - |

## 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.

## Example instances

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.

## Related weaknesses (CWE)

- [CWE-384](https://radicalnotion.ai/cwe/cwe-384): Session Fixation
- [CWE-664](https://radicalnotion.ai/cwe/cwe-664): Improper Control of a Resource Through its Lifetime

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-21](https://radicalnotion.ai/capec/capec-21) | Exploitation of Trusted Identifiers |
| Child | [CAPEC-59](https://radicalnotion.ai/capec/capec-59) | Session Credential Falsification through Prediction |
| Child | [CAPEC-226](https://radicalnotion.ai/capec/capec-226) | Session Credential Falsification through Manipulation |
| Can precede | [CAPEC-61](https://radicalnotion.ai/capec/capec-61) | Session Fixation |
| Can precede | [CAPEC-384](https://radicalnotion.ai/capec/capec-384) | Application API Message Manipulation via Man-in-the-Middle |

## Taxonomy mappings

| Taxonomy | Entry | Id |
| --- | --- | --- |
| ATTACK | Access Token Manipulation: Create Process with Token | 1134.002 |
| ATTACK | Access Token Manipulation: Make and Impersonate Token | 1134.003 |
| ATTACK | Forge Web Credentials | 1606 |

## Frequently asked questions

### What is CAPEC-196?

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.

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

It typically unfolds over 3 phases. It begins with: \[Analyze and Understand Session IDs\] The attacker finds that the targeted application use session credentials to identify legitimate users.

### How do you prevent CAPEC-196?

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.

### What weaknesses does CAPEC-196 target?

CAPEC-196 exploits 2 CWE weaknesses: CWE-384 (Session Fixation) and CWE-664 (Improper Control of a Resource Through its Lifetime).

### How severe is CAPEC-196?

MITRE rates CAPEC-196 as Medium severity with medium likelihood of attack.

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

---

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