Skip to content
Access control Disclosed report Beginner

Add signature to transactions without any permission

An endpoint for uploading transaction signature files did not check whether the user had permission to access orders or transactions. Any authenticated user could attach a file, including an SVG containing script, to any order transaction by supplying its identifier.

supernatural Follow

Originally disclosed on HackerOne

Bounty$500 View original
  • Triaged in 2 hours
  • Fixed in 5 days
  • Paid in 7 days
  • Disclosed after 8 days

Hi,

I found an endpoint for transaction signing but user permission not checked on this endpoint So an user without any permission in shop can add signature to transactions!

Endpoint: /admin/secure_files.json Parameters:

{"secure_file":{"filetype":"svg","content":"PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBiYXNlUHJvZmlsZT0iZnVsbCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gIA0KICAgPHNjcmlwdCB0eXBlPSJ0ZXh0L2phdmFzY3JpcHQiPg0KICAgICAgYWxlcnQoZG9jdW1lbnQuZG9tYWluKTsNCiAgIDwvc2NyaXB0Pg0KPC9zdmc+","type":"signatures","order_transaction_id":"__Transaction_ID__"}}

Just fill __Transaction_ID__ in order_transaction_id and send request as user without permission Response will be like this

{
  "secure_file": {
    "url": "https://shopify.s3.amazonaws.com/s/files/1/0917/1436/signatures/2e990586-6721-448a-a891-025471d6b2fe.svg?AWSAccessKeyId=AKIAJYM555KVYEWGJDKQ&Expires=1475694450&Signature=DmF7008ou7nn22ypD5Iyq%2BKomMQ%3D"
  }
}

when you back to order page or /admin/orders/_order_id_/transaction.json signature file will be shown!

This should be limited to users who have access to transaction/order section!

Regards

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

Context

Shopify's admin interface includes an order management section where staff can view orders and their transactions. Part of that workflow involves attaching files to transactions, and the platform exposes an endpoint at /admin/secure_files.json that accepts a file upload and returns a URL for the stored file. Among the accepted file types is signatures, which is how a signature image gets associated with a particular order transaction.

The report describes a permission problem on that endpoint: the transaction signing functionality could be reached by a user who holds no permissions in the shop at all.

Setup

The researcher's precondition is a user account inside a shop that has no permissions granted. No specific tools, versions or configuration details are given in the report. The only requirement stated is that the attacker is a user without any permission in the shop.

Finding it

The researcher identified an endpoint used for transaction signing and observed that user permission was not checked on it. The consequence, as stated in the report, is that a user without any permission in the shop can add a signature to transactions. The endpoint and its parameters are:

Text
Endpoint: `/admin/secure_files.json`
Parameters:

Exploitation

Step 1: Send the signing request with a chosen transaction ID

The request body takes a secure_file object with a filetype of svg, a base64-encoded content, a type of signatures, and the target order_transaction_id. The researcher's payload is:

Text
{"secure_file":{"filetype":"svg","content":"[redacted]/[redacted]+","type":"signatures","order_transaction_id":"__Transaction_ID__"}}

The only value the attacker needs to supply is the transaction identifier: fill __Transaction_ID__ in order_transaction_id and send the request as a user without permission. The content field carries a base64-encoded SVG document, and filetype declares it as svg.

Step 2: Read the response

The response returns the stored file's URL:

Text
{
  "secure_file": {
    "url": "https://shopify.s3.amazonaws.com/s/files/1/0917/1436/signatures/2e990586-6721-448a-a891-025471d6b2fe.svg?AWSAccessKeyId=[redacted]&Expires=1475694450&[redacted]"
  }
}

The URL points at the signatures path in the shop's S3 storage and is a pre-signed link with an access key, an expiry and a signature. The upload succeeded even though the requesting user had no permissions.

Step 3: Observe the signature on the order

When you go back to the order page, or to /admin/orders/_order_id_/transaction.json, the signature file is shown. The uploaded file is therefore attached to the transaction and displayed in the normal order and transaction views.

Root cause

