Skip to content
Access control Disclosed report Beginner

Unrestricted access to any "connected pack" on docs

The endpoint for adding a pack to a document did not restrict which pack IDs could be installed, so a user could change the pack ID to install any free, pro, or disabled pack. This let an attacker use paid functionality without paying.

0xcrypto Follow

Originally disclosed on HackerOne

Medium 4.3 View original
  • Triaged in 5 days
  • Fixed in 45 days
  • Paid in 15 days
  • Disclosed after 3 months

Summary:

When adding a pack, a post request is sent to https://coda.io/internalAppApi/documents/[doc ID]/packs with data {"packId":[pack Id]} where doc ID is the id of doc user wishes to add pack and pack ID is the pack user wants to install. But this request is unrestricted and the user can iterate over packId to get any free/pro/disabled pack.

Steps To Reproduce:

  1. Capture the post request while installing any pack using a proxy like Burp when you are logged in.
  2. Change packId to desired pack's ID. A valid packId gives a 200 status and invalid gives 400.

The below post request contains packId of Google Translate Pack which is a pro pack.

POST /internalAppApi/documents/F5Y1qJ3aw-/packs HTTP/1.1
Host: coda.io
Connection: close
Content-Length: 15
Accept: application/json
Origin: https://coda.io
X-Csrf-Token: InEwS0Z2U21xR09JUDI2Qkwi
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
Content-Type: application/json
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Referer: https://coda.io/d/Untitled_dF5Y1qJ3aw-/asdf_suTAx
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: /* Your Cookie */

{"packId":1063}

Sending the request should return a 200 OK. Check the doc, the pro pack is installed.

This doc created by [email protected] uses Google Translate pro pack without upgrading. Installing the pro pack gives a 14 days warning. I am not sure if it will expire and become read only.

Impact

Allows anyone to use paid functionality for free causing loss to business.

The original report as published on HackerOne, by 0xcrypto. 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

Coda is a document product reachable at https://coda.io. One of its features is packs: integrations that a document owner adds to a doc to extend what it can do. Packs come in tiers, and the report refers to free, pro and disabled packs. Adding a pack is a normal in-app action, so the browser sends an API request to the backend on the user's behalf.

The report looks at the endpoint that performs that installation and at whether the server checks that the requesting user is entitled to the pack being installed.

Setup

  • A logged-in Coda account, with a document the user can modify. The example document ID in the request is F5Y1qJ3aw-.
  • An intercepting proxy such as Burp, used to capture and replay the pack installation request.
  • No special role or privilege is described. The only precondition is being able to install a pack in a doc you control.

Finding it

While installing a pack, the researcher captured the request the front end sends. It is a POST to a per-document path:

Text
https://coda.io/internalAppApi/documents/[doc ID]/packs

with a JSON body of the form {"packId":[pack Id]}, where the doc ID identifies the document the pack is being added to and the pack ID identifies the pack. The observation was that the request is unrestricted: the server accepts whatever packId is supplied, so a user can iterate over pack IDs and install any free, pro or disabled pack, not just the ones they are entitled to.

Exploitation

Step 1: capture the installation request

With the proxy running and the user logged in, install any pack and capture the resulting POST request. The captured request below carries the packId of the Google Translate pack, which the report describes as a pro pack:

HTTP
POST /internalAppApi/documents/F5Y1qJ3aw-/packs HTTP/1.1
Host: coda.io
Connection: close
Content-Length: 15
Accept: application/json
Origin: https://coda.io
X-Csrf-Token: InEwS0Z2U21xR09JUDI2Qkwi
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
Content-Type: application/json
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Referer: https://coda.io/d/Untitled_dF5Y1qJ3aw-/asdf_suTAx
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: /* Your Cookie */

{"packId":1063}

The path embeds the target document ID (F5Y1qJ3aw-), which identifies the document the pack is added to.

  • X-Csrf-Token is present in the captured request.
  • The body {"packId":1063} selects which pack gets installed.
  • The Cookie header is the user's own session; the report shows a placeholder rather than a value.

Step 2: change the pack ID

Replace packId with the ID of the pack you want. The report states the behaviour of the endpoint directly: a valid pack ID returns a 200 status and an invalid one returns 400. A valid pack ID returns 200 and an invalid one returns 400.

Step 3: confirm the install

Send the modified request. It should return 200 OK. Then open the document and check that the pack is installed. In the example, the pro Google Translate pack is installed in the doc without an upgrade.

