Skip to content

Broken Access Control in Password Reset

High
DogukanUrker published GHSA-hrcj-mwwf-4v49 Mar 14, 2025

Package

flaskBlog (python)

Affected versions

< 2.6.1

Patched versions

None

Description

Summary

password recovery method in flaskBlog failed to validate username and email. This allows random users to change any other users' passwords, including admin's.

Details

passwordReset() in file routes/passwordReset.py contains a logic flaw in validation. It only checks whether email and username exist in database. It doesn't check if email address actually belongs to requested user account.

PoC

  1. register a user with any email address.

1

  1. log out and navigate to the password reset page

  2. submit target username (like admin) and former email address.

2

  1. Then application sends a password reset code to the attacker's email
    3

  2. This reset code can be used to reset admin's account password and login as admin.

Impact

This allow any new register users recover passwords of any other users (including admin) and take control of arbitrary user accounts / gain admin access.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:L

CVE ID

No known CVE

Weaknesses

Improper Access Control

The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. Learn more on MITRE.

Weak Password Recovery Mechanism for Forgotten Password

The product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak. Learn more on MITRE.

Credits