The endpoint performs the file upload and the association with the transaction without checking whether the requesting user is authorised for the transaction or order section. The report frames this as a missing permission check on the endpoint rather than a flaw in the upload mechanism itself: the request is accepted and the file is stored and linked regardless of the caller's role. The report does not describe the server-side code, so the exact location of the missing check is not stated.

Impact

A user with no permissions in a shop can add a signature to a transaction by supplying its ID, and that signature then appears on the order page and in the transaction JSON. The report does not describe what a signature is used for beyond being attached to a transaction, so the practical consequences beyond unauthorised modification of transaction records are not spelled out. The researcher's own framing is that the capability should be limited to users who have access to the transaction or order section.

Fix

The recommendation it gives is that the functionality should be limited to users who have access to the transaction/order section, which means enforcing that authorisation check on /admin/secure_files.json before the file is stored and linked to the transaction.

Variants to test

  1. Other file types on the same endpoint: submit the same secure_file structure with a different filetype or type value and see whether the upload is still accepted for a user without permissions. A positive result is a returned url and the file appearing in the corresponding admin view.
  2. Other object identifiers: replace order_transaction_id with identifiers for other records and check whether the file is attached to them. A positive result is the file showing up on a record the user has no access to.
  3. Read paths alongside write paths: request /admin/orders/_order_id_/transaction.json as the same unprivileged user and see whether transaction data is returned. A positive result is transaction content being disclosed to a user without order access.
  4. Similar upload endpoints elsewhere in the admin: look for other JSON endpoints that accept a file object and return a storage URL, and test them with an unprivileged account. A positive result is a stored file and a URL where the user should have been refused.

Hunting notes

This kind of bug tends to sit on endpoints that combine two operations, here storing a file and linking it to a business object, where the authorisation check is applied to one operation and forgotten for the other. During recon, admin JSON endpoints that accept structured bodies and return storage URLs are worth enumerating, particularly ones whose names suggest a shared service (secure_files) rather than a specific resource. The signal is an endpoint that accepts an object identifier belonging to a section the test account cannot access.

The report shows the request sent as a user without permission, the returned pre-signed URL, and the signature file appearing on the order page and in the transaction JSON. That chain, from an unprivileged account to a visible change in the order view, is what makes the missing check concrete rather than theoretical.

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

What happened, in plain words

Shopify is a platform that shops use to run their online stores. Behind the shop there is an admin area, a private website where the shop's staff log in to manage things: products, customers, orders and payments. Different staff members get different levels of access. A shop owner can decide that one employee may only look at orders, another may edit products, and a third may do almost nothing. These levels of access are called permissions.

One part of the admin area deals with orders. An order is a record of something a customer bought. Inside an order there are transactions, which record the money movements: a charge, a refund and so on. Part of the order workflow lets staff attach files to a transaction, and one kind of file is a signature, an image that gets associated with a particular transaction.

The researcher found that the part of the system that stores these signature files did not check whether the person sending the request was allowed to do so. Someone with an account in the shop that had no permissions at all could still add a signature to a transaction. The signature then appeared on the order page.

This kind of mistake is called a missing authorisation check, or a broken access control problem. Authorisation means deciding whether a logged-in user is allowed to perform a particular action. Authentication is the earlier step: proving who you are with a username and password. A system can authenticate someone correctly and still fail to authorise them, which is exactly what happened here: the user was recognised as a real account, but nobody asked whether that account was allowed to touch transactions.

An everyday comparison: imagine a hotel where the front desk checks your key card at the entrance, so only guests get in. But the door to the storage room has no lock at all, so any guest, even one who booked the cheapest room, can walk in and leave things there. The entrance check works; the check on the storage room is simply missing.

Context

Shopify's admin interface includes an order management section where staff can view orders and their transactions. Part of that workflow involves attaching files to transactions, and the platform exposes an endpoint at /admin/secure_files.json that accepts a file upload and returns a URL for the stored file. Among the accepted file types is signatures, which is how a signature image gets associated with a particular order transaction.

A few of those words need unpacking for a reader who has never worked with web software.