The researcher also created a document that uses the Google Translate pro pack without upgrading, and notes that installing the pro pack produces a 14 days warning. Whether the pack expires after that and the document becomes read only was not confirmed in the report.

Root cause

The endpoint accepts a client-supplied packId and installs the corresponding pack without checking that the caller is entitled to it. The endpoint installs the pack identified in the body without checking entitlement to it. This is an access control gap on a client-supplied pack ID.

Impact

Anyone with an account and a document they can edit can install paid packs for free, which the report frames as using paid functionality without paying and as a loss to the business. The report says the user can iterate over pack IDs to reach any free, pro or disabled pack. The report does not establish how long an installed pro pack keeps working: the 14 days warning is noted, and whether the pack then expires and the document becomes read only is left open.

Fix

The report does not describe a fix or a change made by the vendor. What the behaviour calls for is a server-side check, at the point the pack is installed, that the requesting user is entitled to that specific pack, rather than trusting the packId in the body.

Variants to test

  1. Other per-document object endpoints. Look for sibling routes under the same internal API prefix that take an object ID in the body, such as templates, integrations or add-ons. A positive result is a 200 for an object the account is not entitled to, with the object visibly active afterwards.
  2. Tier and state enumeration. Walk IDs and record which return 200 and which return 400, then map the 200s to free, pro and disabled items. A positive result is a disabled or paid item appearing in the document.
  3. Cross-document reuse. Take a captured install request from one document and replay it against another document ID you own. A positive result is the pack installing in the second document with the same body.
  4. Entitlement after downgrade. Install a paid pack, then remove the paid entitlement from the account and check whether the pack keeps working. A positive result is continued use after the entitlement is gone.

Hunting notes

This kind of bug hides in internal API routes that the front end calls for a specific UI action, especially ones whose path is scoped to a resource the user legitimately owns while the sensitive choice sits in the request body. During recon, watch for endpoints with an ID in the JSON body that maps to a catalogue of items with tiers or states, and for responses that distinguish valid from invalid IDs with different status codes, as 200 versus 400 does here. That difference is what makes enumeration cheap.

The impact case in this report is simple and concrete: a paid pack installed in a real document without an upgrade, plus a note on the 14 days warning and the open question of expiry. Showing the paid feature actually working in the document, rather than only a 200 response, is what turns an access control observation into an accepted report.

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

Coda is a website where people write documents, a bit like an online notebook. One of its features is called a pack: a small add-on you attach to a document so it can do more, for example translate text. Packs come in different levels. Some are free, some are pro (paid), and some are disabled (switched off).

When you add a pack to a document, your browser quietly sends a message to Coda's servers saying "please install this pack". The researcher found that this message does not check whether you are actually allowed to use the pack you asked for. You can simply change the pack number in the message to any other pack number, including a paid one, and the server installs it anyway. That means anyone with a normal account can install paid packs without upgrading.

This kind of mistake is called an access control problem: the system knows who you are, but it does not check whether you are allowed to do the thing you are asking for.

The pieces you need to understand first

Before the steps make sense, here are the ideas involved, explained from zero.

  • A document and its ID. Every Coda document has a unique code, a bit like a library shelf number. In the example, the document's code is F5Y1qJ3aw-. The code lets the server know which document you mean.
  • An API. An API is the private counter where your browser talks to the website's servers. You do not see it, but every button you press in a web app usually sends a request to an API behind the scenes. Think of it as a waiter taking your order to the kitchen: you say what you want, the waiter carries the message, the kitchen prepares it.
  • An endpoint. An endpoint is one specific address on that API, like one particular window at the counter. This report is about the endpoint that installs packs into a document.
  • A POST request. When your browser sends data to a server to create or change something, it usually uses a request type called POST. It is the difference between reading a page (a GET) and submitting a form (a POST).
  • A cookie. A cookie is a small piece of text your browser stores for a website and sends back with every request. It is how the site remembers that you are logged in. Think of it as the wristband you get at an event: show it and staff know you are allowed in.
  • A CSRF token. CSRF stands for Cross-Site Request Forgery, an attack where a different website tries to make your browser send a request to Coda without you meaning to. To stop this, Coda includes a special one-time-ish value called a CSRF token in requests that change things. The server checks the token to confirm the request really came from Coda's own pages.
  • A proxy such as Burp. A proxy is a tool that sits between your browser and the website and lets you look at, pause and edit the messages going back and forth. Burp Suite is a well-known tool for this. Think of it as a mail intercept service: you can open the envelope, read the letter, change a word and send it on.
  • A status code. When a server answers, it starts with a number. 200 means "OK, done". 400 means "Bad Request, something about what you sent is wrong". These numbers are how the researcher could tell a real pack number from a made-up one.
  • Enumerating IDs. If pack numbers are simple (1, 2, 3 and so on), you can try them one after another to discover which ones exist. That is called enumeration: walking through a list of possible values.
  • JSON. JSON is a simple text format for sending structured data, using curly brackets and quotes. The body {"packId":1063} is JSON: it says "the field called packId has the value 1063".

