Parameter Pollution Party: How Duplicate Keys Crashed the API &
The API mishandled duplicate parameter names, using the last value instead of rejecting them. An attacker could bypass authentication, access internal APIs, and execute database queries.
Free Link🎈
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 application did not validate for duplicate parameter names and used the last value, allowing parameter pollution.
Impact
Authentication bypass to admin privileges, database access exposing sensitive user data, and internal API access leading to full system compromise.
What the attacker needed
Access to the API endpoints; knowledge of an admin token from JavaScript files
The fix
Validate and sanitize all input parameters, use framework safeguards against parameter pollution, and never expose stack traces.
How it was found
- Send a request with duplicate parameter names (e.g., userId twice) and observe error.
- Try different case variations of the parameter name to trigger a stack trace.
- Send duplicate JSON keys in a request to an export endpoint and observe different output format.
- Send duplicate token and role parameters to the authentication endpoint to gain admin access.
- Send duplicate service and action parameters to the internal proxy endpoint to execute database queries.
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.
When a web server receives a request with the same parameter name twice, it should reject it or handle it safely. Here, the server used the last value, so an attacker could sneak in extra values to become an admin or run database commands.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.