Archived GitHub repo still contains valid DataDog API information
An archived Mozilla GitHub repository still contained valid DataDog API and application keys. An attacker who found them could use the DataDog API to access account data, as the reporter demonstrated with a request to the users endpoint.
Originally disclosed on Mozilla
- Fixed in 8 days
- Paid in 19 days
- Disclosed after 8 days
Created attachment 9271070
Output from DataDog API request
Whilst scanning GitHub for secrets and tokens, I discovered that an archived GitHub repo associated with Mozilla still contains valid DataDog API keys. It is recommended that this API keys be expired and rotated and not re-published to GitHub.
Repo: https://github.com/mozilla/testpilot/
URL: https://github.com/mozilla/testpilot/blob/96d4f1f310c65e6b8931c204974b840a3bdd839f/docker-compose-base.yml
POC: curl -H "Content-Type: application/json" -H "DD-API-KEY: 4f3b967bbf13c7769ac4fa89efda0fae" -H "DD-APPLICATION-KEY: ddd45a7b3a3cb90ff1baf20ae8cfab04d1937038" https://api.datadoghq.com/api/v2/users | jq
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
Likely secrets were committed into a configuration file in a public repository and never revoked when the repository was archived.
Impact
The keys could allow access to DataDog account data through the API, though the text does not state the full extent of what was reachable.
What the attacker needed
Public GitHub repository; valid leaked keys
The fix
The keys should be expired and rotated, and not re-published to GitHub.
How it was found
- Scan GitHub for secrets and tokens.
- Find an archived Mozilla repository containing DataDog keys.
- Use the keys in a request to the DataDog API to confirm they are valid.
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 secret key is like a password that lets a program talk to a service. Someone had put DataDog keys into a public code repository, so anyone could read them. The reporter showed the keys still worked by making a request to DataDog's API.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.