cve.bz

CAPEC-21

Exploitation of Trusted Identifiers

High severityHigh likelihoodMeta pattern

An adversary guesses, obtains, or "rides" a trusted identifier (e.g. session ID, resource ID, cookie, etc.) to perform authorized actions under the guise of an authenticated user or service.

On this page

Attacks leveraging trusted identifiers typically result in the adversary laterally moving within the local network, since users are often allowed to authenticate to systems/applications within the network using the same identifier. This allows the adversary to obtain sensitive data, download/install malware on the system, pose as a legitimate user for social engineering purposes, and more.

Attacks on trusted identifiers take advantage of the fact that some software accepts user input without verifying its authenticity. Many server side processes are vulnerable to these attacks because the server to server communications have not been analyzed from a security perspective or the processes "trust" other systems because they are behind a firewall. Similarly, servers that use easy to guess or spoofable schemes for representing digital identity can also be vulnerable. Such systems frequently use schemes without cryptography and digital signatures (or with broken cryptography). Identifiers may be guessed or obtained due to insufficient randomness, poor protection (passed/stored in the clear), lack of integrity (unsigned), or improper correlation with access control policy enforcement points. Exposed configuration and properties files that contain sensitive data may additionally provide an adversary with the information needed to obtain these identifiers. An adversary may also "ride" an identifier via a malicious link, as is the case in Cross Site Request Forgery (CSRF) attacks.

Regardless of the attack vector, successful spoofing and impersonation of trusted credentials can lead to an adversary breaking authentication, authorization, and audit controls with the target system or application.

Ask an AI about this attack pattern

Show the promptExplain the attack pattern CAPEC-21: Exploitation of Trusted Identifiers: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/21.html and https://cve.bz/cve/capec/21?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

  1. Explore

    The attacker looks for a way in.

    1. [Survey the application for Indicators of Susceptibility] Using a variety of methods, until one is found that applies to the target, the adversary probes for cookies, session tokens, or entry points that bypass identifiers altogether.

      3 techniques
      • Spider all available pages
      • Attack known bad interfaces
      • Search outward-facing configuration and properties files for identifiers.
  2. Experiment

    They probe what they found.

    1. [Fetch samples] The adversary fetches many samples of identifiers. This may be through legitimate access (logging in, legitimate connections, etc.) or via systematic probing.

      3 techniques
      • An adversary makes many anonymous connections and records the session IDs assigned.
      • An adversary makes authorized connections and records the session tokens or credentials issued.
      • An adversary gains access to (legitimately or illegitimately) a nearby system (e.g., in the same operations network, DMZ, or local network) and makes a connection from it, attempting to gain the same privileges as a trusted system.
  3. Exploit

    They carry out the attack.

    1. [Impersonate] An adversary can use successful experiments or authentications to impersonate an authorized user or system or to laterally move within a system or application

    2. [Spoofing] Malicious data can be injected into the target system or into a victim user's system by an adversary. The adversary can also pose as a legitimate user to perform social engineering attacks.

    3. [Data Exfiltration] The adversary can obtain sensitive data contained within the system or application.

Prerequisites

  • Server software must rely on weak identifier proof and/or verification schemes.

  • Identifiers must have long lifetimes and potential for reusability.

  • Server software must allow concurrent sessions to exist.

Skills required

  • Low skill

    To achieve a direct connection with the weak or non-existent server session access control, and pose as an authorized user

Resources required

  • Ability to deploy software on network.

  • Ability to communicate synchronously or asynchronously with server.

Consequences

What a successful attack can lead to
ImpactAffectsNote
Gain PrivilegesConfidentiality, Access Control, Authentication
Read DataConfidentiality
Modify DataIntegrity

Mitigations

  • Design: utilize strong federated identity such as SAML to encrypt and sign identity tokens in transit.

  • Implementation: Use industry standards session key generation mechanisms that utilize high amount of entropy to generate the session key. Many standard web and application servers will perform this task on your behalf.

  • Implementation: If the identifier is used for authentication, such as in the so-called single sign on use cases, then ensure that it is protected at the same level of assurance as authentication tokens.

  • Implementation: If the web or application server supports it, then encrypting and/or signing the identifier (such as cookie) can protect the ID if intercepted.

  • Design: Use strong session identifiers that are protected in transit and at rest.

  • Implementation: Utilize a session timeout for all sessions, for example 20 minutes. If the user does not explicitly logout, the server terminates their session after this period of inactivity. If the user logs back in then a new session key is generated.

  • Implementation: Verify authenticity of all identifiers at runtime.

