Skip to content
Info disclosure Write-up Beginner

Finding Data Leaks In Online Formatters

The online JSON formatter saves formatted data at URLs with a 6-digit hexadecimal ID, making saved content publicly accessible to anyone who guesses the ID. An attacker could brute-force or randomly guess these IDs to retrieve sensitive data such as personal information, credentials, and cryptocurrency wallet keystores.

Héctor Martos Follow

Published on infosecwriteups.com

If you are a web developer, you may have used any online code formatter. There are hundreds of online code formatters for different purposes, such as formatting HTML, XML, JSON, etc.

Héctor Martos, on infosecwriteups.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 formatter used a short, non-secret identifier for saved content and did not require authentication to access it, allowing enumeration.

Impact

An attacker could retrieve sensitive data such as personal information, credentials, and cryptocurrency wallet keystores, potentially leading to account compromise or financial loss.

What the attacker needed

Knowledge of the formatter's API; ability to send many requests

The fix

The formatter should require authentication to access saved content and use longer, unpredictable identifiers, or allow users to delete saved data.

How it was found

  1. Use Chrome Developer Tools to identify the API endpoints that save and retrieve JSON content.
  2. Copy the request to get saved content as cURL and import it into Postman.
  3. Add a Pre-request Script to generate a random 6-digit hexadecimal ID and store it in an environment variable.
  4. Replace the 'urlid' parameter in the request body with the generated ID.
  5. In the Tests section, check for a non-empty response and send it to a local ExpressJS API that stores it in MongoDB.
  6. Set the next request to the same request to create an infinite loop and run the collection with Newman with a two-second delay.

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.

When you use an online tool to format code, the tool may save your code on its website and give you a link. That link is public, so anyone who finds or guesses the link can see your code. Here, the links used short random-looking IDs, so someone could try many IDs to find other people's saved data.

What is Info disclosure?

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

More by Héctor Martos

View all

6 more disclosed reports, best first.

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.