Skip to content
Business logic Disclosed report Beginner

Can buy Atavist Magazine subscription for free

The gift purchase endpoint returned an error claiming a payment source was required, but still sent a valid gift link to the recipient. An attacker could obtain a paid magazine membership for free by sending a crafted gift request without any payment method attached.

bugra Follow

Originally disclosed on HackerOne

  • Fixed in 43 days
  • Paid in 43 days
  • Disclosed after 3 months

Summary:

Hi team If you go to https://magazine.atavist.com/ and scroll down. You will see membership price is $25, but I found a way to buy this subscription for free via Gift feature. When you send gift request before adding any credit card to your account you will see this response :

request.PNG
request.PNG From the original on HackerOne

However, if you check the gift recipient's email you will see the Gift email that contains the gift link.

mail.PNG
mail.PNG From the original on HackerOne

Steps To Reproduce:

  1. Just send this request (change YOUR_EMAIL, YOUR_PASSWORD, RECIPIENT_EMAIL, gift_timestamp to current date, it was 2020-8-4 while reporting this) :
HTTP
POST /api/v2/store/purchase.php HTTP/1.1
Host: magazine.atavist.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 204
Origin: https://magazine.atavist.com
DNT: 1
Connection: close
Referer: https://magazine.atavist.com/

email=YOUR_EMAIL&password=YOUR_PASSWORD&product_id=com.theatavist.atavist.subscription.membership&gift_timestamp=2020-8-4&gift_recipient=RECIPIENT_EMAIL&gift_message=test&gift_gifter=test

You will see {"error":"invalid_request_error","error_description":"The customer must have an active payment source attached."} in response but if you check the recipient's email, you will see the gift link.

Impact

Able to buy magazine membership for free

Thanks, Bugra

The original report as published on HackerOne, by bugra. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Atavist Magazine (magazine.atavist.com) sells a membership subscription priced at $25. The site also offers a gift feature: a customer can buy a subscription on behalf of someone else by supplying the recipient's email address, a gift message and a gifter name. The purchase flow is handled by a store API endpoint that takes the buyer's credentials and the product identifier together with the gift details.

The report describes a way to obtain the membership gift without an active payment source attached to the buyer's account, so the subscription is delivered for free.

Setup

No special tooling is required beyond the ability to send an HTTP request, for example with a proxy or an intercepting client. The preconditions are:

  1. An account on magazine.atavist.com, identified by an email address and password.
  2. No credit card or other payment source attached to that account.
  3. An email address for the gift recipient, which the attacker controls or can read.

The request in the report was sent with a Firefox 72 user agent on Windows, with Origin and Referer set to https://magazine.atavist.com/.

Finding it

The researcher started from the public membership page, where the price is shown as $25, and looked at the gift flow. The observation that made the flow interesting was the behaviour when a gift request is sent from an account that has no credit card attached: the API returns an error, yet the recipient still receives the gift email containing the gift link. In other words, the error response and the actual side effect disagree.

Exploitation

Step 1: Send the gift purchase request without a payment source

With an account that has no payment source attached, send the following request, replacing YOUR_EMAIL, YOUR_PASSWORD, RECIPIENT_EMAIL and setting gift_timestamp to the current date (it was 2020-8-4 when the report was written):

HTTP
POST /api/v2/store/purchase.php HTTP/1.1
Host: magazine.atavist.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 204
Origin: https://magazine.atavist.com
DNT: 1
Connection: close
Referer: https://magazine.atavist.com/

email=YOUR_EMAIL&[redacted]&product_id=com.theatavist.atavist.subscription.membership&gift_timestamp=2020-8-4&gift_recipient=RECIPIENT_EMAIL&gift_message=test&gift_gifter=test

The body is form-encoded. email and password authenticate the buyer. product_id selects the membership subscription (com.theatavist.atavist.subscription.membership). gift_timestamp carries the date of the gift, gift_recipient is the recipient's email address, and gift_message and gift_gifter are the free-text fields shown with the gift.

Step 2: Observe the error response

The server answers with:

JSON
{"error":"invalid_request_error","error_description":"The customer must have an active payment source attached."}

On its face this is a rejection: the account has no payment source, so the purchase should not proceed.

request.PNG
request.PNG From the original on HackerOne

The screenshot shows this error response for the gift request sent before any credit card was added to the account.

Step 3: Check the recipient's inbox

