Business Logic Vulnerability: Reward Duplication Through Impression ID Manipulation
The application awarded a $5 reward for watching a video advertisement, but the server trusted a client-supplied impression identifier without checking that it was unique and tied to a completed view. By changing that identifier in a legitimate reward request, an attacker could receive extra reward credits without watching another advertisement.
Published on medium.com
Bug Bounty
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
The target was a mobile application that paid users monetary credits for watching video advertisements. The reward mechanism sat behind an inbox: a user opened the inbox, selected an available video reward, watched the required advertisement, and received the authorised $5 credit. Each eligible advertisement was supposed to result in no more than one reward credit, subject to the application's reward rules.
The request origin is capacitor://localhost. and the reward workflow was driven by an analytics endpoint that recorded impressions. The write-up focuses on that impression-recording request and on whether the backend independently verified that a submitted impression represented a newly completed, eligible advertisement view.
Setup
The assessment was an authorised security test of the application's video-reward workflow. The researcher inspected the network traffic generated by a legitimate video advertisement interaction, using an account that could open the inbox and select a video reward. The captured request shows the client versions and platform in use:
Appversion: 25.1.0andClientappversion: 25.1.0User-Agentidentifying an iPhone on iOS 18.5Content-Type: application/x-www-form-urlencodedOrigin: capacitor://localhost
The request also carried authentication material in Client-Id and Token headers, plus a Devicetoken header. The report shows these as placeholders (<Your ID>, <Your Token>), so the actual values are not part of the write-up.
Finding it
While analysing the reward workflow, the researcher inspected the traffic associated with a legitimate advertisement interaction and found an analytics request with several parameters:
Impressions[impressionId]Impressions[timeBegin]Impressions[timeEnd]Impressions[quality]Impressions[inboxMessageId]
The impression identifier stood out because it appeared to influence how the server processed reward-related activity. The question the researcher then investigated was whether the server independently confirmed that a submitted impression represented a newly completed and eligible advertisement view, or whether it trusted the client-supplied identifier.
Exploitation
Step 1: Capture a legitimate impression request
The researcher recorded the request sent during a normal, completed advertisement view:
POST /api/Analytics/post_impression HTTP/2Host: privateprogram.appContent-Type: application/x-www-form-urlencodedAccept: application/json, text/plain, */*Client-Id: <Your ID>Sec-Fetch-Site: cross-siteAppversion: 25.1.0Accept-Language: en-GB,en;q=0.9Clientappversion: 25.1.0Sec-Fetch-Mode: corsDevicetoken: Origin: capacitor://localhostUser-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148Token: <Your Token>Corpprop: CBContent-Length: 188Accept-Encoding: gzip, deflate, brSec-Fetch-Dest: emptyImpressions%5BimpressionId%5D=68&Impressions%5BtimeBegin%5D=2025/07/30 21:49:56&Impressions%5BtimeEnd%5D=2025/07/30 21:50:07&Impressions%5Bquality%5D=1&Impressions%5BinboxMessageId%5D=7085
The body is URL-encoded form data. Decoded, the fields are Impressions[impressionId]=68, Impressions[timeBegin]=2025/07/30 21:49:56, Impressions[timeEnd]=2025/07/30 21:50:07, Impressions[quality]=1 and Impressions[inboxMessageId]=7085. The report lists these parameters but does not explain what each value means.
Step 2: Modify the impression identifier
The researcher modified the Impressions[impressionId] parameter in an otherwise legitimate reward-related request, keeping the remaining request context unchanged. The report does not reproduce the modified request body, so the exact replacement value is not shown.
Step 3: Observe the extra credit
After the modified request, an additional reward was credited without watching another advertisement. The original test demonstrated that changing the impression identifier within an otherwise legitimate reward-related request could result in an additional $5 credit. The account could consequently receive $10 in total reward credits despite only one advertisement having been watched.

The screenshot accompanies the observation that an additional reward could be credited without watching another advertisement, and that the behaviour suggested a weakness in server-side reward validation and impression tracking.

The proof-of-concept section records that the issue was observed during an authorised test of the application's video-reward workflow.
Observed behaviour and limits
Repeated manipulation appeared capable of causing additional reward issuance. The report is explicit about what the evidence did not establish: the precise upper limit, exploitability across other accounts, and persistence of credited balances were not established by the provided evidence.
Root cause
The observed behaviour suggested that the backend did not adequately enforce the relationship between a completed advertisement, its impression record and the corresponding reward credit. The security boundary was therefore not simply the presence of a valid impression identifier: the backend needed to establish that the impression:
- Belonged to the authenticated account.
- Corresponded to an eligible advertisement event.
- Represented a completed view verified by a trusted source.
- Had not previously been redeemed.
- Was eligible for a reward under the application rules.
The observation is consistent with insufficient server-side reward validation. The exact implementation-level root cause would require backend review.
Impact
A user could receive multiple reward credits after completing only one video advertisement. In the demonstrated case, the account received $10 in total credits despite only one advertisement having been watched, and repeated manipulation appeared capable of causing additional reward issuance. Because the reward is monetary, the weakness creates direct financial exposure for the application operator. The precise upper limit, whether the technique works across other accounts, and whether credited balances persist were not established by the provided evidence.
Fix
The report does not describe a fix that was applied. Based on the analysis, the backend should enforce the relationship between impression, account and reward: verify that the impression belongs to the authenticated account, that it corresponds to an eligible advertisement event, that the view was completed and verified by a trusted source, that it has not previously been redeemed, and that it is eligible under the application rules. The reward should be issued only after those checks pass, independently of client-supplied identifiers.
Variants to test
- Replay an unchanged impression request. Resend the exact captured body. A positive result is a second credit for the same
impressionId. - Change only the impression identifier. Keep
timeBegin,timeEnd,qualityandinboxMessageIdunchanged and substitute a differentimpressionId. A positive result is an additional credit, as observed here. - Change the inbox message identifier. Keep the impression identifier and timestamps and alter
Impressions[inboxMessageId]. A positive result is a credit tied to a different inbox entry without a new view. - Alter the viewing window. Modify
timeBeginandtimeEndto implausible values (for example, a very short window or a future window). A positive result is a credit despite an invalid viewing duration. - Alter the quality flag. Change
Impressions[quality]and observe whether the reward is still issued. A positive result is a credit with a manipulated quality value. - Cross-account impression identifiers. Submit an impression identifier obtained from a different account. A positive result is a credit on the attacker's account for another user's impression.
- Sequential identifier enumeration. Increment or decrement the impression identifier across a range. A positive result is multiple credits from identifiers that were never issued to the account.
- Balance persistence check. After a manipulated credit, wait and re-check the balance. A positive result is a credited balance that survives beyond the session, which the original evidence did not establish.
What happened, in plain words
A mobile app paid users real money, $5 each time they watched a video advertisement. The app was supposed to pay once per advertisement. A security researcher found that by changing one number in a request that the app sends to its server, a user could get paid again for the same advertisement, without watching a second one. The researcher tested this during an authorised security assessment and showed that an account could receive $10 in total credits after watching only one advertisement. The behaviour suggested the server did not properly check that the impression was new, belonged to the user, and had not already been paid for.
Background: the app and its reward feature
The request in this report comes from capacitor://localhost. The request in this report comes from capacitor://localhost, which is how a Capacitor app identifies itself when it talks to its server. The app had an inbox where users could see available video rewards. The normal flow was:
- Open the inbox.
- Select an available video reward.
- Watch the required advertisement.
- Receive the authorised $5 credit.
Each eligible advertisement was supposed to result in no more than one reward credit, according to the app's rules. The reward workflow was driven by an analytics endpoint that recorded impressions. An impression is simply a record that an advertisement was shown or viewed. The report focuses on the request that records an impression and on whether the server independently checked that the impression was a newly completed, eligible advertisement view.
What is an API and why requests matter
An API (Application Programming Interface) is a way for one piece of software to talk to another. In a mobile app, the app on your phone sends requests to a server, and the server sends back responses. Think of it like a waiter in a restaurant: you (the app) tell the waiter (the API) what you want, and the waiter brings it from the kitchen (the server). The request is the order, and the response is the food.
When you use an app, your phone is constantly sending requests to servers. These requests contain data, such as what you clicked, what you searched for, or, in this case, that you watched an advertisement. The server processes the request and may update your account, for example by adding a reward credit.
What is a token and why it matters
A token is a piece of data that proves who you are. When you log in to an app, the server gives your phone a token. Your phone then includes that token in every request to show that the request comes from your account. It's like a wristband at an event: once you have it, you can enter areas without showing your ID again. In this report, the request includes a Token header and a Client-Id header. The report shows them as placeholders (<Your ID>, <Your Token>), so the actual values are not part of the write-up. There is also a Devicetoken header, which likely identifies the device.
Setup: how the test was done
The assessment was an authorised security test of the app's video-reward workflow. The researcher used an account that could open the inbox and select a video reward. They inspected the network traffic generated by a legitimate video advertisement interaction. The captured request shows the client versions and platform in use:
Appversion: 25.1.0andClientappversion: 25.1.0User-Agentidentifying an iPhone on iOS 18.5Content-Type: application/x-www-form-urlencodedOrigin: capacitor://localhost
The request also carried authentication material in Client-Id and Token headers, plus a Devicetoken header. The report shows these as placeholders, so the actual values are not part of the write-up.
Finding it: the suspicious request
While analysing the reward workflow, the researcher inspected the traffic associated with a legitimate advertisement interaction and found an analytics request with several parameters:
Impressions[impressionId]Impressions[timeBegin]Impressions[timeEnd]Impressions[quality]Impressions[inboxMessageId]
The impression identifier stood out because it appeared to influence how the server processed reward-related activity. The question the researcher then investigated was whether the server independently confirmed that a submitted impression represented a newly completed and eligible advertisement view, or whether it trusted the client-supplied identifier.
Exploitation: step by step
Step 1: Capture a legitimate impression request
The researcher recorded the request sent during a normal, completed advertisement view:
POST /api/Analytics/post_impression HTTP/2Host: privateprogram.appContent-Type: application/x-www-form-urlencodedAccept: application/json, text/plain, */*Client-Id: <Your ID>Sec-Fetch-Site: cross-siteAppversion: 25.1.0Accept-Language: en-GB,en;q=0.9Clientappversion: 25.1.0Sec-Fetch-Mode: corsDevicetoken: Origin: capacitor://localhostUser-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148Token: <Your Token>Corpprop: CBContent-Length: 188Accept-Encoding: gzip, deflate, brSec-Fetch-Dest: emptyImpressions%5BimpressionId%5D=68&Impressions%5BtimeBegin%5D=2025/07/30 21:49:56&Impressions%5BtimeEnd%5D=2025/07/30 21:50:07&Impressions%5Bquality%5D=1&Impressions%5BinboxMessageId%5D=7085
This is an HTTP request. Let's break it down line by line (though it's all on one line here, we can separate the parts):
POST /api/Analytics/post_impression HTTP/2, This is the request line.POSTis the method, meaning we are sending data to the server./api/Analytics/post_impressionis the path, the address of the endpoint on the server.HTTP/2is the version of the HTTP protocol.Host: privateprogram.app, The domain name of the server.Content-Type: application/x-www-form-urlencoded, Tells the server that the body of the request is formatted like a web form, with key=value pairs separated by&.Accept: application/json, text/plain, */*, Tells the server what types of responses the client can accept.Client-Id: <Your ID>, A header shown with a placeholder value. The actual value is redacted.Sec-Fetch-Site: cross-site, A security header.Appversion: 25.1.0, The version of the app.Accept-Language: en-GB,en;q=0.9, The preferred language.Clientappversion: 25.1.0, Another version header.Sec-Fetch-Mode: cors, A security header.Devicetoken:, A device token header.Origin: capacitor://localhost, The origin of the request, showing it comes from a Capacitor app.User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148, Identifies the browser and device.Token: <Your Token>, The authentication token, redacted.Corpprop: CB, A header in the captured request.Content-Length: 188, The length of the request body in bytes.Accept-Encoding: gzip, deflate, br, The compression methods the client supports.Sec-Fetch-Dest: empty, A security header.- The body:
Impressions%5BimpressionId%5D=68&Impressions%5BtimeBegin%5D=2025/07/30 21:49:56&Impressions%5BtimeEnd%5D=2025/07/30 21:50:07&Impressions%5Bquality%5D=1&Impressions%5BinboxMessageId%5D=7085, This is URL-encoded form data.%5Bis[and%5Dis]. Decoded, the fields are:Impressions[impressionId]=68, The impression identifier, a number that identifies this particular impression.Impressions[timeBegin]=2025/07/30 21:49:56, The start time of the advertisement view.Impressions[timeEnd]=2025/07/30 21:50:07, The end time of the view.Impressions[quality]=1, A quality flag.Impressions[inboxMessageId]=7085, An inbox message identifier.
The timeBegin and timeEnd values describe the viewing window, quality is a client-supplied quality flag, and inboxMessageId ties the impression to the inbox entry that offered the reward.
Step 2: Modify the impression identifier
The researcher modified the Impressions[impressionId] parameter in an otherwise legitimate reward-related request, keeping the remaining request context unchanged. The report does not reproduce the modified request body, so the exact replacement value is not shown.
Why do this? The impression identifier is like a ticket number for a specific advertisement view. If the server simply trusts whatever number the app sends and pays out for each new number, then changing the number could trick the server into thinking a new advertisement was watched. The researcher wanted to see if the server checked that the impression was real and not already paid.
Step 3: Observe the extra credit
After the modified request, an additional reward was credited without watching another advertisement. The original test demonstrated that changing the impression identifier within an otherwise legitimate reward-related request could result in an additional $5 credit. The account could consequently receive $10 in total reward credits despite only one advertisement having been watched.

The screenshot accompanies the observation that an additional reward could be credited without watching another advertisement, and that the behaviour suggested a weakness in server-side reward validation and impression tracking.

The proof-of-concept section records that the issue was observed during an authorised test of the application's video-reward workflow.
Observed behaviour and limits
Repeated manipulation appeared capable of causing additional reward issuance. The report is explicit about what the evidence did not establish: the precise upper limit, exploitability across other accounts, and persistence of credited balances were not established by the provided evidence.
Root cause: why it worked
The observed behaviour suggested that the backend did not adequately enforce the relationship between a completed advertisement, its impression record and the corresponding reward credit. The security boundary was therefore not simply the presence of a valid impression identifier: the backend needed to establish that the impression:
- Belonged to the authenticated account.
- Corresponded to an eligible advertisement event.
- Represented a completed view verified by a trusted source.
- Had not previously been redeemed.
- Was eligible for a reward under the application rules.
The observation is consistent with insufficient server-side reward validation. The exact implementation-level root cause would require backend review.
Impact: what could go wrong
A user could receive multiple reward credits after completing only one video advertisement. In the demonstrated case, the account received $10 in total credits despite only one advertisement having been watched, and repeated manipulation appeared capable of causing additional reward issuance. Because the reward is monetary, the weakness creates direct financial exposure for the application operator. The precise upper limit, whether the technique works across other accounts, and whether credited balances persist were not established by the provided evidence.
Fix: how to prevent it
The report does not describe a fix that was applied. Based on the analysis, the backend should enforce the relationship between impression, account and reward: verify that the impression belongs to the authenticated account, that it corresponds to an eligible advertisement event, that the view was completed and verified by a trusted source, that it has not previously been redeemed, and that it is eligible under the application rules. The reward should be issued only after those checks pass, independently of client-supplied identifiers.
Variants to test
- Replay an unchanged impression request. Resend the exact captured body. A positive result is a second credit for the same
impressionId. - Change only the impression identifier. Keep
timeBegin,timeEnd,qualityandinboxMessageIdunchanged and substitute a differentimpressionId. A positive result is an additional credit, as observed here. - Change the inbox message identifier. Keep the impression identifier and timestamps and alter
Impressions[inboxMessageId]. A positive result is a credit tied to a different inbox entry without a new view. - Alter the viewing window. Modify
timeBeginandtimeEndto implausible values (for example, a very short window or a future window). A positive result is a credit despite an invalid viewing duration. - Alter the quality flag. Change
Impressions[quality]and observe whether the reward is still issued. A positive result is a credit with a manipulated quality value. - Cross-account impression identifiers. Submit an impression identifier obtained from a different account. A positive result is a credit on the attacker's account for another user's impression.
- Sequential identifier enumeration. Increment or decrement the impression identifier across a range. A positive result is multiple credits from identifiers that were never issued to the account.
- Balance persistence check. After a manipulated credit, wait and re-check the balance. A positive result is a credited balance that survives beyond the session, which the original evidence did not establish.
Glossary
- API: Application Programming Interface; a way for software to communicate with other software, like a waiter taking your order to the kitchen.
- Capacitor: A tool for building mobile apps using web technologies; apps built with it often use
capacitor://localhostas their origin. - Endpoint: A specific URL or address on a server that an API exposes, like a specific counter at a service desk.
- HTTP: The protocol used for sending requests and responses on the web.
- POST: An HTTP method used to send data to a server, often to create or update something.
- Header: Extra information sent with an HTTP request or response, like metadata on an envelope.
- Token: A piece of data that proves your identity, like a wristband at an event.
- URL-encoded: A way of formatting data in a URL or request body so that special characters are represented by codes (e.g.
%5Bfor[). - Impression: A record that an advertisement was shown or viewed.
- Business logic vulnerability: A flaw in the rules or workflow of an application, rather than in its code syntax, that allows unintended behaviour.
- Server-side validation: Checks performed on the server to ensure data is correct and authorised, rather than trusting the client.
- Replay: Sending the same request again, often to see if it is accepted multiple times.
- Enumeration: Trying a sequence of values (like numbers) to find valid ones.
- Persistence: Whether data (like a credited balance) remains over time.
- Proof of Concept (PoC): A demonstration that a vulnerability can be exploited, often with steps or screenshots.
- Root cause: The underlying reason why a vulnerability exists.
- Impact: The potential harm or consequence of a vulnerability.
- Fix: A change to the system that removes or mitigates the vulnerability.
- Variant: A different way of testing the same vulnerability, often with slight changes to the input.