Skip to content
Access control Write-up Intermediate

404 Not Found Səhifəsini Necə Təhlükəsizlik Boşluğuna Çevirdim?

A user-settings API endpoint returned the user's sensitive data inside the body of a custom 404 page when any extra character was appended to the path. This let the author bypass the 15-minute re-authentication check that normally protected the settings page.

silverxcyber Follow

Published on medium.com

Bu gün HackerOne-da seçdiyim bug bounty hədəfi üzərində tapdığım bir boşluq haqqında danışmaq istəyirəm. Mənə maraqlı gəldiyi üçün bunu sizinlə paylaşmaq qərarını aldım.Bu boşluq reauthentication bypass edərək istifadəçinin sensitive məlumatlarına davamlı şəkildə əlçatanlığın təmin olunması ilə bağlı idi.

Tuncay Abulfatzada, 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

Likely the custom 404 handler rendered the requested resource's data into the error page instead of returning a plain error, so the re-authentication gate on the normal path was never applied.

Impact

An attacker with a logged-in session could keep reading the victim's sensitive settings data and tokens without passing the periodic re-authentication check; caching the response for other users was not possible because the cache server did not store 404 pages.

What the attacker needed

A logged-in account; session still valid

How it was found

  1. Log in and open the user-settings page, which triggers the settings info API request.
  2. Append an extra character such as a file extension to the API path and resend the request.
  3. Observe a 404 response and inspect its body rather than the rendered page.
  4. See the user's sensitive data embedded in JavaScript in the 404 response.
  5. Request the original endpoint again and note it now returns 403 and the UI asks for the 6-digit code.

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.

Some sites ask you to re-enter a code every few minutes before showing private account details. Here, adding a stray character to the address made the site show its 'page not found' screen, but that screen secretly still contained the private details. So the check could be skipped just by changing the address slightly.

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.

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.