Despite the error, the recipient's email receives the gift email containing the gift link.

mail.PNG
mail.PNG From the original on HackerOne

The screenshot shows the gift email delivered to the recipient, with the link that grants the gift.

The recipient's inbox receives the gift email containing the gift link.

Root cause

The report does not include any code or server-side detail, so the exact defect is not shown. What the behaviour implies is that the gift side of the purchase is processed before, or independently of, the payment-source check: the gift record and the gift email are created, and only afterwards does the payment validation fail and produce the error response. The client sees a failure, but the state change has already happened. The check that should have gated the whole operation (an active payment source on the customer) is therefore not enforced before the gift is issued.

Impact

An attacker with an account and no payment method can have the gift email with its link delivered to an address they control, without paying. The report states the impact plainly: able to buy magazine membership for free. The gift flow requires a valid account on the site and a recipient email address; the report does not describe any limit on how often this can be repeated.

Fix

The report does not say what was changed. The fix that follows from the behaviour is to validate the payment source before creating the gift and sending the gift email, so that a failed payment check leaves no gift record and no email, and to make the gift issuance and the payment step atomic so a partial failure cannot deliver the product.

Variants to test

  1. Other giftable products: send the same purchase request with a different product_id and no payment source. A positive result is a gift email arriving despite the payment-source error.
  2. Other error paths: trigger validation failures on other fields (for example an empty or malformed gift_recipient) and check whether the gift email is still sent. A positive result is delivery on any response that reports an error.
  3. Replay and timing: resend the same request, or send it with a stale gift_timestamp, and check whether the gift is issued again. A positive result is multiple gift emails or multiple active gifts from one account without payment.
  4. Direct access to the gift link: request the gift link without going through the purchase flow, to see whether the link itself is protected. A positive result is a redeemable membership from a link that was never paid for.

Hunting notes

This kind of bug hides in multi-step commerce flows where a side effect (email, entitlement, voucher) is produced before the payment or authorisation check completes. During recon, look for gift, invite and voucher features, and for endpoints whose names suggest a store or purchase API. The signal is a response that reports an error while something observable still happens: an email arrives, an order appears in the account, or a link works. The researcher demonstrated impact by showing both the error response and the delivered gift email with its link, which makes the discrepancy between the API answer and the real outcome clear without needing access to server code.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

Atavist Magazine is a website that sells a membership subscription for $25. Besides buying a membership for yourself, the site has a gift feature: you can pay for a membership and have it delivered to someone else by typing in their email address, a short message and the name of the person giving the gift.

A researcher found that this gift feature could be abused. If you send a gift request from an account that has no credit card attached, the site replies with an error saying a payment method is required. That looks like a rejection. But the gift email still arrives in the recipient's inbox, with the gift link inside it. So the membership is delivered without anyone paying the $25.

This is a beginner's walkthrough of that report. It explains every concept from scratch, shows the exact request that was sent, and explains what each part of it means.

Background concepts

Before the steps, a few ideas that come up throughout.

What an API is. A website is what you see in the browser: buttons, pages, images. Behind it, the browser talks to the server using small, structured messages. That conversation is the API. A useful comparison is a restaurant: the menu and the dining room are the website, the waiter who takes your order to the kitchen is the API, and the kitchen is the server. You can order without looking at the menu, as long as you know what to say to the waiter. The researcher here did exactly that: instead of clicking through the site, they sent the order message directly.

What an HTTP request is. Every time your browser loads a page or submits a form, it sends an HTTP request to the server. A request has a method (such as GET to fetch something or POST to send data), a path (which part of the site it is aimed at), headers (extra information such as what browser you use) and sometimes a body (the data you are sending, for example a form).

What form-encoded data is. When you fill in a web form and press submit, the browser packs the fields into a single line of text in the form name=value&name=value. That format is called form-encoded, and the server knows to expect it because of the Content-Type header.

What a product identifier is. Online stores need a way to name each thing they sell unambiguously. A product identifier is that name, a short code the store uses internally. Here it is com.theatavist.atavist.subscription.membership, which points at the membership subscription.

What a payment source is. A payment source is a card or other payment method saved on your account. The site checks whether one exists before charging.

What the vulnerability class means. The report is filed as improper access control. Access control is the part of a system that decides who is allowed to do what. When it is improper, someone can do something they should not be allowed to do, here receiving a paid product without paying. A comparison: a cinema lets you into the screening room only after you show a ticket. If the usher checks your ticket after you are already seated and watching, the check is in the wrong place, and the rule does not really hold.