Weaknesses it exploits

  • CWE-6 J2EE Misconfiguration: Insufficient Session-ID Length
  • CWE-290 Authentication Bypass by Spoofing
  • CWE-302 Authentication Bypass by Assumed-Immutable Data
  • CWE-346 Origin Validation Error
  • CWE-384 Session Fixation
  • CWE-539 Use of Persistent Cookies Containing Sensitive Information
  • CWE-602 Client-Side Enforcement of Server-Side Security
  • CWE-642 External Control of Critical State Data
  • CWE-664 Improper Control of a Resource Through its Lifetime

Recent CVEs with these weaknesses

  1. 8.1CVE-2026-108187

    Origin Validation Error in Zoom Workplace for Windows may allow an unauthenticated user to conduct an escalation of privilege via network access.

  2. –CVE-2026-97890

    The embedded HTTP server does not invalidate the previous session identifier when an application changes the session id, e.g. after login. An attacker who can plant a session identifier in a victim's browser can hijack the victim's authent…

  3. 9.4CVE-2026-119446

    Session Fixation vulnerability in the CLI login flow in nerves-hub nerves_hub_web allows an unauthenticated attacker to obtain an API token for another user's account via a crafted login link. Starting a CLI login with POST /api/auth/cli_s…

  4. 2.1CVE-2026-125078

    A security flaw has been discovered in SourceCodester Smart Attendance System with QR Code Scanner 1.0. This affects an unknown part of the file login.php. The manipulation results in session fixiation. The attack can be launched remotely.…

  5. 7.4CVE-2026-123801

    SuperTokens Core is an open source authentication server. From 11.3.0 until 11.3.8, 11.4.8, 12.0.11, 12.1.2, 12.2.1, and 12.3.1, SAML.handleCallback does not consume RelayState, record assertion identifiers, or enforce Response.InResponseT…

  6. 6.3CVE-2026-124249

    http.cookiejar.CookieJar deleted a stored cookie when a response carried an already expired Set-Cookie header for it, using the Domain and Path attributes from the header without consulting the cookie policy. A server could therefore delet…

  7. 5.9CVE-2026-118795

    Administrative roles and module permissions are stored in mutable local database fields, allowing privilege escalation for attackers with database write access.

  8. 8.8CVE-2026-8639

    IBM Security Verify Directory 10.0.0 through 10.0.4 and IBM Verify Directory 11.0.0 is vulnerable to session fixation. An attacker can establish a session and, after the victim authenticates, hijack the authenticated session to gain unauth…

The newest records naming one of them. Each weakness's page lists them all.

More specific patterns

Examples

Thin client applications like web applications are particularly vulnerable to session ID attacks. Since the s…

Thin client applications like web applications are particularly vulnerable to session ID attacks. Since the server has very little control over the client, but still must track sessions, data, and objects on the server side, cookies and other mechanisms have been used to pass the key to the session data between the client and server. When these session keys are compromised it is trivial for an adversary to impersonate a user's session in effect, have the same capabilities as the authorized user. There are two main ways for an adversary to exploit session IDs.

A brute force attack involves an adversary repeatedly attempting to query the system with a spoofed session header in the HTTP request. A web server that uses a short session ID can be easily spoofed by trying many possible combinations so the parameters session-ID= 1234 has few possible combinations, and an adversary can retry several hundred or thousand request with little to no issue on their side.

The second method is interception, where a tool such as wireshark is used to sniff the wire and pull off any unprotected session identifiers. The adversary can then use these variables and access the application.

For example, in a message queuing system that allows service requesters to post messages to its queue through…

For example, in a message queuing system that allows service requesters to post messages to its queue through an open channel (such as anonymous FTP), authorization is done through checking group or role membership contained in the posted message. However, there is no proof that the message itself, the information in the message (such group or role membership), or the process that wrote the message to the queue is authentic and authorized to do so.

MITRE's words, unchanged: CAPEC-21 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.