CWE-488: Exposure of Data Element to Wrong Session

What is CWE-488?

CWE-488 is Exposure of Data Element to Wrong Session. The flaw arises when the product does not sufficiently enforce boundaries between the states of different sessions, causing data to be provided to, or used by, the wrong session. The database currently holds 44 vulnerabilities mapped to CWE-488 and none of them are in the CISA Known Exploited Vulnerabilities catalog.

OWASP Top 10 Rank-
Related CVES (365 days)44
AbstractionBase
Likelihood of exploit-

Vulnerabilities mapped to CWE-488

44 vulnerabilities4300% increase year over year

No data

No vulnerability data in CISA KEV for CWE-488

Official definition

ByMitre CWE

The product does not sufficiently enforce boundaries between the states of different sessions, causing data to be provided to, or used by, the wrong session.

Characteristics

Modes of introduction

  • Implementation: In the case of Servlets, developers sometimes do not understand that, unless a Servlet implements the SingleThreadModel interface, the Servlet is a singleton; there is only one instance of the Servlet, and that single instance is used and re-used to handle multiple requests that are processed simultaneously by different threads. A common result is that developers use Servlet member fields in such a way that one user may inadvertently see another user's data.
  • Implementation: REALIZATION: This weakness is caused during implementation of an architectural security tactic.

Common consequences

ImpactScopeExplanation
Read Application DataConfidentialityData can "bleed" from one session to another through member variables of singleton objects, such as Servlets, and objects from a shared pool. Storing user data in Servlet member fields introduces a data access race condition.

Risk mitigations

  1. Architecture and DesignProtect the application's sessions from information leakage. Make sure that a session's data is not used or visible by other sessions.
  2. TestingUse a static analysis tool to scan the code for information leakage vulnerabilities (e.g. Singleton Member Field).
  3. Architecture and DesignIn a multithreading environment, storing user data in Servlet member fields introduces a data access race condition. Do not use member fields to store information in the Servlet.

Detection methods

MethodApproachEffectiveness
Automated Static AnalysisAutomated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)High
Sources (3)

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.