Skip to content
IDOR Disclosed report Beginner

Ability to add arbitrary images/descriptions/titles to ohter people's issues via IDOR on getrevue.co

An insecure direct object reference in the issue media endpoint let a logged-in user change the issue identifier in the upload request so that images, titles and descriptions were written to another user's issue. An attacker could therefore alter or effectively hijack other people's issues.

mirhat Follow

Originally disclosed on HackerOne

Critical View original
  • Triaged in 12 days
  • Fixed in 3 months
  • Disclosed after 4 months

Summary:

Hi team, I discovered a vulnerability that allows an attacker to add arbitrary images/descriptions/titles to other people's issues via IDOR

Description:

It's possible to perform a IDOR attacker on getrevue.cowhen adding a image to your issue it's also possible to add descriptions and more to other people's issue

Steps To Reproduce:

  1. Go to getrevue.co and Sign In
  2. Click on Issues then Click on Add new issue
  3. Go to the Issue that you created and from the bottom of the page Click on Media
  4. Turn on the Intercept and Upload image
  5. On the request change the ID to your other account's issue ID

Request:

POST /app/items HTTP/1.1
Host: www.getrevue.co
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:85.0) Gecko/20100101 Firefox/85.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
Referer: https://www.getrevue.co/app/issues/current
X-CSRF-Token: qbWPNjfb12c1Plj7WrYDYgQFgWl2IaZr6/Qr/Vf5WyaDGyf68jn1mzx3xwtgFxBBX19RkHs/YHiREA7Ae6PGqg==
Content-Type: application/json
X-Requested-With: XMLHttpRequest
Content-Length: 519
Origin: https://www.getrevue.co
Connection: close
Cookie: [YOUR_COOKIE]

{"item_type":"image","issue":347976,"id":null,"title":"Your account has been hacked","url":"","description":"Your account has been hacked","author":"Your account has been hacked","publication":"Your account has been hacked","section":"Your account has been hacked","image":"https://revue-direct-production.s3.amazonaws.com/cache/30fd80f79ad919f1e310aa97e0ab7940/7dc308f18b70ba627eb954d2d5376bea.png","image_file_name":"","created_at":"","tweet_handle":"","tweet_profile_image":"","tweet_description":"","tweet_lang":""}

POC video:

Impact

Ability to add arbitrary images/descriptions/titles to other people's issues It's possible to hijack other people's issues

The original report as published on HackerOne, by mirhat. 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. 6 min read.

Context

Revue (getrevue.co) was a newsletter publishing product. Inside its web application, a user creates an issue (a newsletter edition) and can attach media to it, including images, with a title and a description. The report describes an insecure direct object reference in the endpoint that adds an item to an issue: the issue identifier is supplied by the client, and the server does not check that the issue belongs to the caller.

The researcher's summary states the problem plainly: it is possible to add arbitrary images, descriptions and titles to other people's issues, and therefore to hijack them.

Setup

To reproduce, the researcher needs:

  1. A signed-in account on getrevue.co.
  2. A second account, or at least a second issue whose ID is known, to act as the victim.
  3. An intercepting proxy to capture and modify the request that uploads media to an issue.

The request shown was sent from Firefox 85 on macOS 10.15, with the browser's own headers, including an X-CSRF-Token and the session cookie.

Finding it

The feature under test is the Media control at the bottom of an issue page. When an image is uploaded there, the browser sends a JSON request to /app/items describing the new item: its type, the issue it belongs to, a title, a description, an author, a publication, a section and the URL of the uploaded image. The issue is identified by a numeric issue field in the body.

Because that identifier is client-controlled and the request is otherwise a normal authenticated action, changing it to another issue's ID is the obvious test. The researcher did exactly that, and the server accepted the write against the other issue.

Exploitation

Step 1: sign in and create an issue

Go to getrevue.co, sign in, click on Issues and then on Add new issue. This gives the attacker a legitimate issue of their own to work from.

Step 2: open the Media control

Go to the issue just created and, from the bottom of the page, click on Media. This is the UI that uploads an image and attaches it to the issue.

Step 3: intercept the upload

Turn on the intercepting proxy and upload an image. The proxy captures the request that the Media control sends.

Step 4: change the issue ID

