CWE-1472

Base Abstraction Level
Pillar — Highest-level weakness category
Class — Abstract, language-independent
Base — Specific enough to detect
Variant — Tied to specific technology
Compound — Requires multiple weaknesses
Incomplete MITRE CWE Status
Stable — Fully reviewed and complete
Draft — Under development, may change
Incomplete — Partially defined by MITRE
Deprecated — No longer recommended
Obsolete — Replaced by another CWE
Generation of Credential with Long Expiration

Description

The product generates or relies on a credential such as a key, certificate, password, confirmation code, or token, but the credential does not expire or has an expiration that is too long, i.e., the expiration is insufficient for the intended security policy of the product.

Consequences

Access Control, Confidentiality, Integrity — Gain Privileges or Assume Identity, Bypass Protection Mechanism, Varies by Context

Mitigations

Phase: Implementation, Operation

For each credential that is created, reset, or used, ensure that the expiration is set to be as short as possible while preserving usability.

Phase: Architecture and Design

Design the product to analyze the credentials that it manages, and provide mechanisms to provide secure defaults, and/or a capability to warn users about excessive expiration.

Detection

Automated Dynamic Analysis

If the credentials are provided through a communications protocol, monitor the communications related to credential generation and examine any expiration dates or times that are set.

Manual Analysis

Examine the code to determine where credentials are created or updated, and determine how any expiration dates or times are set.