CWE-640: Weak Password Recovery Mechanism for Forgotten Password
|
Weakness ID: 640
Vulnerability Mapping:
ALLOWED
This CWE ID could be used to map to real-world vulnerabilities in limited situations requiring careful review
(with careful review of mapping notes)
Abstraction:
Base
Base - a weakness that is still mostly independent of a resource or technology, but with sufficient details to provide specific methods for detection and prevention. Base level weaknesses typically describe issues in terms of 2 or 3 of the following dimensions: behavior, property, technology, language, and resource.
|
View customized information:
Shows the description and diagram, platforms, mitigations, consequences, relationships, memberships, and content history.
For users who are interested in more notional aspects of a weakness. Example: educators, technical writers, and project/program managers.
For users who are concerned with the practical application and details about the nature of a weakness and how to prevent it from happening. Example: tool developers, security researchers, pen-testers, incident response analysts.
For users who are mapping an issue to CWE/CAPEC IDs, i.e., finding the most appropriate CWE for a specific issue (e.g., a CVE record). Example: tool developers, security researchers.
For users who wish to see all available information for the CWE/CAPEC entry.
For users who want to customize what details are displayed.
More information is available — Please edit the custom filter or select a different filter.
Description
The product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak.
Technical Nuance
This weakness may be:
- the security question is too easy to guess or find an answer to (e.g. because the question is too common, or the answers can be found using social media).
- there might be an implementation weakness in the password recovery mechanism code that may for instance trick the system into e-mailing the new password to an e-mail account other than that of the user.
- There might be no throttling done on the rate of password resets so that a legitimate user can be denied service by an attacker if an attacker tries to recover their password in a rapid succession.
- The system may send the original password to the user rather than generating a new temporary password.
Common Consequences
This table specifies different individual consequences
associated with the weakness. The Scope identifies the application security area that is
violated, while the Impact describes the negative technical impact that arises if an
adversary succeeds in exploiting this weakness. The Likelihood provides information about
how likely the specific consequence is expected to be seen relative to the other
consequences in the list. For example, there may be high likelihood that a weakness will be
exploited to achieve a certain impact, but a low likelihood that it will be exploited to
achieve a different impact.
| Impact |
Details |
|
Bypass Protection Mechanism; Gain Privileges or Assume Identity
|
Scope: Access Control
Weak password recovery schemes completely undermine a strong password authentication scheme. An attacker could gain unauthorized access to the system by retrieving a legitimate user's authentication credentials.
|
|
DoS: Resource Consumption (Other)
|
Scope: Availability
An attacker could deny service to legitimate system users by launching a brute force attack on the password recovery mechanism using user ids of legitimate users.
|
|
Other
|
Scope: Integrity, Other
The system's security functionality is turned against the system by the attacker.
|
Potential Mitigations
| Phase(s) |
Mitigation |
|
Architecture and Design
|
Make sure that all input supplied by the user to the password recovery mechanism is thoroughly filtered and validated.
|
|
Architecture and Design
|
Do not use standard weak security questions and use several security questions.
|
|
Architecture and Design
|
Make sure that there is throttling on the number of incorrect answers to a security question. Disable the password recovery functionality after a certain (small) number of incorrect guesses.
|
|
Architecture and Design
|
Require that the user properly answers the security question prior to resetting their password and sending the new password to the e-mail address of record.
|
|
Architecture and Design
|
Never allow the user to control what e-mail address the new password will be sent to in the password recovery mechanism.
|
|
Architecture and Design
|
Assign a new temporary password rather than revealing the original password.
|
Relationships
This table shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOf and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition,
relationships such as PeerOf, Overlaps, and CanAlsoBe are defined to show similar weaknesses that the user
may want to explore.
|
Relevant to the view "Complete Weakness Hierarchy" (View-1000)
|
|
Nature |
Type |
ID |
Name |
|
ChildOf |
Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource.
|
1390
|
Weak Authentication
|
|
|
Relevant to the view "Software Development" (View-699)
|
|
Nature |
Type |
ID |
Name |
|
MemberOf |
Grouping - a CWE entry that contains a set of other entries that share a common characteristic.
|
255
|
Credentials Management Errors
|
|
MemberOf |
Grouping - a CWE entry that contains a set of other entries that share a common characteristic.
|
840
|
Business Logic Errors
|
|
|
Relevant to the view "Weaknesses for Simplified Mapping of Published Vulnerabilities" (View-1003)
|
|
Nature |
Type |
ID |
Name |
|
ChildOf |
Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource.
|
287
|
Improper Authentication
|
|
|
Relevant to the view "Architectural Concepts" (View-1008)
|
|
Nature |
Type |
ID |
Name |
|
MemberOf |
Grouping - a CWE entry that contains a set of other entries that share a common characteristic.
|
1010
|
Authenticate Actors
|
|
Modes
Of Introduction
The different Modes of Introduction provide information
about how and when this
weakness may be introduced. The Phase identifies a point in the life cycle at which
introduction
may occur, while the Note provides a typical scenario related to introduction during the
given
phase.
| Phase(s) |
Note |
|
Architecture and Design
|
COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic. |
|
Implementation
|
|
Applicable Platforms
This listing shows possible areas for which the given
weakness could appear. These
may be for specific named Languages, Operating Systems, Architectures, Paradigms,
Technologies,
or a class of such platforms. The platform is listed along with how frequently the given
weakness appears for that instance.
| Type |
Applicable Platforms |
Notes |
| Languages |
Class: Not Language-Specific
(Undetermined Prevalence)
|
|
Demonstrative Examples
Example 1
A famous example of this type of weakness being exploited is the eBay attack. eBay always displays the user id of the highest bidder. In the final minutes of the auction, one of the bidders could try to log in as the highest bidder three times. After three incorrect log in attempts, eBay password throttling would kick in and lock out the highest bidder's account for some time. An attacker could then make their own bid and their victim would not have a chance to place the counter bid because they would be locked out. Thus an attacker could win the auction.
Selected Observed
Examples
Note: this is a curated list of examples for users to understand the variety of ways in which this
weakness can be introduced. It is not a complete list of all CVEs that are related to this CWE entry.
| Reference |
Description |
|
|
password reset functionality for a WordPress plugin allows a brute force attack of the one-time password
|
|
|
password reset functionality for a WordPress plugin allows a brute force attack of the one-time password
|
|
|
password recovery mechanism for AI developer toolkit does not invalidate the reset password token after it is used, allowing attackers to reuse the token to change passwords of victims
|
|
|
web conference product resets passwords to random 8-digit values, allowing brute force attacks by retrieving the hash
|
Weakness Ordinalities
| Ordinality |
Description |
|
Primary
|
(where the weakness exists independent of other weaknesses)
|
Vulnerability Mapping Notes
|
Usage
|
ALLOWED-WITH-REVIEW
(this CWE ID could be used to map to real-world vulnerabilities in limited situations requiring careful review)
|
| Reason |
Frequent Misuse
|
|
Rationale
|
This entry appears to be frequently misused for any weakness related to password changes, even though the name focuses on "Password Recovery" for a "forgotten" password.
|
|
Comments
|
CWE-640 should only be used when there is a "password recovery" mechanism for forgotten passwords. Consider password-related entries under CWE-1390: Weak Authentication.
|
Notes
Maintenance
This entry might be reclassified as a category or "loose composite," since it lists multiple specific errors that can make the mechanism weak. However, under view 1000, it could be a weakness under protection mechanism failure, although it is different from most PMF issues since it is related to a feature that is designed to bypass a protection mechanism (specifically, the lack of knowledge of a password).
Maintenance
This entry probably needs to be split; see extended description.
Taxonomy
Mappings
| Mapped Taxonomy Name |
Node ID |
Fit |
Mapped Node Name |
| WASC |
49 |
|
Insufficient Password Recovery |
Related Attack Patterns
| CAPEC-ID |
Attack Pattern Name |
| CAPEC-50 |
Password Recovery Exploitation |
References
| [REF-44] |
Michael Howard, David LeBlanc and John Viega. "24 Deadly Sins of Software Security". "Sin 19: Use of Weak Password-Based Systems." Page 279. McGraw-Hill. 2010.
|
Content
History
| Submissions |
| Submission Date |
Submitter |
Organization |
2008-01-30
(CWE Draft 8, 2008-01-30)
|
Evgeny Lebanidze |
Cigital |
|
|
| Modifications |
| Modification Date |
Modifier |
Organization |
2026-10-28
(CWE 5.0, 2026-10-28)
|
CWE Content Team |
MITRE |
|
updated Common_Consequences, Description, Technical_Nuance
|
2026-04-30
(CWE 4.20, 2026-04-30)
|
CWE Content Team |
MITRE |
|
updated Observed_Examples
|
2025-12-11
(CWE 4.19, 2025-12-11)
|
CWE Content Team |
MITRE |
|
updated Relationships, Weakness_Ordinalities
|
2023-06-29
(CWE 4.12, 2023-06-29)
|
CWE Content Team |
MITRE |
|
updated Mapping_Notes
|
2023-04-27
(CWE 4.11, 2023-04-27)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2023-01-31
(CWE 4.10, 2023-01-31)
|
CWE Content Team |
MITRE |
|
updated Description
|
2022-10-13
(CWE 4.9, 2022-10-13)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2021-10-28
(CWE 4.6, 2021-10-28)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2019-06-20
(CWE 3.3, 2019-06-20)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2018-03-27
(CWE 3.1, 2018-03-27)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2017-11-08
(CWE 3.0, 2017-11-08)
|
CWE Content Team |
MITRE |
|
updated Applicable_Platforms, Demonstrative_Examples, Description, Enabling_Factors_for_Exploitation, Modes_of_Introduction, Observed_Examples, Relationships
|
2015-12-07
(CWE 2.9, 2015-12-07)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2014-07-30
(CWE 2.8, 2014-07-31)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2014-06-23
(CWE 2.7, 2014-06-23)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2012-10-30
(CWE 2.3, 2012-10-30)
|
CWE Content Team |
MITRE |
|
updated Potential_Mitigations
|
2012-05-11
(CWE 2.2, 2012-05-15)
|
CWE Content Team |
MITRE |
|
updated References, Relationships
|
2011-06-01
(CWE 1.13, 2011-06-01)
|
CWE Content Team |
MITRE |
|
updated Common_Consequences
|
2011-03-29
(CWE 1.12, 2011-03-30)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2010-12-13
(CWE 1.11, 2010-12-13)
|
CWE Content Team |
MITRE |
|
updated Common_Consequences
|
2010-02-16
(CWE 1.8, 2010-02-16)
|
CWE Content Team |
MITRE |
|
updated Taxonomy_Mappings
|
2009-05-27
(CWE 1.4, 2009-05-27)
|
CWE Content Team |
MITRE |
|
updated Related_Attack_Patterns
|
2009-03-10
(CWE 1.3, 2009-03-10)
|
CWE Content Team |
MITRE |
|
updated Relationships
|
2008-09-08
(CWE 1.0, 2008-09-09)
|
CWE Content Team |
MITRE |
|
updated Common_Consequences, Description, Maintenance_Notes, Name, Relationships
|
| Previous Entry Names |
| Change Date |
Previous Entry Name |
| 2008-09-09
|
Weak Password Recovery Mechanism |
More information is available — Please edit the custom filter or select a different filter.
|