Info Leak → MongoDB Fingerprint → NoSQL Auth Bypass → Stored Comment Surface → Content-Type Filter Bypass → Stored XSS → Admin Cookie Exfiltration
If these concepts aren’t clear, this challenge will feel like black magic.
$ne, $gt, $regex can bypass weak auth logic.fetch().The application is a blog-like platform with:
Goal: get the flag, which is stored in admin cookies.
While enumerating endpoints, I discovered a response that strongly hinted the backend database.
The error structure and query behavior confirmed the application is using MongoDB, making a viable attack path.
From the same endpoint, I learned a valid username exists:
At this point, authentication becomes the next target.
I navigated to the login page and submitted:
user1This turns the backend query into something equivalent to:
Which always evaluates to true if the password field exists.
Result:
Successfully logged in without knowing the password.
After login, I inspected article behavior.
This strongly suggests admin will view the page and potential stored XSS execution context.
This makes Article 2 the ideal testing ground.
I tried a basic payload:
Result: HTML tag not allowed
Clearly, a filter is in place.
Instead of attacking the payload, I attacked the parser.
Modified Header:
The filter only existed in the JSON handling path.
Now the real target: admin cookies. Since Article 1 comments are reviewed by admins, I placed the payload there.
Once the admin reviewed the article, the payload executed in admin context.
Admin cookies were successfully exfiltrated to my webhook.
One parser, one unchecked operator, one missing cookie flag, and the admin hands you the keys.