Discovered Sensitive Data Exposure on Wati.com: A Case Study Using Sublist3r and DirBuster
A .env file was publicly accessible on a subdomain of wati.com, exposing sensitive API keys and server configuration details. An attacker could use these credentials to access APIs, databases, or servers, potentially leading to data breaches or system compromise.
Published on medium.com
In the realm of web security, finding sensitive information inadvertently exposed on the internet can be both alarming and enlightening. Recently, I discovered a critical vulnerability on the website Wati.com that exposed sensitive API keys and server information through a .env file.
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 .env file was placed in a web-accessible directory without proper access restrictions, allowing it to be served to anyone who requested it.
Impact
The exposed .env file could allow an attacker to compromise API keys, database credentials, and server configuration, potentially leading to data breaches or server compromise.
What the attacker needed
None
The fix
The .env file should be removed from the web-accessible directory or access to it should be blocked at the web server level.
How it was found
- Enumerate subdomains of wati.com using Sublist3r.
- Select one subdomain from the results.
- Brute-force directories and files on that subdomain using DirBuster.
- Discover the .env file at the root of the subdomain.
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 .env file is a configuration file that often stores secret keys and passwords for a website. If it is left publicly accessible, anyone can read it and use those secrets to break into the site's systems. Here, such a file was found on a subdomain, meaning the secrets were exposed to the internet.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.