Website Leak (gov): Sensitive Credentials and API Keys Exposed
A government website ran with debug mode enabled, so error pages exposed environment variables including database credentials, API keys and Google client secrets. An attacker could use these secrets to access protected systems and services.
Today, I’m excited to share a recent security issue I uncovered: a critical vulnerability involving Sensitive Information Disclosure and API Keys (env).
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
The application was running with debug mode enabled in production, causing error pages to display sensitive environment variables.
Impact
Exposed credentials and API keys could allow an attacker to access sensitive government data, misuse services, or modify data, though the text does not show these actions were actually performed.
What the attacker needed
Access to the public website; debug mode enabled
The fix
The report recommends rotating all exposed credentials, disabling debug mode in production, and restricting public access to environment files; it does not state that these were applied.
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 a website is being built, developers often turn on a 'debug' mode that shows detailed error messages to help them fix problems. If that mode is left on in the live site, visitors can see private settings such as passwords and API keys. Here, those secrets were visible on error pages, and anyone could copy them and try to log in to the site's database or other services.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.