Weakness · High

CWE-620: Unverified Password Change

What it is

When setting a new password for a user, the product does not require knowledge of the original password, or using another form of authentication.

MITRE CWE 4.19.1

Severity (our rating)
High
Likelihood of exploit
Not rated by MITRE
Introduced during
Architecture and Design, Implementation
Exploited in the wild
No CVE in CISA's catalog

In more detail

This could be used by an attacker to change passwords for another user, thus gaining the privileges associated with that user.

What an attacker can do

  • Bypass Protection Mechanism (Access Control)
  • Gain Privileges or Assume Identity (Access Control)

How to prevent it

Architecture and Design

  • When prompting for a password change, force the user to provide the original password in addition to the new password.
  • 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.

CWE-620 on MITRE's CWE site

H2 Security

Found it in your code?

We review where it appears, fix it with your team, and check it was not already used against you.

Talk to our team

T Academy

Stop writing it in the first place

Learn to build software and systems without weaknesses like this one, with practice on real hosts in your browser, every objective checked on the machine.

Start free

Source: MITRE Common Weakness Enumeration, CWE version 4.19.1. CWE is a trademark of The MITRE Corporation.