An endpoint is a specific address on a web server that accepts a particular kind of request. When you type a web address into your browser you are asking a server for a page; an endpoint is the same idea, but aimed at software rather than a person. The /admin/... part of the address tells you it lives inside the admin area, the private part of the site.

The .json ending refers to JSON, a text format for structured data. It looks a bit like a form filled in with labels and values, using curly brackets and colons. Software uses it to send and receive information in a way both sides can read reliably. When a browser or a tool sends a request to an endpoint, it can include a body, which is the data being submitted, and the server replies with a response, which is the data coming back.

An API is the general name for this arrangement: one piece of software talking to another over the web, exchanging requests and responses, rather than a human clicking through pages. The admin interface you see in a browser is itself built on top of these API endpoints, so anything the browser can do, a person with the right tools can also do directly.

A URL is simply a web address. The response in this report contains a URL that points at a file stored on Amazon S3, which is a cloud file storage service. Shopify keeps uploaded files there and hands back a link so the browser can fetch them.

The report describes a permission problem on that endpoint: the transaction signing functionality could be reached by a user who holds no permissions in the shop at all.

Setup

The researcher's precondition is a user account inside a shop that has no permissions granted. No specific tools, versions or configuration details are given in the report. The only requirement stated is that the attacker is a user without any permission in the shop.

In plain terms: to reproduce this you would need to be able to log in to a Shopify shop's admin area with an account that the shop owner has given no rights to. Such an account can sign in, but by design it should be able to do nothing useful. The whole point of the test is to see whether the system actually enforces that.

Finding it

The researcher identified an endpoint used for transaction signing and observed that user permission was not checked on it. The consequence, as stated in the report, is that a user without any permission in the shop can add a signature to transactions. The endpoint and its parameters are:

Text
Endpoint: `/admin/secure_files.json`
Parameters:

This block is not code to run; it is a label. It names the address being targeted, /admin/secure_files.json, and announces that the next block lists the parameters, meaning the pieces of data the endpoint expects to receive. Reading it tells you where the request goes and that the interesting part is what you send to it.

How would someone find this? By watching what the admin interface does when a normal, fully permitted member of staff attaches a signature to a transaction. Browsers have developer tools, built into every major browser, that show every request the page makes in the background. Seeing a request to secure_files.json carrying a transaction identifier and a file is the clue. The natural next question is: what happens if the same request is sent by an account that is not allowed to do this? That question is the heart of the finding.

Exploitation

Exploitation here means actually carrying out the action to prove it works, rather than just suspecting it might. The report shows the request, the response and where the signature appears.

Step 1: Send the signing request with a chosen transaction ID

The request body takes a secure_file object with a filetype of svg, a base64-encoded content, a type of signatures, and the target order_transaction_id. The researcher's payload is:

Text
{"secure_file":{"filetype":"svg","content":"[redacted]/[redacted]+","type":"signatures","order_transaction_id":"__Transaction_ID__"}}

This is the data sent to the endpoint. Going through it piece by piece:

  1. The outermost curly brackets hold one object, a bundle of labelled values. The label is secure_file, and everything inside the inner brackets belongs to it. The name suggests a file that the system treats as protected.
  2. "filetype":"svg" says what kind of file this is. SVG stands for Scalable Vector Graphics, an image format that is written as text rather than as a grid of pixels. Because it is text, it can be pasted into a request like this one.
  3. "content" holds the file itself, encoded in base64. Base64 is a way of turning arbitrary bytes into ordinary letters, digits and a few symbols so they can travel safely inside text-based formats like JSON. The long string of characters is the image, written in that alphabet. Decoded, it is an SVG document, and the report shows that the document contains a small script that calls alert(document.domain), a line that would make a browser pop up a box showing the site's domain name.
  4. "type":"signatures" tells the system which category of file this is. It is the value that makes the platform treat the upload as a transaction signature rather than some other kind of attachment.
  5. "order_transaction_id":"__Transaction_ID__" is the target. Every transaction has an identifier, a unique string that names it. The placeholder __Transaction_ID__ is where the real identifier goes.

The only value the attacker needs to supply is the transaction identifier: fill __Transaction_ID__ in order_transaction_id and send the request as a user without permission. The content field carries a base64-encoded SVG document, and filetype declares it as svg.