In the captured request, change the ID to the issue ID of the other account. The request as shown in the report is:

HTTP
POST /app/items HTTP/1.1
Host: www.getrevue.co
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:85.0) Gecko/20100101 Firefox/85.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
Referer: https://www.getrevue.co/app/issues/current
X-CSRF-Token: [redacted]
Content-Type: application/json
X-Requested-With: XMLHttpRequest
Content-Length: 519
Origin: https://www.getrevue.co
Connection: close
Cookie: [YOUR_COOKIE]

{"item_type":"image","issue":347976,"id":null,"title":"Your account has been hacked","url":"","description":"Your account has been hacked","author":"Your account has been hacked","publication":"Your account has been hacked","section":"Your account has been hacked","image":"https://revue-direct-production.s3.amazonaws.com/cache/[redacted]/[redacted].png","image_file_name":"","created_at":"","tweet_handle":"","tweet_profile_image":"","tweet_description":"","tweet_lang":""}

The important parts of the body:

  • item_type is image, so the server treats the request as adding an image item.
  • issue is the target issue identifier. In the proof of concept it is 347976, the other account's issue; this is the value the attacker changes.
  • id is null, meaning a new item is being created rather than an existing one updated.
  • title, description, author, publication and section are all attacker-supplied strings. In the proof of concept every one of them is set to Your account has been hacked, which shows that the attacker controls the text displayed on the victim's issue, not just the image.
  • image points at an image already uploaded to the product's S3 bucket, so the attacker can choose the picture as well.

The request is authenticated with the attacker's own session cookie and carries the attacker's CSRF token, so nothing about the request is forged: it is a legitimate, authorised action aimed at an object the attacker does not own.

Step 5: observe the result

The report includes a proof-of-concept video showing the attack.

Root cause

The endpoint POST /app/items takes the owning issue from the request body (issue) and creates the item against it without verifying that the authenticated user owns that issue. Authorisation is effectively delegated to the client: the UI only ever sends the caller's own issue ID, and the server trusts that value.

CSRF protection does not help here. The request carries a valid X-CSRF-Token and the attacker's own cookie, so it passes every check that is meant to stop cross-site forgery. The missing control is an object-level authorisation check, comparing the issue in the body against the issues owned by the session user. The report does not describe the server-side code, so the exact implementation is not known; the behaviour is consistent with a missing ownership check on the referenced issue.

Impact

As the researcher states, an attacker can add arbitrary images, descriptions and titles to other people's issues, and it is possible to hijack other people's issues. The write is performed with the attacker's own authenticated session, so any account that can create an issue and reach the Media control can target any issue whose ID it knows or can guess. The report does not describe how issue IDs are discovered, and it does not state whether the victim is notified or whether the injected content is visible publicly before the issue is sent.

Fix

The control that is missing, and that should be enforced server-side, is an ownership check: on POST /app/items, resolve the issue from the body and confirm that it belongs to the authenticated user before creating the item, rejecting the request otherwise. The same check should apply to any other field in the body that references an object, such as publication and section, rather than trusting the client to send only its own values.

Variants to test

  1. Change the referenced object on create endpoints. Take any request that creates a child object (comment, attachment, item, note) and swap the parent ID for one belonging to another account. A positive result is the child object appearing under the victim's parent.
  2. Change the referenced object on update endpoints. Where the body contains both an object id and a parent reference, try setting id to null (create) against a foreign parent, and try updating an existing foreign child by its ID. A positive result is a successful write reflected in the victim's view.
  3. Test the free-text fields, not just the file. Set title, description, author and similar fields to distinctive values. A positive result is those strings rendering on the victim's object, which demonstrates content injection rather than only media attachment.
  4. Reuse an already-uploaded asset URL. Point the image field at an asset you uploaded elsewhere. A positive result is the image rendering on the victim's object, showing the attacker controls the picture as well as the text.
  5. Check whether the CSRF token is tied to the object. Send the request with your own valid token and cookie against a foreign object. A positive result confirms that CSRF protection is orthogonal to the missing authorisation check.

Hunting notes

This class of bug tends to sit in endpoints that create or modify child objects and take the parent identifier from the request body rather than from the URL or the session. Media upload, attachment, comment and item-creation endpoints are common places, especially in products where the UI only ever sends the caller's own IDs, so the missing check is never exercised by normal use.

