Password Aging with Long Expiration
CWE-263
CVSS severity (NVD, All Time)
Per technology (GHSA, All time)
- 100%-Go
Short description
Extended description
Password aging (or password rotation) is a policy that forces users to change their passwords after a defined time period passes, such as every 30 or 90 days. A long expiration provides more time for attackers to conduct password cracking before users are forced to change to a new password.
Note that while password aging was once considered an important security feature, it has since fallen out of favor by many, because it is not as effective against modern threats compared to other mechanisms such as slow hashes. In addition, forcing frequent changes can unintentionally encourage users to select less-secure passwords. However, password aging is still in use due to factors such as compliance requirements, e.g., Payment Card Industry Data Security Standard (PCI DSS).
Best practices to prevent this CWE
Phase: Architecture and Design
Ensure that password aging is limited so that there is a defined maximum age for passwords. Note that if the expiration window is too short, it can cause users to generate poor or predictable passwords.
Phase: Architecture and Design
Ensure that the user is notified several times leading up to the password expiration.
Phase: Architecture and Design
Create mechanisms to prevent users from reusing passwords or creating similar passwords.
Phase: Implementation
Developers might disable clipboard paste operations into password fields as a way to discourage users from pasting a password into a clipboard. However, this might encourage users to choose less-secure passwords that are easier to type, and it can reduce the usability of password managers.