Security Write-Up: Authentication Bypass via Response Manipulation on Email Change Feature
The email change flow decided whether an OTP was valid from a success flag in the GraphQL response, and the front end trusted that flag. By intercepting the failed response and flipping the flag to true, an attacker could pass verification with a wrong code and change the account email.
Bugbounty
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.
Context
During a security assessment of hollisterco.com, Yousef Abdullah found a logic flaw in the account email change flow. The feature lets a signed-in user change the email address registered on their account. Before the change is accepted, the application asks for a one-time password (OTP) sent to the new address, so that the user proves they control it. The verification step is exposed through a GraphQL mutation named validateOtpForAccountChange.
The bug is that the client decides whether the OTP was correct by reading a boolean flag in the GraphQL response, and the front end trusts that flag. If the response says the check failed, the flow stops; if it says the check succeeded, the email change goes through. The researcher intercepted the failure response and rewrote it to a success, and the application accepted an invalid code. The author classifies this as a client-side logic flaw and authentication bypass, citing CWE-288 and CWE-602.

Setup
The only tool named in the report is Burp Suite, used to intercept and modify the GraphQL traffic. The researcher navigated to Account Settings on hollisterco.com and triggered an email update. No account roles, versions or other preconditions are described beyond having access to the email update feature and being able to intercept the request and response.
Finding it
While inspecting the account settings and the email update feature, the researcher looked at how the application handles OTP verification during sensitive account changes. The interesting part was the shape of the GraphQL response: the outcome of the verification is carried in a success boolean inside the validateOtpForAccountChange payload, and the front end acts on that value. That made the verification step a candidate for response manipulation, because the decision appeared to be made on data the client receives and trusts rather than on a server-side state change that the client cannot influence.
Exploitation
Step 1: Initiate the email update
The researcher navigated to Account Settings on hollisterco.com and triggered an email update action. This starts the flow that will later ask for the OTP.
Step 2: Submit an invalid OTP
When prompted for the verification code, he entered a completely arbitrary or incorrect code, such as 000000, and submitted it. The point is to force the server to return a failure, which can then be tampered with.
Step 3: Intercept the response
Using Burp Suite, he intercepted the GraphQL request targeting the mutation validateOtpForAccountChange. The request itself is not reproduced in the report; what matters is the response that comes back for the wrong code.
Step 4: Observe the failure
The server rejected the code and returned a failure status:
{ "errors": [ { "message": "INVALID_OTP", "extensions": { "code": "UNAUTHENTICATED" } } ], "data": { "validateOtpForAccountChange": { "success": false, "errors": ["Invalid OTP code"] } }}
The top-level errors array carries the message INVALID_OTP with the extension code UNAUTHENTICATED. Inside data, the mutation result has success set to false and an errors array containing Invalid OTP code. This is the response the client would normally use to tell the user the code was wrong.
Step 5: Manipulate the response
Instead of letting the failure reach the browser, he modified the response payload in Burp Suite to force a success state:
{ "data": { "validateOtpForAccountChange": { "success": true, "errors": null, "__typename": "APIResponse" } }}
The top-level errors array is gone, success is flipped to true, the inner errors field is set to null, and a __typename of APIResponse is added. The client now sees a payload that looks like a successful verification.
Step 6: Forward and observe the bypass
He forwarded the modified response to the client browser. The application accepted the invalid OTP and the verification step was bypassed.
Root cause
The verification result is expressed as a boolean flag (success) in the GraphQL response, and the front end uses that flag to decide whether the OTP was correct. Because the response is data the client receives, an attacker who controls the client, or a proxy in front of it, can rewrite the flag before the front end reads it. The server's own rejection (INVALID_OTP, success: false) is therefore not what gates the flow; the client's interpretation of the response is. In the author's framing, security controls are enforced on the client side rather than validated on the server, which is the pattern behind CWE-288 and CWE-602.
The report does not show what the server does after the manipulated response is forwarded, so whether the email change itself was committed server-side purely on the strength of the client's state, or whether the client then issued a follow-up request that the server accepted, is not stated. What is clear is that the verification step as experienced by the user was defeated by editing the response.
Impact
The author lists three consequences:
- Bypassing security controls: the OTP and multi-factor verification intended to protect sensitive user actions is completely defeated.
- Unauthorized account modification: an attacker can manipulate verification flows on account modification endpoints to alter critical settings without proper validation.
- Logic flaw exploitation: it shows how dangerous it is when back-end systems or front-end applications rely on client-side trust models for security decisions.
The practical effect described is that an invalid OTP is accepted and the verification step is skipped. The report does not describe chaining this with other issues, nor does it state what an attacker would need beyond the ability to intercept and modify their own traffic.
Fix
The report gives remediation guidance rather than describing a patch that was applied:
- Enforce strict server-side validation: never rely on client-side state or boolean flags returned in HTTP responses to determine whether an operation succeeded.
- Cryptographic verification: ensure that critical state updates, such as email changes, are executed only upon secure server-side validation of OTP tokens.
- Secure API design: treat all client inputs and responses as untrusted, and keep authorisation and verification logic on the back end.
In short, the server should decide whether the OTP was correct and perform the email change itself, rather than letting the client's reading of a response flag drive the outcome.
Variants to test
- Other OTP-gated flows: password reset, login second factor, phone number change, and adding a new payment method. A positive result is a failure response whose
successflag, status field or error array can be flipped in the proxy and the client then proceeds as if verification passed. - GraphQL mutations with boolean result fields: look for mutations whose payload contains fields such as
success,verified,isValidorerrors. A positive result is the client advancing the workflow after you change only those fields in the response. - HTTP status codes: where the client keys off the status code rather than a body field, change a
4xxto200and see whether the front end continues. A positive result is the same behaviour as above with no body edit. - Multi-step wizards: flows where step two is gated on a response from step one. A positive result is reaching the final step, or a state change, without satisfying the check in step one.
- Server-side confirmation: after any successful manipulation, check whether the server actually recorded the change, for example by reloading the account page or querying the profile. A positive result is the change persisting, which shows the bypass reached the back end rather than only the UI.
What happened, in plain words
A security researcher named Yousef Abdullah was testing a website, hollisterco.com, which is an online shop where people can create an account. Every account has an email address attached to it, and the site lets you change that address from your account settings.
Changing the email on an account is a sensitive action. If someone else could change it, they could take the account over: they would point the account at their own email, reset the password, and lock the real owner out. So the site adds a check. Before it accepts a new email address, it sends a one-time password (OTP) to that new address. An OTP is a short code that is valid for one use only. If you can read the code, it proves you can read mail sent to that address, which in turn proves the address is yours.
What Yousef found is that the site's front end, the part that runs in your browser, was the thing deciding whether the code was correct. The server did check the code and did say no, but it said no in a message that the browser then read and acted on. Because that message travels over the network, anyone sitting between the browser and the server, with a tool that can pause and edit traffic, can rewrite the "no" into a "yes" before the browser sees it. The browser believes the edited message, and the verification step is bypassed with a code that was never valid.
This is called a client-side logic flaw, or an authentication bypass. Authentication is the process of proving who you are; a bypass means getting past that process without actually satisfying it. The author also cites two catalogue entries for this kind of mistake, CWE-288 and CWE-602, which are standard reference numbers for known weakness patterns.