A useful signal during recon is a JSON create request whose body contains a numeric parent reference alongside id: null. That shape suggests the server is trusting the client for the relationship. Intercepting the request and substituting a second account's identifier is then a quick test.

The researcher set the title, description, author, publication and section fields to attacker-controlled text in the request, which supports the claim of issue hijacking.

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. 13 min read.

What happened, in plain words

Revue (getrevue.co) was a service for writing and sending newsletters. Inside it, a user creates an issue, which is one edition of a newsletter, and can attach media to that issue: an image, plus a title and a description for it.

The researcher found that when the browser sends the request that attaches an image to an issue, the request contains the number (the ID) of the issue it is being attached to. That number is chosen by the browser, not by the server. The server took the number at face value and attached the image to whatever issue it pointed at, without checking that the person sending the request actually owned that issue.

This kind of bug is called an Insecure Direct Object Reference, or IDOR. The everyday comparison: imagine a cloakroom where you hand in a ticket with a number on it and get your coat back. If the attendant never checks that the ticket is yours, you can write someone else's number on a scrap of paper and walk away with their coat. Here the "number" is the issue ID and the "coat" is someone else's newsletter edition.

Because the same request also carries a title, a description, an author, a publication and a section, the attacker does not only get to add a picture. They get to write text onto another person's issue. In the proof of concept every one of those text fields is set to Your account has been hacked, which is why the researcher describes the outcome as being able to hijack other people's issues.

The product and the feature

Revue is a newsletter publishing product. A user signs in to a web application, creates an issue (a newsletter edition), and edits it. At the bottom of an issue page there is a Media control. Clicking it lets the user upload an image and give that image a title and a description. The image is stored on the product's file storage (an Amazon S3 bucket, which is simply a place on the internet where files are kept), and the browser then tells the application about the new item.

That "telling the application" happens through an API: a way for a browser to talk to a server by sending structured messages rather than asking for a web page. The message here is a JSON body, which is a text format for data made of field names and values, for example "issue":347976.

The pieces you need to understand first

  • Request: the message your browser sends to a server. It has a first line (the method, such as POST, and the path, such as /app/items), a set of headers (extra information such as what browser you use), and usually a body (the data being sent).
  • POST: the method used when you are sending data to the server to create or change something, as opposed to GET, which just asks for a page or data.
  • Cookie: a small piece of text the server gives your browser after you sign in, and which your browser sends back on every later request. It is how the server recognises that the request comes from your logged-in session. If someone else had your cookie, they could act as you.
  • Session: the server-side record of "this browser is signed in as this user". The cookie is the key to that record.
  • CSRF token: Cross-Site Request Forgery is an attack where a different website quietly makes your browser send a request to a site you are signed in to. To stop it, sites include a secret, random value (the CSRF token) in each form or request, which the other website cannot know. Here the token appears in the X-CSRF-Token header.
  • Intercepting proxy: a tool that sits between your browser and the server. You switch it on, do something in the browser, and the tool pauses the outgoing request so you can read it and edit it before it is sent. This is how the researcher changed the issue ID.
  • IDOR: as above, a bug where the server accepts an identifier supplied by the client and acts on the object it names without checking that the client is allowed to touch that object.
  • Authorisation: deciding whether a signed-in user is allowed to do a particular thing to a particular object. It is different from authentication, which is only about proving who you are.

Setting up

To reproduce the issue, the researcher needed three things:

  1. A signed-in account on getrevue.co.
  2. A second account, or at least a second issue whose ID is known, to play the part of the victim.
  3. An intercepting proxy to capture and modify the request that uploads media to an issue.

The captured request shown in the report was sent from Firefox 85 on macOS 10.15, with the browser's own headers, including an X-CSRF-Token and the session cookie.

Finding it

The feature being tested is the Media control at the bottom of an issue page. When an image is uploaded there, the browser sends a JSON request to /app/items describing the new item: its type, the issue it belongs to, a title, a description, an author, a publication, a section, and the URL of the uploaded image. The issue is identified by a numeric issue field in the body.

Because that identifier comes from the client, and the request is otherwise a normal signed-in action, changing it to another issue's ID is the obvious thing to try. The researcher did exactly that, and the server accepted the write against the other issue.

