Logical 2FA Bypass via Missing clientId Parameter in Profile Update Endpoint
The application required a one-time password for every profile update, but the server only enforced this check when a clientId parameter was present. By removing that parameter, an attacker could change any profile field, including the email address, without any second-factor verification.
This write-up describes a logical vulnerability that allowed me to bypass the Two-Factor Authentication (2FA) mechanism in a web application. The application enforced 2FA verification for every modification request, including actions like updating an email, uploading a photo, or changing profile information.
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 treated the presence of the clientId parameter as the trigger for the 2FA check, so omitting it skipped verification entirely.
Impact
An attacker with access to an account could change any profile field, including the email address, without passing the second-factor check, which could lead to account takeover.
What the attacker needed
Valid session for the target account
How it was found
- Trigger a profile update and observe that a 2FA prompt appears and an OTP is sent by email.
- Enter the OTP and note that the server returns a special verification token for that one request.
- Send an email update request that includes the clientId parameter and the verification token.
- Remove the clientId parameter from the request and send it again.
- Observe that the update succeeds without any OTP or verification token.
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.
Two-factor authentication (2FA) is a second proof of identity, usually a code sent to your email or phone. Here the website only asked for that code when a particular value was included in the request. If an attacker left that value out, the website forgot to ask for the code and let the change go through.
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.