CWE-1472
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
Mitigations
For each credential that is created, reset, or used, ensure that the expiration is set to be as short as possible while preserving usability.
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
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.
Examine the code to determine where credentials are created or updated, and determine how any expiration dates or times are set.