1384
This could be used by an attacker to change passwords for another user, thus gaining the
privileges associated with that user.
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 1390 Weak Authentication 2267
Relevant to the view "Architectural Concepts" (CWE-1008)
Nature Type ID Name Page
MemberOf 1010 Authenticate Actors 2424
Relevant to the view "Software Development" (CWE-699)
Nature Type ID Name Page
MemberOf 255 Credentials Management Errors 2315
Weakness Ordinalities
Primary :
Resultant :
Applicable Platforms
Language : Not Language-Specific (Prevalence = Undetermined)
Common Consequences
Scope Impact Likelihood
Access Control Bypass Protection Mechanism
Gain Privileges or Assume Identity
Potential Mitigations
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
Example 1:
This code changes a user's password.
Example Language: PHP (Bad)
$user = $_GET['user'];
$pass = $_GET['pass'];
$checkpass = $_GET['checkpass'];
if ($pass == $checkpass) {
SetUserPassword($user, $pass);
}
CWE Version 4.14
CWE-621: Variable Extraction Error
CWE-621: Variable Extraction Error