The screenshot above is the header of the write-up as it was published, with the title and the author's name.
The pieces you need to know before the story
A few ideas come up again and again below, so here they are from zero.
The front end and the back end. A modern website is split in two. The back end is software on the company's servers: it holds the database, checks passwords, and decides what is allowed. The front end is the code that runs in your browser: it draws the pages, shows the forms, and reacts to what you click. The two talk to each other over the network. The front end asks questions, the back end answers.
An API. An API is the set of questions a back end agrees to answer, and the format of the answers. Think of a restaurant: the menu is the API, the kitchen is the back end, and the waiter carries your order and the plate back and forth. You never walk into the kitchen yourself; you ask through the waiter. In a web app, the browser is the waiter.
GraphQL. GraphQL is one particular style of API. Instead of many separate addresses for different things, there is usually one address, and the browser sends a description of exactly the data it wants. Each named operation in that description is called a mutation when it changes something (like updating an email) and a query when it only reads. The answer comes back as JSON, a text format built from curly braces, square brackets, names and values.
JSON. JSON is just structured text. { "success": false } is an object with one field, named success, whose value is false. A boolean is a value that can only be true or false. An array is a list, written with square brackets. null means "nothing here".
An HTTP response. When your browser asks a server for something, the server replies with a response. The response has a status code (a number such as 200 for success or 400 for a bad request) and usually a body, which is the actual content, such as a web page or a JSON document.
A proxy. A proxy is a program that sits between your browser and the server and passes messages back and forth. Normally it is invisible. A security testing proxy lets you pause each message, read it, change it, and then send it on. Burp Suite is the proxy used in this report. It is the equivalent of a postal worker who opens your letters, edits them, and reseals them before delivery.
An OTP and multi-factor verification. An OTP, one-time password, is a code that works once and then expires. Multi-factor verification means proving your identity with more than one thing, for example your password plus a code sent to your email or phone. The point is that stealing one factor is not enough.
Why the client should never be the judge. If the browser decides whether a check passed, then whoever controls the browser controls the verdict. The browser is on the attacker's own machine, so the attacker can always change what it sees. The rule of thumb is: the back end decides, the front end only displays. When a security decision is made on the client side, that is the flaw class here.
Setting up
The only tool the report names is Burp Suite, used to intercept and modify the GraphQL traffic. The researcher went to Account Settings on hollisterco.com and started an email update. The report does not describe any special account role, software version, or other precondition beyond having access to the email update feature and being able to intercept the request and the response.
Finding it
While looking at the account settings and the email update feature, Yousef examined how the site handles OTP verification during sensitive account changes. The interesting part was the shape of the GraphQL answer: the result of the check is carried in a field called success inside the validateOtpForAccountChange result, and the front end acts on that value.
That made the check a candidate for response manipulation. Response manipulation means editing the server's reply on its way to the browser. It works when the browser trusts the reply to make a security decision, instead of the server having already made that decision and recorded it on its own side. The question the researcher was asking was simple: does the browser decide, or does the server decide? The shape of the answer suggested the browser.
Exploitation, step by step
Step 1: Start the email update
He went to Account Settings on hollisterco.com and triggered an email update. This is the ordinary action any user takes. It starts the flow that will later ask for the OTP. Doing it first is necessary because the verification step only exists inside that flow.
Step 2: Submit a wrong OTP
When the site asked for the verification code, he typed a completely arbitrary or incorrect code, such as 000000, and submitted it. The purpose is deliberate: a wrong code forces the server to answer "failure". That failure answer is the thing he wants to catch and edit. If the code were correct, there would be nothing to tamper with.
Step 3: Intercept the response
Using Burp Suite, he intercepted the GraphQL request that targets the mutation validateOtpForAccountChange. A mutation, as above, is a GraphQL operation that changes something; here it is the operation that checks the code. The request itself is not reproduced in the report. What matters is the answer that comes back for the wrong code.
Step 4: Look at the failure
The server rejected the code and returned a failure:
{ "errors": [ { "message": "INVALID_OTP", "extensions": { "code": "UNAUTHENTICATED" } } ], "data": { "validateOtpForAccountChange": { "success": false, "errors": ["Invalid OTP code"] } }}
Line by line:
- The outer curly braces open one JSON object, the whole reply.
"errors"is a top-level list. In GraphQL, this is where the server reports that something went wrong with the operation as a whole.- Inside that list there is one object.
"message": "INVALID_OTP"is the machine-readable reason: the OTP was not valid. "extensions"holds extra details."code": "UNAUTHENTICATED"is a category label meaning the request was not treated as authenticated."data"is the part of the reply that corresponds to what the browser asked for. Even on failure, GraphQL often fills this in."validateOtpForAccountChange"is the name of the mutation, and its value is the result object."success": falseis the boolean the front end reads. It says the check did not pass."errors": ["Invalid OTP code"]is a human-readable message list, the kind of text a site might show to the user.
This is the reply the browser would normally use to tell the user the code was wrong. The researcher now knows exactly which field the browser is likely to look at.
Step 5: Edit the reply
Instead of letting the failure reach the browser, he changed the response payload in Burp Suite to force a success state:
{ "data": { "validateOtpForAccountChange": { "success": true, "errors": null, "__typename": "APIResponse" } }}
Line by line:
- The top-level
"errors"list is gone entirely, so nothing at the outer level says the operation failed. "data"is still there, and still contains"validateOtpForAccountChange"."success"is flipped fromfalsetotrue. This is the single most important edit: it is the flag the browser reads."errors"inside the result is set tonull, meaning "no errors", so any code that checks that list finds it empty."__typename": "APIResponse"is added. In GraphQL,__typenameis a built-in field that names the type of an object. Adding it makes the edited object look like a normal, well-formed result of the expected type rather than a hand-made stub.
The browser now receives a reply that looks exactly like a successful verification.
Step 6: Forward it and watch the bypass
He forwarded the edited reply to the browser. The application accepted the invalid OTP and the verification step was bypassed.
Why it worked
The result of the check is expressed as a boolean flag, success, in the GraphQL reply, and the front end uses that flag to decide whether the OTP was correct. Because the reply is data the browser receives, anyone who controls the browser, or a proxy in front of it, can rewrite the flag before the front end reads it. The server's own rejection, INVALID_OTP with success: false, is therefore not what gates the flow. What gates the flow is the browser's reading of the reply.
In the author's framing, security controls are enforced on the client side rather than validated on the server, which is the pattern behind CWE-288 and CWE-602.
The report does not show what the server does after the edited reply is forwarded. Whether the email change was committed on the server purely on the strength of the browser's state, or whether the browser then sent a follow-up request that the server accepted, is not stated. What is clear is that the verification step, as the user experiences it, was defeated by editing the reply.
What an attacker could do with it
The author lists three consequences:
- Bypassing security controls: the OTP and multi-factor verification meant to protect sensitive user actions is completely defeated.
- Unauthorized account modification: an attacker can manipulate verification flows on account modification endpoints to alter critical settings without proper validation.
- Logic flaw exploitation: it shows how dangerous it is when back-end systems or front-end applications rely on client-side trust models for security decisions.
The practical effect described is that an invalid OTP is accepted and the verification step is skipped.
How to fix it
The report gives guidance for developers rather than describing a patch that was applied:
- Enforce strict server-side validation: never rely on client-side state or boolean flags returned in HTTP responses to decide whether an operation succeeded.
- Cryptographic verification: make sure critical state updates, such as email changes, happen only after secure server-side validation of OTP tokens.
- Secure API design: treat all client inputs and responses as untrusted, and keep authorisation and verification logic on the back end.
In short, the server should decide whether the OTP was correct and perform the email change itself, rather than letting the browser's reading of a reply flag drive the outcome.
Other places to look for the same mistake
- Other OTP-gated flows: password reset, the second factor at login, phone number change, and adding a new payment method. A positive result is a failure reply whose
successflag, status field or error list can be flipped in the proxy, after which the browser proceeds as if verification passed. - GraphQL mutations with boolean result fields: look for mutations whose result contains fields such as
success,verified,isValidorerrors. A positive result is the browser moving the workflow forward after you change only those fields in the reply. - HTTP status codes: where the browser keys off the status code rather than a field in the body, change a
4xxto200and see whether the front end continues. A positive result is the same behaviour as above with no body edit at all. - Multi-step wizards: flows where step two depends on a reply from step one. A positive result is reaching the final step, or causing a state change, without satisfying the check in step one.
- Server-side confirmation: after any successful manipulation, check whether the server actually recorded the change, for example by reloading the account page or querying the profile. A positive result is the change persisting, which shows the bypass reached the back end rather than only the screen.
Glossary
- API: the set of questions a back end agrees to answer and the format of the answers; the menu the browser orders from.
- Array: a list of values in JSON, written with square brackets.
- Authentication: the process of proving who you are, for example with a password or a code.
- Authentication bypass: getting past an authentication or verification step without actually satisfying it.
- Back end: the software on the company's servers that holds data and makes the real decisions.
- Boolean: a value that is either true or false.
- Burp Suite: a security testing proxy that lets you pause, read and edit traffic between a browser and a server.
- Client-side logic flaw: a security decision made in the browser rather than on the server, so the person controlling the browser controls the decision.
- CWE-288: a standard reference number for a weakness where authentication is bypassed by an alternate path or channel.
- CWE-602: a standard reference number for a weakness where the client side enforces security for the server side.
- Front end: the code that runs in your browser and draws the pages and forms.
- GraphQL: a style of API where the browser describes exactly the data it wants and the server answers in JSON.
- HTTP response: the server's reply to a browser request, with a status code and usually a body.
- JSON: a text format for structured data, built from curly braces, square brackets, names and values.
- Multi-factor verification: proving identity with more than one thing, such as a password plus a code.
- Mutation: a GraphQL operation that changes something, as opposed to a query that only reads.
- null: a JSON value meaning "nothing here".
- OTP (one-time password): a short code valid for a single use, often sent by email or text message.
- Proxy: a program that sits between browser and server and passes messages along, optionally letting you edit them.
- Response manipulation: editing a server's reply on its way to the browser so the browser acts on false information.
- Status code: the number in an HTTP response, such as 200 for success or 400 for a bad request.
successflag: the boolean field in the GraphQL reply that the browser read to decide whether the OTP was correct.__typename: a built-in GraphQL field that names the type of an object in a reply.validateOtpForAccountChange: the name of the GraphQL mutation that checks the OTP during an email change.