Exploitation, step by step

Step 1: sign in and create an issue

Go to getrevue.co, sign in, click on Issues and then on Add new issue. This gives the attacker a legitimate issue of their own to work from. Having your own issue matters because it lets you see the normal request the application sends, so you know what a valid one looks like before you change anything.

Step 2: open the Media control

Go to the issue you just created and, from the bottom of the page, click on Media. This is the part of the page that uploads an image and attaches it to the issue. You use it normally first, so that the browser produces the request you want to inspect.

Step 3: intercept the upload

Turn on the intercepting proxy and upload an image. The proxy captures the request that the Media control sends, and holds it so you can edit it before it reaches the server.

Step 4: change the issue ID

In the captured request, change the ID to the issue ID of the other account. The request as shown in the report is:

HTTP
POST /app/items HTTP/1.1
Host: www.getrevue.co
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:85.0) Gecko/20100101 Firefox/85.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
Referer: https://www.getrevue.co/app/issues/current
X-CSRF-Token: [redacted]
Content-Type: application/json
X-Requested-With: XMLHttpRequest
Content-Length: 519
Origin: https://www.getrevue.co
Connection: close
Cookie: [YOUR_COOKIE]

{"item_type":"image","issue":347976,"id":null,"title":"Your account has been hacked","url":"","description":"Your account has been hacked","author":"Your account has been hacked","publication":"Your account has been hacked","section":"Your account has been hacked","image":"https://revue-direct-production.s3.amazonaws.com/cache/[redacted]/[redacted].png","image_file_name":"","created_at":"","tweet_handle":"","tweet_profile_image":"","tweet_description":"","tweet_lang":""}

