Skip to content
Access control Write-up Intermediate

When Password Reset Becomes Login: A Real-World Session Puzzling Vulnerability

The password reset functionality modified a session variable that the admin panel also used to decide whether a user was logged in. An attacker could send a password reset request and then access the admin panel without logging in, exposing employee credentials and sensitive data.

hossein.za68 Follow

Published on medium.com

A few months ago, I was conducting a penetration test on an enterprise system belonging to a municipality. The goal was to assess different parts of the application based on the vulnerabilities and testing methodologies defined in the OWASP Web Security Testing Guide (WSTG).

Hossein Zarei, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The same session variable was reused for both password reset and authentication, so the reset flow populated a value that the admin panel treated as proof of login.

Impact

An unauthenticated attacker could view the admin panel, which contained login information and passwords for municipality employees, and then log in to access sensitive data such as salary slips and personnel records.

What the attacker needed

No account needed; victim not required; attacker can send HTTP requests

The fix

The application should use separate session variables for password reset and authentication, and the admin area should explicitly check an authentication flag and role.

How it was found

  1. Send a password reset request for any email address.
  2. Without logging in, immediately request the admin management panel.
  3. Observe that the admin panel is displayed without authentication.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A session is how a website remembers who you are between page loads, usually via a cookie. Here, the password reset page and the admin login page both used the same session slot to store information, so doing a password reset accidentally made the site think you were an admin. This let the tester see the admin panel and even log in with real employee credentials.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by hossein.za68

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.