Skip to content
IDOR Disclosed report Beginner

Unauth IDOR to mass account takeover without user interaction on the ███████ (https://███████.edu/)

An unauthenticated endpoint accepted a numeric user ID and allowed changing the associated email address without verifying ownership. An attacker could change any user's email to their own and then trigger a password reset to take over the account.

sp1d3rs Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 6 months
  • Disclosed after 4.9 years

##Description During poking around █████/24 range - AS257 ██████ looking for the Cisco devices, I came across virtual host https://██████████.edu/ on the ██████████ While it's a not .mil host, it's likely related to the DoD since it hosted in the DoD-controlled ASN.

I discovered IDOR possibility to mass accounts takeover just by altering a numeric ID. Resource seems to have ~320 000 accounts (the users ID is incremental and started for me from 320573), and all of them can be taken over with simple automation.

##POC

  1. You need to register some test accounts using:

████ Make sure your password are not too long (resource can strip it). Something like 6-7 chars should be ok. 2) When registering, monitor the requests. Once you press the final "Register" button, the request to the

https://██████.edu/chkUser.aspx endpoint wil be issued. Write down the numeric UID parameter in the response. ████████ 3) Login with your account to check it works. 4) Logout . 5) Issue next unauth POST request (replace UID parameter by your numeric UID you noted earlier):

POST /chkUser.aspx HTTP/1.1
Host: ██████.edu
Connection: keep-alive
Accept: */*
Origin: https://██████████.edu
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Referer: https://████.edu/
Accept-Encoding: gzip, deflate, br
Accept-Language: en,ru;q=0.9,en-US;q=0.8,uk;q=0.7
Content-Length: 281
Content-Type: application/x-www-form-urlencoded

dummy=&sendingForm=6&UID=[YOUR_ID_HERE]&last=test&midd=&frst=test&serv=test&[email protected]&tLang=&course=1&school=Other+non-Government&other&freq=Rarely&test=1&reading_score=&listening_score=aaa&speaking_score=aaa&test_taken=Other&other_test=test&when=more+than+a+year+ago
  1. Your email will be changed to the [email protected]

You can login with this email and your password to check it works. You will be unable to login with old email. Attacker may use it flaw to point account to his email and then initiate password reset.

Note, that endpoint is also vulnerable to the CSRF in same time, since there is no any CSRF protection (it worth to fix tho), but I'm reporting here IDOR since it poses much more risks.

##Notes In terms of transparency I should notify that during testing, I accidentally could affect single account with ID 320572 (my accounts were 320573, 320574 and 320575). I never expected that unauth request will actually work, and instead incrementing my ID I accidentally decremented it and likely changed someone's email to the [email protected]. This user will likely be unable to login, so it worth to identify him and giving this email (or restore original) so he/she will be able to login (password was unchanged, and I didn't access account itself). I have no evidence does this account active, inactive or ever exist, just notify that it could be affected.

##Suggested fix Check that UID belongs to the current user session, or better drop this parameter at all, and allow to change the user data based on the current authenticated session.

Impact

Takeover any user account without interaction by changing the email via numeric ID. Attacker can after initiate password reset and authorize on behalf of the victim. The endpoint is also vulnerable to the CSRF.

The original report as published on HackerOne, by sp1d3rs. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

How it worked

Root cause

The endpoint trusted a client-supplied numeric user ID without verifying it belonged to the authenticated session, and it lacked authentication entirely.

Impact

Any user account could be taken over without interaction by changing the email via numeric ID, then initiating a password reset; the endpoint was also vulnerable to CSRF.

What the attacker needed

No authentication required; knowledge of a numeric user ID

The fix

The endpoint should verify that the UID belongs to the current authenticated session, or remove the UID parameter entirely and base changes on the session.

How it was found

  1. Register a test account and note the numeric UID returned in the response.
  2. Log in to confirm the account works, then log out.
  3. Send an unauthenticated POST request to the chkUser.aspx endpoint with the UID parameter set to the victim's numeric ID and a new email address.
  4. The victim's email is changed to the attacker-supplied address.
  5. Log in with the new email and the original password to confirm the change.

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 report has not been written yet. The Original tab links to the source.

A website used a simple number to identify each user account. The server did not check that the person making a request actually owned that number, so anyone could change another user's email address. By changing the email to their own, an attacker could then request a password reset and receive the reset link, taking over the account.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

More by sp1d3rs

View all

62 more disclosed reports, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.