Setup

The researcher needed very little:

  1. An account on magazine.atavist.com, identified by an email address and password.
  2. No credit card or other payment source attached to that account.
  3. An email address for the gift recipient that the researcher could read, so the gift email could be checked.

No special software is described beyond the ability to send an HTTP request by hand, for example with a proxy or an intercepting client. The request in the report was sent with a Firefox 72 user agent on Windows, with Origin and Referer set to https://magazine.atavist.com/.

Finding it

The researcher started on the public membership page, where the price is shown as $25, and then looked at the gift flow. The interesting observation was what happens when a gift request is sent from an account with no credit card attached: the API returns an error, yet the recipient still receives the gift email with the gift link inside. The error message and the real outcome disagree. That disagreement is the bug.

Exploitation

Step 1: Send the gift purchase request without a payment source

With an account that has no payment source attached, send the following request. Replace YOUR_EMAIL, YOUR_PASSWORD and RECIPIENT_EMAIL, and set gift_timestamp to the current date (it was 2020-8-4 when the report was written):

HTTP
POST /api/v2/store/purchase.php HTTP/1.1
Host: magazine.atavist.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Content-Length: 204
Origin: https://magazine.atavist.com
DNT: 1
Connection: close
Referer: https://magazine.atavist.com/

email=YOUR_EMAIL&[redacted]&product_id=com.theatavist.atavist.subscription.membership&gift_timestamp=2020-8-4&gift_recipient=RECIPIENT_EMAIL&gift_message=test&gift_gifter=test

Line by line:

  • POST /api/v2/store/purchase.php HTTP/1.1: this is the first line of the request. POST means data is being sent to the server. /api/v2/store/purchase.php is the path of the store's purchase endpoint, the waiter's route to the kitchen. HTTP/1.1 is the version of the protocol being spoken.
  • Host: magazine.atavist.com: which website the request is for. One server can host many sites, so the request names the one it wants.
  • User-Agent: ...: tells the server which browser and operating system sent the request. Here it claims to be Firefox 72 on Windows.
  • Accept: ...: tells the server which response formats the client can handle, here JSON and plain text.
  • Accept-Language: ...: the languages the client prefers, here Turkish and English.
  • Accept-Encoding: gzip, deflate: the client can accept compressed responses, which saves bandwidth.
  • Content-Type: application/x-www-form-urlencoded; charset=UTF-8: this is the important one for the body. It says the data below is packed in the name=value&name=value form format, encoded in UTF-8.
  • Content-Length: 204: how many bytes long the body is, so the server knows when it has read all of it.
  • Origin: https://magazine.atavist.com: which site the request came from. Browsers add this automatically; servers sometimes use it to decide whether to accept a request.
  • DNT: 1: a header meaning Do Not Track, a browser preference about tracking.
  • Connection: close: close the network connection after this request and response, rather than keeping it open for reuse.
  • Referer: https://magazine.atavist.com/: the page the request was made from.
  • The blank line separates the headers from the body.
  • The body itself: email=YOUR_EMAIL&[redacted]&product_id=com.theatavist.atavist.subscription.membership&gift_timestamp=2020-8-4&gift_recipient=RECIPIENT_EMAIL&gift_message=test&gift_gifter=test. Each & separates one field from the next:
    • email and password identify the buyer, the account making the purchase.
    • product_id selects what is being bought, the membership subscription.
    • gift_timestamp carries the date of the gift.
    • gift_recipient is the recipient's email address.
    • gift_message and gift_gifter are the free-text fields shown with the gift, here both set to test.

Why this step: the researcher wanted to send the gift purchase exactly as the site's own gift form would, but from an account with no card, to see whether the payment check actually stops the gift from being issued.

Step 2: Observe the error response

The server answers with:

JSON
{"error":"invalid_request_error","error_description":"The customer must have an active payment source attached."}

This is a JSON response, a structured format that machines read easily. error names the kind of problem, invalid_request_error, and error_description explains it in words: the customer must have an active payment source attached. On its face this is a rejection: the account has no payment source, so the purchase should not go ahead.

request.PNG
request.PNG From the original on HackerOne

The screenshot shows this error response for the gift request sent before any credit card was added to the account.

