Insufficient Session Expiration

According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization."


Demonstrations

The following examples help to illustrate the nature of this weakness and describe methods or techniques which can be used to mitigate the risk.

Note that the examples here are by no means exhaustive and any given weakness may have many subtle varieties, each of which may require different detection methods or runtime controls.

Example One

The following snippet was taken from a J2EE web.xml deployment descriptor in which the session-timeout parameter is explicitly defined (the default value depends on the container). In this case the value is set to -1, which means that a session will never expire.

<web-app>

  [...snipped...]

  <session-config>
    <session-timeout>-1</session-timeout>
  </session-config>

</web-app>

See Also

User Session Errors

Weaknesses in this category are related to session management. Frequently these deal with the information or status about each user and their access rights for the dur...

OWASP Top Ten 2017 Category A2 - Broken Authentication

Weaknesses in this category are related to the A2 category in the OWASP Top Ten 2017.

Manage User Sessions

Weaknesses in this category are related to the design and architecture of session management. Frequently these deal with the information or status about each user and ...

Comprehensive CWE Dictionary

This view (slice) covers all the elements in CWE.

Weaknesses without Software Fault Patterns

CWE identifiers in this view are weaknesses that do not have associated Software Fault Patterns (SFPs), as covered by the CWE-888 view. As such, they represent gaps in...

Weaknesses Introduced During Implementation

This view (slice) lists weaknesses that can be introduced during implementation.


Common Weakness Enumeration content on this website is copyright of The MITRE Corporation unless otherwise specified. Use of the Common Weakness Enumeration and the associated references on this website are subject to the Terms of Use as specified by The MITRE Corporation.