Setting up

To repeat what the researcher did, you need:

  1. A logged-in Coda account, with a document you are allowed to edit. The example uses the document ID F5Y1qJ3aw-.
  2. An intercepting proxy such as Burp, set up so your browser sends its traffic through it. This lets you capture and resend the pack installation request.

No special role or admin permission is needed. The only requirement is being able to install a pack in a document you control.

Finding it

While installing a pack normally, the researcher captured the request the browser sends. It is a POST to an address that includes the document ID:

Text
https://coda.io/internalAppApi/documents/[doc ID]/packs

This address means: "on Coda's internal app API, for the document with this ID, do something with packs". The [doc ID] part is replaced by the real document code.

The request also carries a small JSON body of the form {"packId":[pack Id]}. The document ID in the address says which document the pack goes into; the pack ID in the body says which pack it is.

The key observation: the server accepts whatever pack ID you put in the body. It does not check that you are entitled to that pack. So you can walk through pack IDs and install any free, pro or disabled pack, not only the ones your account should be allowed to use.

Exploitation

Step 1: capture the installation request

With the proxy running and you logged in, install any pack and capture the POST request that results. The captured request below carries the pack ID of the Google Translate pack, which the report describes as a pro pack:

HTTP
POST /internalAppApi/documents/F5Y1qJ3aw-/packs HTTP/1.1
Host: coda.io
Connection: close
Content-Length: 15
Accept: application/json
Origin: https://coda.io
X-Csrf-Token: InEwS0Z2U21xR09JUDI2Qkwi
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
Content-Type: application/json
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Referer: https://coda.io/d/Untitled_dF5Y1qJ3aw-/asdf_suTAx
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: /* Your Cookie */

{"packId":1063}

Line by line, in plain words:

  • POST /internalAppApi/documents/F5Y1qJ3aw-/packs HTTP/1.1: this is the request line. It says "send a POST to this path on the server, using version 1.1 of the HTTP protocol". The path contains the document ID F5Y1qJ3aw-, so the request is aimed at a document you can already edit.
  • Host: coda.io: the name of the server being contacted.
  • Connection: close: tells the server to close the connection after answering. A housekeeping detail.
  • Content-Length: 15: the size of the body in bytes, so the server knows how much data to read.
  • Accept: application/json: "please answer in JSON format".
  • Origin: https://coda.io: says which site the request came from. Here it is Coda itself, which is expected for a normal in-app action.
  • X-Csrf-Token: InEwS0Z2U21xR09JUDI2Qkwi: the anti-forgery token described earlier. It proves the request came from Coda's own pages. It does not carry any decision about whether you may use the pack.
  • User-Agent: ...: identifies the browser and operating system that sent the request. It is informational.
  • Content-Type: application/json: says the body is JSON, so the server knows how to read it.
  • Sec-Fetch-Site: same-origin: a browser-added hint that the request came from the same site.
  • Sec-Fetch-Mode: cors: another browser-added hint about the kind of request.
  • Referer: https://coda.io/d/Untitled_dF5Y1qJ3aw-/asdf_suTAx: the page you were on when the request was sent.
  • Accept-Encoding: gzip, deflate: tells the server it may compress the answer to save bandwidth.
  • Accept-Language: en-US,en;q=0.9: your language preference.
  • Cookie: /* Your Cookie */: your login cookie. The report shows a placeholder rather than a real value, because a real cookie would let anyone reading the report log in as you.
  • {"packId":1063}: the body. This is the only part that chooses which pack gets installed. Here it asks for pack number 1063.

The parts that matter for the bug are the path (which document) and the body (which pack).

Step 2: change the pack ID

Replace the pack ID with the ID of the pack you want. The report states the endpoint's behaviour directly: a valid pack ID returns a 200 status, and an invalid one returns 400. That difference is what makes it practical to try IDs one after another and find the ones that exist. If every ID gave the same answer, you would have no way to tell a real pack from a made-up one.

