Cyber Risks · PortSwigger Research

Lab: Exploiting NoSQL operator injection to bypass authentication

Summary: PortSwigger's lab demonstrates a login backed by a MongoDB NoSQL database that accepts MongoDB operators in its username and password parameters, allowing authentication to be bypassed. Setting the password parameter to {"$ne":""} and the username parameter to {"$regex":"admin.*"} logs the tester in as the administrator user.

What you should know: A single operator in a login field was enough to become admin, so any application passing raw user input into a MongoDB query is one request away from the same outcome.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related