Skip to content
CSRF Disclosed report Beginner

The product/status method CSRF

The product status endpoint accepted a POST request carrying only a product identifier and no anti-CSRF token, so any other site could submit it on a logged-in seller's behalf. An attacker could hide a rival's product from their public page by sending them a link to a page that auto-submits the request.

s_p_q_r Follow

Originally disclosed on HackerOne

  • Triaged in 12 hours
  • Fixed in 11 days
  • Disclosed after 47 days

When we use the "on/off" buttons to set the products to be shown on the products page, a POST-request to https://www.digitalsellz.com/product/status is sent with only the product id as a parameter (no other security tokens).

So the idea is to make my rival visit a web page with a code like this:

<form action="https://www.digitalsellz.com/product/status" method="POST" onload="this.submit ()">
<input type="hidden" name="id" value="%PRODUCT_ID%" /> </form>

where %PRODUCT_ID% is an ID of one of the products shown on his DigitalSellz page. This way me make him hide his product, so the customers will more likely buy mine.

So the purpose is to get a proper product id. Let's find out how it's formed. To do this let's upload a few projects at our page. After this when we check the https://www.digitalsellz.com/product/alllist/1 page we see that every product has both a key and an id, for example:

{"Id":"WlojNDgxNSNZVg","name":"test","currency":"USD","price":"0.90","prwlink":null,"prwtype":"No","createddate":"2015-07-08 12:58:08","key":"NDgxNQ","onprofile":"Enable"}

The key is a public identificator: it's contained in the product URL: https://www.digitalsellz.com/p/NDgxNQ, and the id is a private one: it's not shown there. So we need to figure out the connection between the key and the id.

If we take a look at them, we can notice they both look like Base64-encoded. Indeed, if we add "==" at the end and then do the Base64 decoding, NDgxNQ and WlojNDgxNSNZVg will turn into 4815 and ZZ#4815#YV correspondingly. Thus we see the product key is just its integer number and the id is the same number, just with some random symbols added!

And what if we try to add some other symbols, for example AA, instead? Let's check it: ZZ#4815#YV → AA#4815#AA → QUEjNDgxNSNBQQ, and then we send a POST-request to https://www.digitalsellz.com/product/status with "id=QUEjNDgxNSNBQQ" parameters. In response we get {code:1}. Now if we open the products page we can see the product status changed. So it works!

This way the scenario for the attacker can be as follows:

  1. He goes to his rival's page
  2. He opens the product he's interested in and gets its key from the URL
  3. He decodes it, adds "AA#" and "#AA" at both sides and then encodes it back and thus gets the product id
  4. He creates a web page with such content:
<form action="https://www.digitalsellz.com/product/status" method="POST" onload="this.submit ()">
<input type="hidden" name="id" value="%PRODUCT_ID%" /> </form>

where %PRODUCT_ID% is the product id he got, and sends a link to this page to the victim

When the victim visits it, his product gets hidden from his page.

Proof of concept:

  1. Go to your account and upload a product
  2. Go to your products page and get its key from the url in the "Buy now link" cell. For example, NDgxNQ
  3. Add "==" at the end and Base64-decode it: 4815
  4. Surround it by "AA" symbols: AA#4815#AA
  5. Encode it into Base64 and remove the "==" symbols from the end: QUEjNDgxNSNBQQ
  6. Send a POST-request to https://www.digitalsellz.com/product/status with the "id=QUEjNDgxNSNBQQ" body
  7. Update your products page — you will see the product status has been successfully changed

Ways to fix:

  1. Check the id entirely, not only the number
  2. Add another anti-CSRF token

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The status-changing endpoint relied solely on the session cookie for authorisation and had no anti-CSRF token, and it also validated only the numeric part of the product identifier rather than the whole value.

Impact

A victim who visits an attacker's page while logged in could have a chosen product hidden from their public listing, which may reduce their sales.

What the attacker needed

Victim is logged in; victim visits attacker's page; attacker knows the product key

The fix

The endpoint should require a per-session anti-CSRF token and validate the entire product identifier rather than only its numeric part.

How it was found

  1. Upload a product and open the products page to read its key from the buy-now link.
  2. Base64-decode the key to get the product's integer number.
  3. Wrap that number in chosen padding characters and re-encode it to build a product id.
  4. Send a POST request to the product status endpoint with that id as the only body parameter.
  5. Reload the products page and see the product status has changed.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When you log in to a site, your browser keeps you signed in, and it will attach your session to any request sent to that site, even one triggered by a different page you visit. This endpoint changed a product's visibility based only on a product identifier, with nothing proving the request came from the site's own pages. So a page controlled by someone else could quietly make that change for you.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by s_p_q_r

View all

14 more disclosed reports, best first.

More from DigitalSellz

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.