Hunting an Exposed ClickHouse Database — From Recon to Data Ex
A ClickHouse database was exposed on ports 8123 and 9000 without authentication, allowing direct SQL access. The attacker enumerated databases and tables and extracted a flag from the congrats table.
Published on medium.com
In this challenge, I investigated a target simulating a real-world ClickHouse database exposure, inspired by the January 2025 incident.
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 ClickHouse instance was configured to listen publicly with authentication disabled and no network restrictions.
Impact
An unauthenticated attacker could read all data in the exposed ClickHouse database, leading to full data disclosure.
What the attacker needed
None
The fix
The database should be restricted to internal networks, authentication should be enabled, firewall rules applied, and queries monitored.
How it was found
- Enumerate subdomains of the target domain.
- Scan ports 8123 and 9000 on the discovered host.
- Access the ClickHouse web SQL interface without authentication.
- List databases and identify the deepleak database.
- Explore tables inside the deepleak database.
- Query the congrats table to extract the flag.
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 database service was left open to the internet with no password. Anyone who found it could run queries and read the data inside, including a hidden flag.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.