Session Management (SMQ)

SESSION MANAGEMENT
Д

Салим может обойти управление сессиями, потому что оно не применяется всесторонне и последовательно по всему приложению

How to play?

Incomplete and inconsistent session management across different parts of an application enables attackers to exploit gaps, bypass session controls, and hijack or spoof user sessions. See Session Management (SMK) for what session management routines to use.

Scenario: Salim’s Bypass of Inconsistent Session Management

Envision a situation where Salim takes advantage of an application’s inconsistent application of session management. This vulnerability arises because:

  1. Inconsistent Application Across Features: Different parts of the application implement session management with varying degrees of rigor.
  2. Comprehensive Coverage Lacking: Certain areas or functionalities of the application lack proper session management controls.

Example

Salim targets a multi-faceted web application that has robust session management for its main features, like user profiles and dashboards. However, he discovers that the newer modules, such as a recently added chat function, lack similar session controls. He exploits these less secure areas to gain unauthorized access, manipulating session tokens or hijacking sessions where the system’s oversight is most pronounced.

Threat Modeling

STRIDE

This scenario maps primarily to STRIDE: Spoofing.

Spoofing is about impersonating a legitimate user or entity. Salim exploits areas of the application where session management is not applied consistently, allowing him to bypass session checks and act as an authenticated user without proper authorization. The attack’s core is unauthorized impersonation via gaps in session enforcement, making Spoofing the correct primary category.

What can go wrong?

Inconsistencies in session management across an application can lead to unauthorized access and potential exploitation of the less secure areas, compromising overall system security.

For more things that can go wrong, see the Common Attack Patterns related to this card in the table below.

What are we going to do about it?

Every part of the application and type of request should verify that the user has a valid current session (if required) and thus their privileges, before undertaking any other data validation and processing.

  1. Ensure uniform implementation of session management controls across all areas and functionalities of the application.
  2. Conduct thorough security reviews and testing, especially when integrating new features or modules, to ensure they meet established session management standards.
  3. Regularly update and harmonize session management practices to maintain comprehensive and consistent security coverage.

For detailed advice on how to mitigate threats related to the card, see the ASVS and OWASP Developer Guide requirements in the table below.

Mappings

OWASP ASVS (v5.0): 4.4.3,7.1.1,7.1.2,7.1.3,7.2.1,7.2.2,7.2.3,7.2.4,7.3.1,7.3.2,7.4.1,7.4.2,7.4.3,7.4.4,7.4.5,7.5.1,7.5.2,7.5.3,7.6.1,10.1.1,10.1.2,10.2.1,10.2.2,10.2.3,10.3.1,10.3.2,10.3.3,10.3.4,10.3.5,10.4.1,10.4.2,10.4.3,10.4.4,10.4.5,10.4.6,10.4.7,10.4.8,10.4.9,10.4.10,10.4.11,10.4.12,10.4.13,10.4.14,10.4.15,10.4.16,10.5.1,10.5.2,10.5.3,10.5.4,10.5.5,10.6.1,10.6.2,10.7.1,10.7.2,10.7.3

OWASP DevGuide: SM1

STRIDE: Spoofing

CAPEC™: 21,633

SAFECode™: 14,28

CAPEC Map

ASVS (5.0) Cheat Sheet Series Index

No attacks registered!

OWASP Cornucopia

OWASP Cornucopia is a mechanism in the form of a card game to assist software development teams identify security requirements in Agile, conventional and formal development processes. It is language, platform and technology-agnostic, and is free to use. OWASP Cornucopia is licensed under the Creative Commons Attribution-ShareAlike 4.0 license, so you can copy, distribute and transmit the work, and you can adapt it, and use it commercially, but all provided that you attribute the work and if you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar licence to this one.

© 2012-2025 OWASP Foundation. The Open Worldwide Application Security Project (OWASP) is a nonprofit foundation that works to improve the security of software.