How I Registered Multiple Accounts in PrivateInternetAccess VPN Service for FREE
The signup endpoint accepted a Google Play purchase receipt and order ID without verifying them against Google's servers, so an attacker could change the order ID to a non-existent value and register a free account. This allowed multiple free monthly subscriptions.
{{media:0}}
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
Private Internet Access (PIA) is a personal virtual private network service that supports several VPN technologies: PPTP, L2TP/IPsec, SOCKS5 and OpenVPN. The service is paid, and the feature under examination here is account signup through PIA's Android client, which is distributed on Google Play. The client talks to the backend over HTTPS, and the signup call is the one that creates an account and returns the credentials for it.
The write-up describes a logic flaw in that signup endpoint that let the researcher create multiple accounts without paying, each one receiving an invoice for a monthly subscription.
Setup
The researcher worked against the Android application, not the website. The tools were:
- Genymotion, as the Android emulator running the PIA client.
- Burp Suite, as the intercepting proxy, to capture and tamper the traffic.
- A paid PIA account, bought for 362.00 PHP (USD 6.95), so that a real purchase flow could be observed.
- Dummy email addresses, used for the accounts created during testing.
The client version seen in the captured request is [redacted](451). The precondition for the whole exercise is a completed purchase in the app, because the signup request carries the Google Play receipt that results from it.
Finding it
The researcher first poked at endpoints in the Android application and found nothing of interest. The useful observation came while monitoring the tampered traffic of a genuine purchase. The signup request stood out:
POST /api/client/signup HTTP/1.1User-Agent: privateinternetaccess.com Android Client/[redacted](451)Content-Type: application/json; charset=utf-8Content-Length: 365Host: www.privateinternetaccess.comConnection: closeAccept-Encoding: gzip, deflate{“store”:”google_play”,”client_version”:”v1.7.3.1(451)”,”receipt”:{“order_id”:”GPA.XXXX-XXXX-XXXX-XXXXX”,”token”:”<some token>”,”product_id”:”monthly_pia_2"},”email”:”<here goes the email>”,”marketing”:{}}
The request body is JSON and contains a store field set to google_play, a client_version, a receipt object with order_id, token and product_id, the email for the new account, and an empty marketing object. The response to this call is supposed to contain the new account's username and password.
The first experiment was to send the request to Burp Repeater and change the email to another dummy address. The result was that the password in the response became null. That alone was not the bug, but it suggested the server was doing something stateful with the receipt rather than simply validating it.

The decisive observation was on order_id. It is a Google Play order identifier of the form GPA.XXXX-XXXX-XXXX-XXXXX, and the researcher noticed that the last digit is a number. The researcher incremented the last digit of the order identifier and resent the request.
Exploitation
Step 1: Capture the signup request
Install the PIA client from Google Play, register, and buy a subscription while Burp Suite is intercepting. The signup call shown above is the one to keep. Its important parts are:
receipt.order_id: the Google Play order identifier, ending in a numeric digit.receipt.token: the purchase token from Google Play.receipt.product_id:monthly_pia_2, the monthly subscription product.email: the address the account will be created for.
Step 2: Change the email
Send the captured request to Burp Repeater and replace email with a different dummy address. The response comes back with the password set to null. This shows the server is not treating the request as a plain new signup: something about the receipt is already consumed or tied to the first account.
Step 3: Increment the order_id
Change the last digit of order_id to the next value and resend, keeping the new dummy email. The server accepts the request, the account is registered for free, and an invoice for a monthly subscription arrives at the dummy email address.
Step 4: Repeat
Use another dummy email and another incremented order_id. The account is registered again for free, with another invoice from PIA. The subscription obtained this way lasts one month.
The reproduction steps as given in the report:
- Download and install PrivateInternetAccess from Google Play.
- Register and buy a subscription, then tamper the request using Burp Suite.
- You should encounter the vulnerable request shown above.
- To make another account, change the
emailparameter and decrease or increment theorder_id, as long as it does not already exist in PIA's database.
Root cause
The signup endpoint trusts the client-supplied receipt.order_id as proof of purchase. The order identifier is sequential in its last digit, so guessing a neighbouring value produces an identifier the backend has not seen before and accepts. The server accepted an order identifier that had not been seen before. Changing the email made the password in the response null.
Impact
An attacker with a single paid purchase can register further accounts without paying, each with a one-month subscription and a corresponding invoice sent to an arbitrary email address. The report does not describe any access to other users' accounts or data; the impact is free service and the resulting revenue loss to PIA.
Fix
PIA fixed the issue, and the researcher describes the implementation as a great fix. The report does not describe the change in detail.
Variants to test
- On other apps that accept store receipts at signup, capture the request and change the order identifier's last digit. A positive result is a new account with a subscription and no charge.
- Change the
emailwhile keeping the receipt. Anullpassword or an error indicates the receipt is consumed; a full credential pair indicates the receipt is reusable. - Replay the same receipt with a different
product_id. A positive result is a longer or more expensive plan being granted. - Try order identifiers that do not exist at all, not just neighbours. A positive result is acceptance of a fabricated identifier, which confirms there is no server-side verification.
Timeline
| Date | Event |
|---|---|
| 02-12-2019 | Report submitted |
| 02-12-2019 | Security team acknowledged the report |
| 02-13-2019 | Researcher replied to the team's response |
| 02-14-2019 | USD 1000 bounty awarded and the issue fixed |
| 02-16-2019 | Reward received via PayPal |
| 02-19-2019 | Request for disclosure via blog |
| 02-19-2019 | Disclosure confirmed |
What happened, in plain words
Private Internet Access (PIA) is a paid service that lets you route your internet traffic through its servers, so that your real location and internet provider cannot easily see what you do online. It is a VPN, short for virtual private network. You pay a subscription, install an app, and the app connects to PIA's servers.
The researcher found that the part of PIA's system that creates a new account could be tricked. When you buy a subscription inside the Android app, the app sends a message to PIA's servers saying "this person paid, please create their account". That message includes a receipt from Google Play, the app store where the purchase was made. The receipt contains an order number. The researcher discovered that by incrementing the last digit of that order number, the server would create another account, without any money being taken. Each fake account came with a one-month subscription and an invoice sent to whatever email address was used.
The researcher reported this to PIA, and PIA fixed it and paid a USD 1000 bounty. A bounty is a reward that companies pay to people who find and report security problems in their systems.
This article explains the whole story from the beginning, assuming you have never done anything like this before. It covers the same steps, the same tools, and the same request, and explains every term as it appears.
Background: what is an API and what is a request?
When you use an app or a website, your device talks to a server. The server is a computer owned by the company, and it holds the data and does the work. The conversation between your device and the server happens through an API, which stands for application programming interface. You can think of an API as a waiter in a restaurant: you tell the waiter what you want, the waiter takes your order to the kitchen, and brings back the food. You do not go into the kitchen yourself. In the same way, the app sends a request to the API, and the API sends back a response.
A request has a few parts. The method tells the server what kind of action you want: GET means "give me something", POST means "here is some data, do something with it". The URL (also called the endpoint) is the address of the specific thing you are asking for, like /api/client/signup. The headers are extra information about the request, such as what kind of data it contains. The body is the actual data you are sending, often in a format called JSON, which is just a way of writing structured information as text, using curly braces and colons.
A response also has a status code (a number that says whether it worked, like 200 for success or 404 for not found), headers, and usually a body with the answer.
The product and the feature
PIA supports several VPN technologies: PPTP, L2TP/IPsec, SOCKS5 and OpenVPN. You do not need to know what each one is for this story; they are simply different ways of building a VPN connection. What matters is that PIA is a paid service, and the feature involved is account signup through PIA's Android app, which is distributed on Google Play.
The app talks to PIA's backend over HTTPS, which is the secure version of the protocol used by web browsers. HTTPS encrypts the conversation so that nobody in between can read it. The signup call is the request that creates an account and returns the username and password for that account.
The problem was a logic flaw. A logic flaw is not a bug in the code that makes it crash; it is a mistake in the rules the code follows. The code works exactly as written, but the rule itself is wrong. Here, the rule was supposed to be "only create an account if the person really paid". The actual rule turned out to be "create an account if the order number looks plausible".
Setting up
The researcher worked against the Android application, not the website. The tools were:
- Genymotion, an Android emulator. An emulator is a program that pretends to be a phone on your computer, so you can run Android apps without a physical device.
- Burp Suite, an intercepting proxy. A proxy sits between your device and the server. Normally your device talks directly to the server; with a proxy, the traffic goes through the proxy first. Burp Suite lets you pause each request, read it, change it, and then send it on. This is called tampering.
- A paid PIA account, bought for 362.00 PHP (USD 6.95). The researcher needed a real purchase so that a real signup request could be captured. PHP is the Philippine peso.
- Dummy email addresses, used for the accounts created during testing. A dummy email is an email address you control but do not use for anything important, so you can receive messages without revealing your main address.
The client version seen in the captured request is [redacted](451). The precondition for the whole exercise is a completed purchase in the app, because the signup request carries the Google Play receipt that results from it.
Finding it
The researcher first poked at endpoints in the Android application and found nothing of interest. An endpoint is simply a specific address on the server that does something, like a door in a building. The useful observation came while monitoring the tampered traffic of a genuine purchase. The signup request stood out:
POST /api/client/signup HTTP/1.1User-Agent: privateinternetaccess.com Android Client/[redacted](451)Content-Type: application/json; charset=utf-8Content-Length: 365Host: www.privateinternetaccess.comConnection: closeAccept-Encoding: gzip, deflate{“store”:”google_play”,”client_version”:”v1.7.3.1(451)”,”receipt”:{“order_id”:”GPA.XXXX-XXXX-XXXX-XXXXX”,”token”:”<some token>”,”product_id”:”monthly_pia_2"},”email”:”<here goes the email>”,”marketing”:{}}
Let us go through this line by line.
POST /api/client/signup HTTP/1.1is the first line of the request.POSTis the method, meaning "here is some data, do something with it"./api/client/signupis the endpoint, the address of the signup feature.HTTP/1.1is the version of the protocol being used.User-Agent: privateinternetaccess.com Android Client/[redacted](451)is a header that tells the server which program is making the request. Here it says the PIA Android client, version 1.7.3.1(451).Content-Type: application/json; charset=utf-8says the body is JSON text, encoded in UTF-8, which is a common way of representing characters.Content-Length: 365says the body is 365 bytes long.Host: www.privateinternetaccess.comsays which server the request is for. One server can host many websites, so the host name tells it which one.Connection: closeasks the server to close the connection after this request, rather than keeping it open for more requests.Accept-Encoding: gzip, deflatesays the client can accept compressed responses, to save bandwidth.- The body is the JSON object. It has a
storefield set togoogle_play, meaning the purchase came from Google Play. It has aclient_versionfield. It has areceiptobject containingorder_id,tokenandproduct_id. Theorder_idis the Google Play order identifier, shown here asGPA.XXXX-XXXX-XXXX-XXXXXwith the real characters replaced by X. Thetokenis the purchase token from Google Play, shown as<some token>. Theproduct_idismonthly_pia_2, the monthly subscription product. Then there is anemailfield, shown as<here goes the email>, which is the address the new account will be created for. Finally there is an emptymarketingobject.
The response to this call is supposed to contain the new account's username and password. In other words, after you pay, the app sends this request, and the server replies with the credentials you will use to connect to the VPN.
The first experiment was to send the request to Burp Repeater and change the email to another dummy address. Burp Repeater is a part of Burp Suite that lets you take a single request, edit it, and send it again and again, seeing the response each time. The result was that the password in the response became null. null is a special value meaning "nothing" or "no value". That alone was not the bug, but it suggested the server was doing something stateful with the receipt rather than simply validating it. Stateful means the server remembers what happened before. If the server simply checked the receipt with Google Play every time, changing the email would either work or fail cleanly. Instead, the server seemed to remember that the receipt had already been used, and returned no password.

The decisive observation was on order_id. It is a Google Play order identifier of the form GPA.XXXX-XXXX-XXXX-XXXXX, and the researcher noticed that the last digit is a number. The researcher incremented the last digit of the order identifier and resent the request. Incrementing means adding one, so if the last digit was 3, it becomes 4.
Exploitation
Step 1: Capture the signup request
Install the PIA client from Google Play, register, and buy a subscription while Burp Suite is intercepting. The signup call shown above is the one to keep. Its important parts are:
receipt.order_id: the Google Play order identifier, ending in a numeric digit.receipt.token: the purchase token from Google Play.receipt.product_id:monthly_pia_2, the monthly subscription product.email: the address the account will be created for.
Why this step: you cannot tamper with a request you have not captured. The proxy lets you see the exact request the app sends after a real purchase, so you know what to change.
Step 2: Change the email
Send the captured request to Burp Repeater and replace email with a different dummy address. The response comes back with the password set to null. This shows the server is not treating the request as a plain new signup: something about the receipt is already consumed or tied to the first account. Consumed means used up; the server has already seen this receipt and will not give out credentials for it again.
Why this step: it tests whether the receipt is reusable. If the server had simply created a new account for any email, the password would have been returned. The null tells us the server is checking something about the receipt.
Step 3: Increment the order_id
Change the last digit of order_id to the next value and resend, keeping the new dummy email. The server accepts the request, the account is registered for free, and an invoice for a monthly subscription arrives at the dummy email address. An invoice is a bill, a document saying how much you owe and for what. Here it is generated even though no money was taken.
Why this step: if the server is not checking with Google Play, it may only be checking whether it has seen this order identifier before. A new identifier, even one that does not correspond to a real purchase, would then be accepted.
Step 4: Repeat
Use another dummy email and another incremented order_id. The account is registered again for free, with another invoice from PIA. The subscription obtained this way lasts one month.
Why this step: repeating confirms the result is not a one-off glitch. Each new identifier and email pair produces a new account, which shows the flaw is systematic.
The reproduction steps as given in the report:
- Download and install PrivateInternetAccess from Google Play.
- Register and buy a subscription, then tamper the request using Burp Suite.
- You should encounter the vulnerable request shown above.
- To make another account, change the
emailparameter and decrease or increment theorder_id, as long as it does not already exist in PIA's database.
Root cause
The signup endpoint trusts the client-supplied receipt.order_id as proof of purchase. In other words, the server believes whatever order number the app sends, without checking it with Google Play. The order identifier is sequential in its last digit, so guessing a neighbouring value produces an identifier the backend has not seen before and accepts. The server accepted an order identifier that had not been seen before. Binding means tying the receipt to a specific person or account so it cannot be used elsewhere. Changing the email made the password in the response null. Keyed on means the check depends on that value; if you change the value, you get past the check.
Impact
An attacker with a single paid purchase can register further accounts without paying, each with a one-month subscription and a corresponding invoice sent to an arbitrary email address. Arbitrary means any address the attacker chooses. The report does not describe any access to other users' accounts or data; the impact is free service and the resulting revenue loss to PIA.
Fix
PIA fixed the issue, and the researcher describes the implementation as a great fix. The report does not describe the change in detail. Server-side verification means the server itself asks Google Play whether the receipt is real, instead of believing the app.
Variants to test
These are other things you could try on similar systems, to see whether the same kind of flaw exists elsewhere.
- On other apps that accept store receipts at signup, capture the request and change the order identifier's last digit. A positive result is a new account with a subscription and no charge.
- Change the
emailwhile keeping the receipt. Anullpassword or an error indicates the receipt is consumed; a full credential pair indicates the receipt is reusable. - Replay the same receipt with a different
product_id. Replay means sending the same request again. A positive result is a longer or more expensive plan being granted. - Try order identifiers that do not exist at all, not just neighbours. A positive result is acceptance of a fabricated identifier, which confirms there is no server-side verification.
Timeline
| Date | Event |
|---|---|
| 02-12-2019 | Report submitted |
| 02-12-2019 | Security team acknowledged the report |
| 02-13-2019 | Researcher replied to the team's response |
| 02-14-2019 | USD 1000 bounty awarded and the issue fixed |
| 02-16-2019 | Reward received via PayPal |
| 02-19-2019 | Request for disclosure via blog |
| 02-19-2019 | Disclosure confirmed |
Glossary
- API: application programming interface; the set of addresses and rules a program uses to talk to a server, like a waiter taking your order to the kitchen.
- Backend: the server-side part of a system, where the data and logic live, as opposed to the app on your device.
- Bounty: a reward paid by a company to someone who finds and reports a security problem in its systems.
- Burp Repeater: a tool inside Burp Suite that lets you take one request, edit it, and send it repeatedly to see how the server responds.
- Burp Suite: a program that sits between your device and a server, letting you capture, read, and change the traffic.
- Client: the program on your device that talks to the server, such as the PIA Android app.
- Consumed: used up; a receipt that has already been used to create an account.
- Content-Length: a header saying how many bytes long the body of a request or response is.
- Content-Type: a header saying what format the body is in, such as JSON.
- Credentials: the username and password used to log in.
- Dummy email: an email address you control but do not use for anything important, used for testing.
- Emulator: a program that pretends to be a phone on your computer, so you can run mobile apps without a physical device.
- Endpoint: a specific address on a server that performs an action, like a door in a building.
- Genymotion: an Android emulator.
- Google Play: Google's app store for Android, where apps are downloaded and purchases can be made.
- Header: extra information attached to a request or response, such as the format of the body or the program making the request.
- Host: a header saying which server the request is for.
- HTTPS: the secure version of the protocol used by browsers and apps, which encrypts the conversation.
- Increment: add one to a number.
- Intercepting proxy: a program that sits between your device and a server, letting you pause and change the traffic.
- Invoice: a bill, a document saying how much you owe and for what.
- JSON: a way of writing structured information as text, using curly braces, colons and commas.
- Logic flaw: a mistake in the rules a program follows, rather than a crash in the code; the code works as written, but the rule is wrong.
- Method: the part of a request that says what kind of action you want, such as
GETto fetch something orPOSTto send data. - Null: a special value meaning "nothing" or "no value".
- Order identifier: the number Google Play assigns to a purchase, of the form
GPA.XXXX-XXXX-XXXX-XXXXX. - PHP: the Philippine peso, a currency.
- Product ID: an identifier for the specific thing being purchased, such as
monthly_pia_2. - Proxy: a program that sits between your device and a server, forwarding traffic and optionally letting you inspect or change it.
- Receipt: the proof of purchase sent by the app to the server, containing the order identifier and purchase token.
- Replay: sending the same request again.
- Request: a message from your device to a server asking it to do something.
- Response: the message the server sends back.
- Server: the computer owned by the company that holds the data and does the work.
- Server-side verification: the server itself checking something with an outside source, instead of trusting what the app sends.
- Stateful: remembering what happened before, so that the same request can behave differently the second time.
- Status code: a number in a response saying whether the request worked, such as 200 for success or 404 for not found.
- Tampering: changing a request before it reaches the server.
- Token: a value that stands in for something else, such as proof of a purchase, without revealing the underlying details.
- URL: the address of a resource on the internet.
- User-Agent: a header saying which program is making the request.
- UTF-8: a common way of representing characters as bytes.
- VPN: virtual private network; a service that routes your internet traffic through its servers, hiding your real location and provider.
- Vulnerability: a weakness in a system that someone could exploit to make it behave in a way its owners did not intend.