Line by line, in plain words:

  • POST /app/items HTTP/1.1: send data to the path /app/items, using version 1.1 of the HTTP protocol (the language browsers and servers use to talk).
  • Host: www.getrevue.co: the site the request is addressed to.
  • User-Agent: ...Firefox/85.0: which browser and operating system produced the request. This is just the browser identifying itself.
  • Accept: application/json, text/javascript, */*; q=0.01: the kinds of response the browser is willing to accept, with a preference for JSON.
  • Accept-Language: ...: the languages the user prefers, with quality values (q=) ranking them.
  • Accept-Encoding: gzip, deflate: the browser can accept compressed responses.
  • Referer: https://www.getrevue.co/app/issues/current: the page the request was made from.
  • X-CSRF-Token: [redacted]: the secret anti-forgery value described above. It is tied to the attacker's own session, and it is valid, which is the point: this is not a forged request.
  • Content-Type: application/json: the body is JSON.
  • X-Requested-With: XMLHttpRequest: a marker many applications use to tell that the request came from their own JavaScript rather than from typing a URL.
  • Content-Length: 519: the size of the body in bytes.
  • Origin: https://www.getrevue.co: which site the request originates from.
  • Connection: close: close the network connection after this request.
  • Cookie: [YOUR_COOKIE]: the attacker's own session cookie, which is what makes the server treat the request as coming from a signed-in user.

The body is one JSON object. Its fields:

  • item_type is image, so the server treats the request as adding an image item.
  • issue is the target issue identifier. In the proof of concept it is 347976, the other account's issue. This is the value the attacker changes.
  • id is null, meaning a new item is being created rather than an existing one being updated.
  • title, description, author, publication and section are all strings supplied by the attacker. In the proof of concept every one of them is set to Your account has been hacked, which shows the attacker controls the text displayed on the victim's issue, not just the image.
  • image points at an image already uploaded to the product's S3 bucket, so the attacker can choose the picture as well.
  • The remaining fields (url, image_file_name, created_at, tweet_handle, tweet_profile_image, tweet_description, tweet_lang) are sent empty in this request.

The request is authenticated with the attacker's own session cookie and carries the attacker's own CSRF token, so nothing about it is forged. It is a legitimate, authorised action aimed at an object the attacker does not own. That is the whole trick: the request passes every check that asks "is this really you?", and fails only the check that should ask "is this object really yours?".

Step 5: observe the result

The report includes a proof-of-concept video showing the attack.

Why it works

The endpoint POST /app/items takes the owning issue from the request body (the issue field) and creates the item against it without verifying that the signed-in user owns that issue. Authorisation is effectively handed to the client: the normal web page only ever sends the caller's own issue ID, and the server trusts whatever value arrives.

CSRF protection does not help here. The request carries a valid X-CSRF-Token and the attacker's own cookie, so it passes every check meant to stop cross-site forgery. The missing control is an object-level authorisation check: compare the issue in the body against the issues owned by the session user. The report does not describe the server-side code, so the exact implementation is not known; the behaviour is consistent with a missing ownership check on the referenced issue.

Impact

As the researcher states, an attacker can add arbitrary images, descriptions and titles to other people's issues, and it is possible to hijack other people's issues. The write is performed with the attacker's own signed-in session, so any account that can create an issue and reach the Media control can target any issue whose ID it knows or can guess. The report does not describe how issue IDs are discovered, and it does not state whether the victim is notified or whether the injected content is visible publicly before the issue is sent.

Fix

The control that is missing, and that should be enforced on the server, is an ownership check: on POST /app/items, look up the issue from the body and confirm that it belongs to the signed-in user before creating the item, rejecting the request otherwise. The same check should apply to any other field in the body that refers to an object, such as publication and section, rather than trusting the client to send only its own values.

Variants to test

  1. Change the referenced object on create endpoints. Take any request that creates a child object (comment, attachment, item, note) and swap the parent ID for one belonging to another account. A positive result is the child object appearing under the victim's parent.
  2. Change the referenced object on update endpoints. Where the body contains both an object id and a parent reference, try setting id to null (create) against a foreign parent, and try updating an existing foreign child by its ID. A positive result is a successful write reflected in the victim's view.
  3. Test the free-text fields, not just the file. Set title, description, author and similar fields to distinctive values. A positive result is those strings rendering on the victim's object, which demonstrates content injection rather than only media attachment.
  4. Reuse an already-uploaded asset URL. Point the image field at an asset you uploaded elsewhere. A positive result is the image rendering on the victim's object, showing the attacker controls the picture as well as the text.
  5. Check whether the CSRF token is tied to the object. Send the request with your own valid token and cookie against a foreign object. A positive result confirms that CSRF protection is separate from the missing authorisation check.

Hunting notes

This class of bug tends to sit in endpoints that create or modify child objects and take the parent identifier from the request body rather than from the URL or the session. Media upload, attachment, comment and item-creation endpoints are common places, especially in products where the web page only ever sends the caller's own IDs, so the missing check is never exercised by normal use.

A useful signal while exploring a target is a JSON create request whose body contains a numeric parent reference alongside id: null. That shape suggests the server is trusting the client for the relationship. Intercepting the request and substituting a second account's identifier is then a quick test.

The researcher set the title, description, author, publication and section fields to attacker-controlled text in the request, which supports the claim of issue hijacking.

Glossary

  • API: a way for software to talk to a server by sending structured messages, rather than asking for web pages.
  • Authentication: proving who you are, usually by signing in.
  • Body: the data part of a request, separate from the headers.
  • Cookie: a small piece of text stored by your browser and sent back to a site on each request, used here to keep you signed in.
  • CSRF (Cross-Site Request Forgery): an attack where another website makes your browser send a request to a site you are signed in to.
  • CSRF token: a secret random value included in a request so that another website cannot forge it.
  • Endpoint: a specific address and method on a server that performs an action, such as POST /app/items.
  • Header: extra information attached to a request or response, such as the browser type or a cookie.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • IDOR (Insecure Direct Object Reference): a bug where the server acts on an object named by an identifier supplied by the client, without checking the client is allowed to touch that object.
  • Intercepting proxy: a tool that pauses requests between your browser and the server so you can read and edit them.
  • Issue: in Revue, one edition of a newsletter.
  • JSON: a text format for data made of field names and values.
  • POST: the HTTP method used to send data to the server to create or change something.
  • Request: the message a browser sends to a server.
  • S3 bucket: a storage location on Amazon's cloud where files such as images are kept.
  • Session: the server-side record that a particular browser is signed in as a particular user.
  • 2xx: the family of HTTP status codes meaning the request succeeded.

More by mirhat

View all

2 more disclosed reports, best first.

More from X / xAI

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.