Why send it this way rather than clicking through the interface? Because the interface would hide the button from a user without permissions, or refuse to show the page. Sending the request directly skips the interface entirely and asks the server the real question: do you check permissions yourself, or did you rely on the interface to hide the option? A server that relies on the interface is like a shop that puts the till behind a curtain instead of locking it.

Step 2: Read the response

The response returns the stored file's URL:

Text
{
  "secure_file": {
    "url": "https://shopify.s3.amazonaws.com/s/files/1/0917/1436/signatures/2e990586-6721-448a-a891-025471d6b2fe.svg?AWSAccessKeyId=[redacted]&Expires=1475694450&[redacted]"
  }
}

Again, line by line:

  1. The response is a JSON object with a single label, secure_file, matching the name used in the request.
  2. Inside it is a url, the web address where the uploaded file now lives. The address points at shopify.s3.amazonaws.com, the cloud storage service, under a path containing signatures and a long random-looking filename ending in .svg.
  3. After the question mark come extra pieces of information, called query parameters, separated by &. AWSAccessKeyId identifies which access key was used, Expires is a timestamp after which the link stops working, and Signature is a cryptographic value that proves the link was generated by someone holding the right secret. Together these make a pre-signed URL: a link that grants temporary access to a private file without the visitor needing to log in to the storage service. The access key and signature values are credentials, so they are redacted here.

The URL points at the signatures path in the shop's S3 storage and is a pre-signed link with an access key, an expiry and a signature. The upload succeeded even though the requesting user had no permissions. That success is the proof: a refusal would have come back as an error, and no URL would have been returned.

Step 3: Observe the signature on the order

When you go back to the order page, or to /admin/orders/_order_id_/transaction.json, the signature file is shown. The uploaded file is therefore attached to the transaction and displayed in the normal order and transaction views.

The second address is another endpoint. _order_id_ is a placeholder for the order's identifier, the same idea as the transaction identifier in step 1. Requesting it returns the transaction information for that order in JSON form. Seeing the signature there matters because it shows the file was not merely stored somewhere harmless: it was linked to the transaction and now appears wherever staff look at that transaction. The signature is shown on the order page and in the transaction JSON.

Root cause

The endpoint performs the file upload and the association with the transaction without checking whether the requesting user is authorised for the transaction or order section. The report frames this as a missing permission check on the endpoint rather than a flaw in the upload mechanism itself: the request is accepted and the file is stored and linked regardless of the caller's role. The report does not describe the server-side code, so the exact location of the missing check is not stated.

In beginner terms: the server did two jobs in one request. First it saved the file. Second it attached that file to a specific transaction. Somewhere in that sequence it should have paused and asked "is this user allowed to touch this transaction?" It did not. The upload machinery itself worked as designed; the gate in front of it was absent.

Impact

A user with no permissions in a shop can add a signature to any transaction whose ID they know, and that signature then appears on the order page and in the transaction JSON. The report does not describe what a signature is used for beyond being attached to a transaction, so the practical consequences beyond unauthorised modification of transaction records are not spelled out. The researcher's own framing is that the capability should be limited to users who have access to the transaction or order section.

Why does this matter even though it is only a file? Because records like orders and transactions are meant to be trustworthy. If a signature can be attached by someone who was never granted the right to do so, the record no longer reflects only what authorised staff did. The person needs to know a transaction identifier to target a specific transaction.

Fix

The recommendation it gives is that the functionality should be limited to users who have access to the transaction/order section, which means enforcing that authorisation check on /admin/secure_files.json before the file is stored and linked to the transaction.

Put simply: before doing any work, the server should look at who is asking and confirm that this account has been granted access to the order and transaction area. If not, it should refuse, and nothing should be saved or linked. The check belongs on the server, because anything the browser does can be bypassed by sending the request directly, which is exactly what this report demonstrates.

Variants to test

