Unverified Password Change

Draft Base
Structure: Simple
Description

This vulnerability occurs when an application allows a user to set a new password without first verifying their identity through the old password or a secure secondary authentication method.

Extended Description

This flaw creates a major security gap, as an attacker who can access the password change function (for example, through a predictable user ID or a cross-site request forgery attack) can reset another user's credentials. Without proper verification, the system implicitly trusts that the person requesting the change is the legitimate account holder, leading to a complete account takeover. To prevent this, developers must always require proof of identity before processing a password reset. The standard practice is to require the user's current password for a voluntary change, or to use a time-limited, single-use token sent to a pre-verified email or phone for a recovery scenario. This ensures that control of the account is never relinquished based on a simple request alone.

Common Consequences 1
Scope: Access Control

Impact: Bypass Protection MechanismGain Privileges or Assume Identity

Potential Mitigations 2
Phase: Architecture and Design
When prompting for a password change, force the user to provide the original password in addition to the new password.
Phase: Architecture and Design
Do not use "forgotten password" functionality. But if you must, ensure that you are only providing information to the actual user, e.g. by using an email address or challenge question that the legitimate user already provided in the past; do not allow the current user to change this identity information until the correct password has been provided.
Demonstrative Examples 1

ID : DX-56

This code changes a user's password.

Code Example:

Bad
PHP
php
While the code confirms that the requesting user typed the same new password twice, it does not confirm that the user requesting the password change is the same user whose password will be changed. An attacker can request a change of another user's password and gain control of the victim's account.
Observed Examples 2
CVE-2007-0681Web app allows remote attackers to change the passwords of arbitrary users without providing the original password, and possibly perform other unauthorized actions.
CVE-2000-0944Web application password change utility doesn't check the original password.
References 1
24 Deadly Sins of Software Security
Michael Howard, David LeBlanc, and John Viega
McGraw-Hill
2010
ID: REF-44
Applicable Platforms
Languages:
Not Language-Specific : Undetermined
Modes of Introduction
Architecture and Design
Implementation
Related Weaknesses
Taxonomy Mapping
  • OWASP Top Ten 2004
  • Software Fault Patterns