Skip to content
Info disclosure Write-up Beginner

Function Confution that leads too Full server Dirs disccluseed

The password reset API accepted a JSON array instead of a string for the identifier field, causing a TypeError and a 500 error. Because debug mode was enabled, the error response disclosed the full server file path, controller name, line number, and a third-party library name.

medium.com

Published on medium.com

Hello friends, I’m tomahawk0ctf. Today, I’ll talk about a logic flaw that leads to a High-Severity Information Disclosure.

Tomahawk, 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 backend did not validate the type of the identifier parameter before passing it to a function that required a string, and debug mode was left enabled in production.

Impact

The error response could disclose the full server directory path, internal controller logic, and library versions, which may aid further attacks; the text does not claim direct access to data or code execution.

What the attacker needed

Access to the password reset API; debug mode enabled on the server

How it was found

  1. Send a password reset request with a normal email string as the identifier.
  2. Modify the identifier to be a JSON array containing two email addresses.
  3. Observe the 500 error response containing a stack trace with file paths and library details.

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 website's password reset form normally expects a single email address as text. The tester sent a list of two emails instead, which the code did not expect, so it crashed. When a site is in debug mode, it shows detailed error messages that can reveal where files are stored on the server, which helps an attacker plan further attacks.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.