Once you understand the shape of a bug like this, you can look for neighbours of it. Each variant below is a way of asking the same question in a slightly different place.

  1. Other file types on the same endpoint: submit the same secure_file structure with a different filetype or type value and see whether the upload is still accepted for a user without permissions. A positive result is a returned url and the file appearing in the corresponding admin view. The reasoning: if the permission check is missing for signatures, it may be missing for every category the endpoint handles.
  2. Other object identifiers: replace order_transaction_id with identifiers for other records and check whether the file is attached to them. A positive result is the file showing up on a record the user has no access to. The reasoning: the flaw may not be specific to transactions; it may be that the endpoint never checks ownership of whatever it is pointed at.
  3. Read paths alongside write paths: request /admin/orders/_order_id_/transaction.json as the same unprivileged user and see whether transaction data is returned. A positive result is transaction content being disclosed to a user without order access. The reasoning: a system that forgets to check permission when writing may also forget when reading, and reading leaks information rather than changing it.
  4. Similar upload endpoints elsewhere in the admin: look for other JSON endpoints that accept a file object and return a storage URL, and test them with an unprivileged account. A positive result is a stored file and a URL where the user should have been refused. The reasoning: the same developer mistake tends to repeat across features built at the same time.

Hunting notes

This kind of bug tends to sit on endpoints that combine two operations, here storing a file and linking it to a business object, where the authorisation check is applied to one operation and forgotten for the other. During recon, admin JSON endpoints that accept structured bodies and return storage URLs are worth enumerating, particularly ones whose names suggest a shared service (secure_files) rather than a specific resource. The signal is an endpoint that accepts an object identifier belonging to a section the test account cannot access.

Recon means the exploratory phase of testing, where you map out what a system contains before trying to break anything: which addresses exist, what they accept, what they return. Enumerating means listing those addresses systematically rather than guessing at random. The hint here is that a name like secure_files sounds like a general-purpose service used by many features, and general-purpose services are where a single missing check can affect many things at once.

The researcher demonstrated impact by performing the action end to end with an account that had no permissions: the request succeeded, the response contained a valid pre-signed URL, and the uploaded file was visible on the order page and in the transaction JSON. That chain, from an unprivileged account to a visible change in the order view, is what makes the missing check concrete rather than theoretical. A report that stops at "this looks unprotected" is a guess; a report that shows the file appearing on the order page is evidence.

Glossary

  • Admin interface: the private part of a website where staff log in to manage the shop, as opposed to the public shop that customers see.
  • API: the way one piece of software asks another for something over the web, by sending requests and receiving responses.
  • Authentication: proving who you are, usually with a username and password.
  • Authorisation: deciding whether a user who is already identified is allowed to perform a particular action.
  • Base64: an encoding that turns arbitrary bytes into ordinary text characters so they can be carried inside formats like JSON.
  • Body: the part of a request that carries the data being submitted.
  • Endpoint: a specific address on a server that accepts a particular kind of request.
  • Enumerating: listing things systematically, for example all the endpoints a site exposes.
  • Identifier: a unique value that names a particular record, such as one transaction.
  • JSON: a text format for structured data, built from labels, values, curly brackets and square brackets.
  • Missing authorisation check: a flaw where the system performs an action without confirming the user is permitted to do it.
  • Order: a record of what a customer bought.
  • Parameter: a named piece of data sent with a request.
  • Payload: the data an attacker sends in a request to achieve an effect.
  • Permissions: the rights a shop owner grants to a staff account, determining what it may do.
  • Pre-signed URL: a web address that grants temporary access to a private file, carrying an access key, an expiry time and a signature.
  • Query parameters: the extra values after a question mark in a URL, separated by &.
  • Recon: the exploratory phase of testing, mapping out what a system contains before attacking it.
  • Request: a message sent to a server asking it to do something or return something.
  • Response: the message a server sends back.
  • S3: Amazon's cloud file storage service, where uploaded files are kept.
  • Signature (file): in this report, an image file attached to an order transaction.
  • SVG: an image format written as text rather than pixels, which can include script.
  • Transaction: a record inside an order of a money movement, such as a charge or a refund.
  • URL: a web address.

More by supernatural

View all

12 more disclosed reports, best first.

More from Shopify

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.