Skip to content
Info disclosure Write-up Beginner

From .map File to Disclosure of Logs and Infrastructure of a Comp

A Grafana API key was exposed in a JavaScript source map file, allowing access to dashboards, datasources, and logs. The key had Editor permissions, not admin as initially thought, so the attacker could view and edit some resources but not manage users.

Kirolos Moheb Follow

Published on d0natel00.medium.com

Hello Friend, Today I’m Going To Explain How I found Grafana ADMIN NAMED (You Will Get the Story) Used Automation API Key (Editor Only) That Exposed Everything Can View/Edit Some Stuff About the Company. Logs, Infrastructure(Databases, Proxies, Origin IPs, System Status, etc ..)

Kirolos Moheb (d0natel00), on d0natel00.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

Impact

The exposed API key had Editor permissions, allowing read access to dashboards, datasources, and logs, and limited edit capabilities, but not administrative control.

What the attacker needed

Publicly accessible source map file; API key embedded in JavaScript

How it was found

  1. Inspect frontend JavaScript files and find a .map file.
  2. Open the .map file and search for common keywords like 'apiKey ='.
  3. Decode the found API key (Base64 and URL encoded).
  4. Use the API key to access Grafana endpoints, such as /api/datasources.
  5. Check the API key permissions via /api/user and /api/access-control/user/permissions.

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 source map is a file that helps developers debug minified JavaScript by mapping it back to the original code. If a source map is publicly accessible, it can reveal secrets like API keys that were meant to be hidden. Here, an API key was found in such a file, giving access to a Grafana dashboard.

What is Info disclosure?

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

More by Kirolos Moheb

View all

1 more disclosed report, 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.