Retool database credentials exposed via resources API
An API endpoint in Retool applications returned database credentials in its JSON response. An attacker could use these credentials to log into the application's Postgres database as root with admin write privileges and do anything they wanted.
- Accepted in 11 days
- Fixed in 3 months
- Disclosed after 50 days
Summary by 6mile
Retool is a low-code platform that allows its customers to build custom applications quickly and easily. When a customer created a Retool application, the platform will automatically create a Postgres database for that application which then stores the data and user information for the app. These databases are typically AWS RDS Postgres databases. I found an API endpoint (/api/resources) in Retool applications that was exposing database credentials in its JSON response body. These database credentials allow attackers to log into the applications Postgres database as root where they had admin write level privileges and could effectively do anything they wanted. Once I alerted Retool to this problem, they fixed the API endpoint and it no longer is exposing database credentials.
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 the /api/resources endpoint returned the full database connection details, including credentials, to the client without redacting or restricting them.
Impact
An attacker could log into the application's Postgres database as root with admin write privileges and effectively do anything they wanted.
What the attacker needed
Access to a Retool application
The fix
Retool fixed the API endpoint so it no longer exposes database credentials.
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.
Retool is a service that helps people build apps without much coding. Each app gets its own database, and the app's web page talks to a hidden API. That API was accidentally sending back the database's username and password to anyone who asked, so a stranger could take full control of the database.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.