Why this step matters: the error is the signal that the payment check ran and failed. A well-built store would stop here and deliver nothing.

Step 3: Check the recipient's inbox

Despite the error, the recipient's email receives the gift email containing the gift link.

mail.PNG
mail.PNG From the original on HackerOne

The screenshot shows the gift email delivered to the recipient, with the link that grants the gift.

The recipient's inbox receives the gift email containing the gift link.

Why this step matters: the error response alone would suggest nothing happened. Checking the inbox shows what actually happened on the server, and the two do not match. That mismatch is the proof of the bug.

Root cause

The report does not include any code or server-side detail, so the exact defect is not shown. What the behaviour implies is that the gift side of the purchase is processed before, or independently of, the payment-source check: the gift record and the gift email are created, and only afterwards does the payment validation fail and produce the error response. The client sees a failure, but the state change has already happened. The check that should have gated the whole operation, an active payment source on the customer, is therefore not enforced before the gift is issued.

Impact

An attacker with an account and no payment method can have the gift email with its link delivered to an address they control, without paying. The report states the impact plainly: able to buy magazine membership for free. The gift flow requires a valid account on the site and a recipient email address; the report does not describe any limit on how often this can be repeated.

Fix

The report does not say what was changed. The fix that follows from the behaviour is to validate the payment source before creating the gift and sending the gift email, so that a failed payment check leaves no gift record and no email, and to make the gift issuance and the payment step atomic, meaning they either both succeed or neither does, so a partial failure cannot deliver the product.

Variants to test

  1. Other giftable products: send the same purchase request with a different product_id and no payment source. A positive result is a gift email arriving despite the payment-source error.
  2. Other error paths: trigger validation failures on other fields (for example an empty or malformed gift_recipient) and check whether the gift email is still sent. A positive result is delivery on any response that reports an error.
  3. Replay and timing: resend the same request, or send it with a stale gift_timestamp, and check whether the gift is issued again. A positive result is multiple gift emails or multiple active gifts from one account without payment.
  4. Direct access to the gift link: request the gift link without going through the purchase flow, to see whether the link itself is protected. A positive result is a redeemable membership from a link that was never paid for.

Hunting notes

This kind of bug hides in multi-step commerce flows where a side effect (an email, an entitlement, a voucher) is produced before the payment or authorisation check completes. During recon, look for gift, invite and voucher features, and for endpoints whose names suggest a store or purchase API. The signal is a response that reports an error while something observable still happens: an email arrives, an order appears in the account, or a link works. The researcher demonstrated impact by showing both the error response and the delivered gift email with its link, which makes the discrepancy between the API answer and the real outcome clear without needing access to server code.

Glossary

  • API: the structured way a browser and a server talk to each other behind the scenes, separate from the pages you see.
  • HTTP request: a message a browser (or a tool) sends to a server asking for something or sending data.
  • Method: the verb of an HTTP request, such as GET to fetch or POST to send data.
  • Path: the part of a request that says which endpoint on the server is being addressed.
  • Header: extra information attached to a request or response, such as the browser type or the data format.
  • Body: the data carried inside a request, for example the fields of a form.
  • Form-encoded: a way of packing form fields into one line as name=value&name=value.
  • JSON: a structured text format for data, made of names and values, easy for programs to read.
  • Product identifier: a short internal code a store uses to name one specific item for sale.
  • Payment source: a card or other payment method saved on an account.
  • Endpoint: a specific address on a server that performs a specific action, such as a purchase.
  • User agent: the header that tells a server which browser and operating system sent the request.
  • Origin: the header that says which site a request came from.
  • Referer: the header that says which page a request was made from.
  • Access control: the part of a system that decides who may do what.
  • Improper access control: a flaw where that decision is wrong, letting someone do something they should not be allowed to do.
  • Side effect: a real change on the server, such as sending an email or creating a record, caused by a request.
  • State change: a lasting change to data on the server, such as a new gift record.
  • Atomic: done as a single unit, so that either every part succeeds or none of it does.
  • Replay: sending the same request again to see whether the action happens a second time.
  • Recon: the exploratory phase of looking around a target to find interesting features and endpoints.
  • Entitlement: a right to use something, such as an active membership.
  • Voucher: a code or link that can be exchanged for a product or discount.
  • Root cause: the underlying defect in the system that produces the visible bug.

More by bugra

View all

21 more disclosed reports, best first.

More from Automattic

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.