Step 3: confirm the install

Send the modified request. It should return 200 OK. Then open the document and check that the pack is installed. In the example, the pro Google Translate pack is installed in the document without any upgrade.

The researcher also created a document that uses the Google Translate pro pack without upgrading, and notes that installing the pro pack produces a 14 days warning. Whether the pack expires after those 14 days and the document becomes read only was not confirmed in the report.

Why it works

The endpoint takes a pack ID supplied by the client (your browser) and installs the matching pack without checking that you are entitled to it. The endpoint installs the matching pack without checking that you are entitled to it. This is an access control gap on a pack ID the client controls.

Impact

Anyone with an account and a document they can edit can install paid packs for free. The report frames this as using paid functionality without paying, and as a loss to the business. The report says the user can iterate over pack IDs to reach any free, pro or disabled pack. The report does not establish how long an installed pro pack keeps working: the 14 days warning is noted, and whether the pack then expires and the document becomes read only is left open.

Fix

The report does not describe a fix or a change made by the vendor. What the behaviour calls for is a server-side check, at the moment the pack is installed, that the requesting user is entitled to that specific pack, rather than trusting the pack ID in the body.

Variants to test

  1. Other per-document object endpoints. Look for sibling routes under the same internal API prefix that take an object ID in the body, such as templates, integrations or add-ons. A positive result is a 200 for an object the account is not entitled to, with the object visibly active afterwards.
  2. Tier and state enumeration. Walk IDs and record which return 200 and which return 400, then map the 200s to free, pro and disabled items. A positive result is a disabled or paid item appearing in the document.
  3. Cross-document reuse. Take a captured install request from one document and replay it against another document ID you own. A positive result is the pack installing in the second document with the same body.
  4. Entitlement after downgrade. Install a paid pack, then remove the paid entitlement from the account and check whether the pack keeps working. A positive result is continued use after the entitlement is gone.

Hunting notes

This kind of bug hides in internal API routes that the front end calls for a specific UI action, especially ones whose path is scoped to a resource the user legitimately owns while the sensitive choice sits in the request body. During recon, watch for endpoints with an ID in the JSON body that maps to a catalogue of items with tiers or states, and for responses that distinguish valid from invalid IDs with different status codes, as 200 versus 400 does here. That difference is what makes enumeration cheap.

The impact case in this report is simple and concrete: a paid pack installed in a real document without an upgrade, plus a note on the 14 days warning and the open question of expiry. Showing the paid feature actually working in the document, rather than only a 200 response, is what turns an access control observation into an accepted report.

Glossary

  • Access control: the rules that decide who is allowed to do what. An access control bug means those rules are missing or too loose.
  • API: the private set of addresses a website's front end uses to talk to its servers.
  • Body: the part of a request that carries data, as opposed to the address and headers.
  • Burp Suite: a tool that sits between your browser and a website so you can capture, inspect and edit requests.
  • Cookie: a small piece of text your browser stores and sends back to a site, often used to keep you logged in.
  • CSRF (Cross-Site Request Forgery): an attack where another website tricks your browser into sending a request you did not intend.
  • CSRF token: a value added to requests that change things, so the server can confirm the request came from the site's own pages.
  • Disabled pack: a pack that has been switched off and is not meant to be usable.
  • Document ID: the unique code that identifies one Coda document.
  • Endpoint: one specific address on an API that performs one specific action.
  • Enumeration: trying a series of possible values (such as IDs) one by one to discover which ones exist.
  • Free pack: a pack available without paying.
  • GET: a request type used to read something, as opposed to POST, which is used to create or change something.
  • Header: extra information attached to a request, such as the cookie or the content type.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • JSON: a text format for structured data, using curly brackets, quotes and colons.
  • Pack: a Coda add-on that extends what a document can do.
  • Pack ID: the number that identifies one specific pack.
  • POST: a request type used to send data to a server to create or change something.
  • Pro pack: a pack that normally requires a paid plan.
  • Proxy: a tool or service that sits between your browser and a website and passes messages through, optionally letting you inspect and edit them.
  • Status code: the number at the start of a server's answer, such as 200 for OK or 400 for Bad Request.
  • Tier: a level of a product, such as free or paid.
  • Upgrade: moving an account to a paid plan.

More by 0xcrypto

View all

1 more disclosed report, best first.

More from Superhuman (formerly Grammarly)

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.