CWE-6: J2EE Misconfiguration: Insufficient Session-ID Length

Variant Incomplete Simple

CWE版本: 4.18

更新日期: 2025-09-09

弱点描述

The J2EE application is configured to use an insufficient session ID length.

扩展描述

If an attacker can guess or steal a session ID, then they may be able to take over the user's session (called session hijacking). The number of possible session IDs increases with increased session ID length, making it more difficult to guess or steal a session ID.

常见后果

影响范围: Access Control

技术影响: Gain Privileges or Assume Identity

说明: If an attacker can guess an authenticated user's session identifier, they can take over the user's session.

潜在缓解措施

阶段: Implementation

描述: Session identifiers should be at least 128 bits long to prevent brute-force session guessing. A shorter session identifier leaves the application open to brute-force session guessing attacks.

阶段: Implementation

描述: A lower bound on the number of valid session identifiers that are available to be guessed is the number of users that are active on a site at any given moment. However, any users that abandon their sessions without logging out will increase this number. (This is one of many good reasons to have a short inactive session timeout.) With a 64 bit session identifier, assume 32 bits of entropy. For a large web site, assume that the attacker can try 1,000 guesses per second and that there are 10,000 valid session identifiers at any given moment. Given these assumptions, the expected time for an attacker to successfully guess a valid session identifier is less than 4 minutes. Now assume a 128 bit session identifier that provides 64 bits of entropy. With a very large web site, an attacker might try 10,000 guesses per second with 100,000 valid session identifiers available to be guessed. Given these assumptions, the expected time for an attacker to successfully guess a valid session identifier is greater than 292 years.

引入模式

阶段 说明
Architecture and Design COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic.
Implementation -

适用平台

编程语言
Java (Undetermined)

分类映射

分类名称 条目ID 条目名称 映射适配度
7 Pernicious Kingdoms - J2EE Misconfiguration: Insufficient Session-ID Length -
关键信息

CWE ID: CWE-6

抽象级别: Variant

结构: Simple

状态: Incomplete

相关弱点
相关攻击模式
CAPEC-21 CAPEC-59