Bir sorgu dizesinde sunucu tarafı parametre kirliliğinden yararlanma
A password-reset endpoint accepted a user-supplied parameter that was merged into the server's own query, allowing the attacker to override the intended field and retrieve the administrator's reset token. With that token the attacker could change the administrator's password.
Published on medium.com
Sorgu Dizisinde Parametre Kirliliğinden Yararlanma, bir program veya sistem güvenlik açıklarından biridir. Bu tür bir saldırıda, bir web uygulamasına gönderilen isteklerde kullanıcı tarafından yayınlanan, görüntülenen değerlerin dışında ve zararlı bir şekilde değiştirilmesiyle gerçekleşmektedir.
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 server concatenated user-supplied query parameters into its own query without restricting which parameter names were accepted, so an attacker could override the field being looked up.
Impact
An attacker could obtain the administrator's password-reset token and use it to change the administrator's password, leading to account takeover.
What the attacker needed
Access to the forgot-password page; a valid username to target
The fix
The endpoint should only accept an explicit allow-list of parameter names and must not merge user-supplied parameters into its own query.
How it was found
- Find a JavaScript file that reveals a reset_token parameter used on the forgot-password page.
- Locate an endpoint that uses query parameters and add an encoded hash to cut off the server's own query and trigger an error message.
- Add an encoded ampersand with a test parameter to confirm the server accepts extra parameters.
- Brute force the value of the discovered field parameter using a list of server-side variable names.
- Set the field value to reset_token with the administrator username to obtain the admin's reset token.
- Submit the token to the endpoint found in the JavaScript to change the administrator's password.
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 page builds a database query from parts of the address bar, an attacker can sometimes slip in extra pieces. Here the attacker added a hidden extra parameter so the server looked up a different field than intended, and it returned the admin's password-reset token. That token is like a temporary key that lets someone set a new password.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.