CafeClub: Internal Admin Config Exposed via SSRF
The profile avatar import feature fetched any URL supplied by the user without validation, allowing requests to internal services. An attacker could reach the internal admin API on localhost:3000 and retrieve sensitive configuration including a JWT secret.
Published on medium.com
Access internal server resources by exploiting an SSRF vulnerability in the profile avatar import feature.
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
Impact
An attacker could use the server as a proxy to reach internal services and obtain sensitive configuration data, including a JWT secret, which could enable further attacks.
What the attacker needed
A free account; victim clicks a link
The fix
The feature should be fixed by implementing a strict allowlist for external URLs and blocking requests to localhost, [redacted], and private IP ranges.
How it was found
- Log in as a regular user and go to the profile page with the 'Import from URL' avatar field.
- Capture the avatar import request in a proxy tool.
- Try fetching http://localhost, which fails.
- Try fetching http://localhost:3000, which succeeds and returns the app's HTML source.
- Append /admin to the internal URL to enumerate endpoints and leak the API structure.
- Fetch /admin/config to retrieve the JWT secret and 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.
Server-Side Request Forgery (SSRF) happens when a website lets you give it a web address and it fetches that address for you. If the site does not check where the address points, you can make it fetch internal pages that are not normally reachable from the internet, like an admin panel running on the same machine.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.