Skip to content
Info disclosure Write-up Intermediate

Placeholder for Dayzzz: Abusing placeholders to extract customer informations

Custom support portals built on Zendesk used the admin Tickets API instead of the Requests API, so user-supplied placeholder strings in ticket subjects were evaluated and returned other users' data. An attacker could add a victim as a CC and use placeholders to extract billing details, internal notes, and other sensitive information.

OphionSecurity Follow

Published on ophionsecurity.com

Written By Rojan Rijal

Ophion Security (@OphionSecurity), on ophionsecurity.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

Context

Many companies build their own customer support portals on top of off-the-shelf support systems such as Zendesk, Freshdesk and similar products. The custom portal handles authentication and authorisation in the company's own way, for example OAuth against the main application, while the cases themselves are stored in the vendor's backend through an API integration. This gives the company a branded experience and keeps all cases in one place, but it also means the company re-implements, in its own code, protections that the vendor product already provides.

The feature at the centre of this research is the placeholder. A placeholder is a generic token that the support system later replaces with real data, for example information about the case creator, the agents handling the case, the case status or the secondary users attached to the case. Zendesk implements placeholders with Shopify's Liquid template language, and they can reference three objects: user, ticket and organization.

Zendesk applies suppression and activation rules that decide when a placeholder is evaluated. When suppression is active the placeholder is treated as a plain string; when suppression is deactivated the placeholder returns the corresponding value. Placeholders are activated in three situations: agent responses through the portal, automation and mail triggers, and admin API endpoints. The last one matters here, because the Tickets API endpoint (/v2/tickets.json) is an admin endpoint that requires an agent or admin session key, and admin endpoints can invoke placeholders.

The report is explicit that the abuse cases are not vulnerabilities in Zendesk itself. The affected organisations patched the issue on their own by switching to the correct API endpoint and by further sanitising user input.

Setup

The researchers first needed to find custom portals that used Zendesk as a backend. They looked through their internal asset tracker for two patterns:

  1. The customer support portal did not have /hc/en- in its path. A portal with /hc/en-* in the path is a regular Zendesk portal, not a custom one.
  2. After a successful ticket creation, the confirmation email arrived with the Zendesk thread-token format. That token is what lets Zendesk link email replies to a specific ticket.

To understand what a given portal was doing in the backend, they downloaded GitHub Enterprise Server (GHES). GHES shares most of its codebase with github.com, apart from beta features not yet available for public beta, so reading it reveals how the hosted service calls the API.

For the Zendesk side they worked against a sample instance, where they created two tickets and invoked a placeholder through the ticket's subject to compare the two API endpoints.

Finding it

Reading the GHES codebase showed that GitHub called the tickets API endpoint rather than the requests API endpoint. That is the wrong endpoint for a customer-facing portal: /v2/tickets.json is an admin endpoint, and admin endpoints invoke placeholders. A custom portal that lets end users submit ticket content through that endpoint therefore lets those users submit placeholder expressions that the backend will evaluate.

To confirm the difference between the two endpoints, the researchers created two tickets in their sample instance and put a placeholder in the subject.

When the request went to the Tickets API endpoint, the placeholder was invoked and auto-filled in the subject value, while the ticket kept the original string in raw_subject. In their test, {{ current_user.email }} was replaced with the authenticated user's email address.

When the request went to the Requests API endpoint, the user input in subject was properly sanitised: the placeholder was not invoked and the curly brackets were removed, which also prevents a second-level injection later on.

With that confirmed, they enumerated which placeholders were reachable and what they exposed.

The user object

A user object holds information about the Zendesk user requested through the placeholder. Zendesk users are agents and end users with an account in the portal. The accessible fields are:

  • First Name
  • Last Name
  • Email
  • Phone
  • Notes
  • Custom Fields

Two of these stood out. Custom fields are organisation dependent and hold whatever the organisation stores to help its agents, for example a most recent order ID, billing address and account number for an e-commerce application, or an account number, number of phone numbers and last billing date for a telephone company. Notes are an array of strings with notes about the user account, typically written by support agents for future reference or to explain the customer's status.

The ticket object

A ticket object holds information about the Zendesk ticket requested through the placeholder. The accessible fields are:

  • Ticket ID
  • CC Names
  • CCs
  • Comments
  • Requester

Here the interesting field was ccs. It is similar to cc_names, since both describe secondary users added to a ticket, but they differ in what they return. cc_names is an array of strings: the first and last names of registered users, or the email address that was CCed if the address is not registered. ccs is an array of User objects for the users CCed to the ticket. If a CCed email address links to a valid user, that user's information is linked through ccs, and because each entry is a user object it is possible to call specific user fields such as custom_fields and notes on it.

Invoking placeholders

Because Zendesk uses Liquid, placeholders can be written to reach specific data. Examples given in the report:

  • {{ ticket.id }} - Ticket ID of the current ticket
  • {{ ticket.ccs }} - List of all Users CCed to the ticket
  • {{ ticket.comments }} - List of all comments (internal & external) on the ticket
  • {{ current_user.custom_fields }} - Custom Fields for the current user performing action on the ticket

Since some placeholders return arrays and objects, Liquid for loops can be used to clean up the output. To get information on the first user in ticket.ccs, for example:

Text
{% for *fields* in **ticket.ccs[0]** %}

{{ *fields* }}

{% endfor %}

Exploitation

Step 1: Confirm the vulnerability

The first vulnerable system, and the researchers' Patient Zero, was GitHub's custom support portal at https://support.github.com, which GitHub had recently moved to from vanilla Zendesk. The portal lets users create support tickets for organisations they belong to as well as for their own account.

They created an initial ticket with the following placeholder in the subject:

Text
{{ ticket.requester.email }}

If the portal were vulnerable, the ticket would be created with a subject pointing to the requester user's email address. The requester in this case was the account rojan-rijal on GitHub. After ticket creation they confirmed that the subject reflected the personal email associated with that account.

Step 2: Identify the bot user

Next they extracted the {{ current_user }} object to see which user was creating the ticket in Zendesk. The answer was mutwin+ticketbot[]github[.]com, and the returned role information confirmed that this user was an Admin user.

Step 3: Pull another user's data through CC

GitHub's support portal allowed adding a secondary user to a ticket. Because the ticket object exposes ccs as user objects, being able to CC another user meant being able to pull that user's specific information through ticket.ccs. The exploit scenario:

  1. Add a victim user as a CC user to the ticket.
  2. Create a ticket subject with {{ ticket.ccs[0].custom_fields }}. This creates a ticket whose subject contains all stored custom fields about that user.

Root cause

The mistake is in the integration, not in Zendesk. A custom portal that writes user-supplied ticket content through the admin Tickets API endpoint (/v2/tickets.json) hands that content to a code path where placeholders are active. The portal's own authentication and authorisation do not help, because the placeholder is evaluated server-side by Zendesk after the portal has accepted the input. The Requests API endpoint (/v2/requests.json) is the end-user-facing path, and there the same input was sanitised: the placeholder was not invoked and the curly brackets were stripped, which also blocks a second-level injection later on. The difference in behaviour between the two endpoints is the core of the issue.

Impact

Across the companies the researchers identified as vulnerable, the injection allowed extracting:

  • Billing information of other users, including but not limited to their address, email and phone number.
  • Support agents' internal notes against users, and plaintext passwords hardcoded into agents' internal notes.
  • Support agent work status and assigned work location (city and country).

The reach depends on what the placeholders can touch: the current user's own object, the ticket object including its CCed users, and the custom fields and notes that the organisation stores on those users. The CC path is what turns a self-injection into disclosure about other people, and it requires that the portal lets the attacker add secondary users to a ticket.

Fix

The affected organisations patched the issue themselves. The report's recommendations are:

  • Use the /v2/requests.json API endpoint where possible instead of the Tickets API.
  • If the Tickets API has to be used, sanitise user input to prevent placeholder-like strings in support tickets.

Variants to test

  • Custom portals on other support backends. The report notes an increase in use of Salesforce's Service Cloud as a backend, and that it has its own exploitable conditions, covered in a BSides San Francisco talk.
  • Endpoint comparison on a sample instance. Submit the same placeholder-bearing subject through the end-user endpoint and the admin endpoint. A positive result is the admin endpoint returning the resolved value in subject while raw_subject keeps the original string, and the end-user endpoint stripping the brackets.
  • CC-based disclosure. Add a second account as a CC user and reference {{ ticket.ccs[0].custom_fields }} or {{ ticket.ccs[0].notes }} in a ticket field.
  • Loop-based extraction. Where a placeholder returns an array, wrap it in a Liquid for loop to dump every entry.
  • Portal fingerprinting. Check whether the portal path lacks /hc/en- and whether confirmation emails carry the Zendesk thread-token format. Both were patterns the researchers used to identify custom portals with a Zendesk backend.
From the original on ophionsecurity.com

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

What happened, in plain words

Many companies do not use a support product exactly as it comes out of the box. Instead they build their own customer support website and connect it to a support product behind the scenes. The support product stores the tickets; the company's own website is what customers see and log into.

This research found that several companies had connected their custom support website to the support product in the wrong way. The wrong connection let a customer type special instructions into a ticket, and the support product would follow those instructions and fill the ticket with private information about other people: billing details, internal notes written by support staff, and in some cases passwords that staff had written into those notes.

The feature being abused is called a placeholder. A placeholder is a short code that the support system replaces with real data before showing the ticket. Normally that is helpful: a support agent writes a placeholder and the system fills in the customer's name. The problem was that customers could write placeholders too, and the system would fill those in as well.

The report is careful to say that this is not a bug in the support product itself. The affected companies fixed it on their own by changing which connection they used and by cleaning up what customers are allowed to type.

Background: custom support portals

A support portal is the website where customers open tickets, read replies and track their cases. Products like Zendesk and Freshdesk provide such a portal ready-made.

Many companies instead build their own portal and use one of those products only as the place where tickets are stored. This has real advantages:

  • The company can use its own login system, for example letting people sign in with the same account they use for the main product. The report mentions OAuth, which is a standard way for one website to ask another website's permission to act on your behalf, a bit like showing a membership card at a partner shop instead of filling in a form again.
  • All tickets end up in one place, which is easier for support staff.

But building your own portal means you also have to rebuild, in your own code, the safety checks that the ready-made product already had. That is where mistakes creep in.

An API is the way two computer systems talk to each other without a human clicking buttons. Think of it as a service counter: you hand over a written request in an agreed format, and you get back a written answer. The custom portal is the customer-facing shop; the API is the counter at the back where the shop talks to the warehouse.

What a placeholder is

A placeholder is a generic word or code that gets replaced with actual information later. The report's everyday comparison is a ticket's data being returned to the user based on what was requested. In a support system, a placeholder can ask for things like:

  • information about the person who created the case,
  • the agents handling the case,
  • the case status,
  • the secondary users attached to the case.

Each support product designs its placeholders differently. This research looked at Zendesk's design and then at one real case study.

How Zendesk placeholders work

Zendesk lets agents and automated emails fill in customer information automatically when replying to cases. The classic example is the automatic email that goes out when a case is created.

That image shows the automatic email trigger where placeholders are used.

Zendesk has rules that decide when a placeholder is turned into real data. The report calls this activation and suppression. When suppression is active, the placeholder is treated as ordinary text and stays as typed. When suppression is deactivated, the placeholder is replaced with the real value.

Placeholders are activated in three situations:

  1. Agent responses. When a support agent replies through the portal, they can use placeholders to fill in information automatically.
  2. Automation and mail triggers. Zendesk's built-in automations and email triggers use placeholders, which makes sense when the email needs details about the current user or the ticket.
  3. Admin API endpoints. Certain API calls made through the admin side of the API can invoke placeholders. This is similar to agent responses, because an admin API endpoint is normally used by an agent, an internal bot or an administrator working on a ticket.

Two different doors into Zendesk

Zendesk offers two separate API endpoints, which in plain terms are two different service counters:

  • the Requests API, meant for end users,
  • the Tickets API, meant for staff.

The researchers noticed that most custom portals used the Tickets API endpoint instead of the Requests API endpoint. That was worrying, because the Tickets API endpoint (/v2/tickets.json) is an admin endpoint: it requires logging in with an agent or admin session key. A session key is the proof that you are logged in, a bit like a wristband at an event. And as we just saw, admin endpoints are one of the places where placeholders get activated.

To see the difference for themselves, the researchers created two tickets in a sample Zendesk instance of their own and put a placeholder in the ticket's subject line.

That image shows the request sent to the Tickets API endpoint.

When the request went to the Tickets API endpoint, the placeholder was activated and filled in inside the subject value. In their test, the placeholder {{ current_user.email }} was replaced with the email address of the logged-in user.

That image shows the same kind of request sent to the Requests API endpoint.

When the request went to the Requests API endpoint, the user's input in subject was properly cleaned up. The placeholder was not activated, and the curly brackets were removed, which also stops anyone from sneaking a second placeholder in later.

Having confirmed that the Tickets API endpoint could reach and activate placeholders, the researchers went through which placeholders were reachable and what harm they could do.

The user object

In Zendesk, a placeholder can reach three kinds of records: user, ticket and organization. The report compares these to classes, meaning a template for a bundle of related information. Each bundle has fields, which are the individual pieces of information inside it.

A user object holds information about the Zendesk user that the placeholder asks for. Zendesk users are agents and end users who have an account in the portal. The fields you can reach are:

  • First Name
  • Last Name
  • Email
  • Phone
  • Notes
  • Custom Fields

Two of these stood out.

Custom fields are set up by each organisation and hold whatever that organisation wants its support agents to see. An online shop might store a customer's most recent order ID, billing address and account number. A telephone company might store the account number, how many phone numbers the account has, and the last billing date.

Notes are a list of text entries about the user account. Support agents write them for future reference, to explain the customer's situation. For example, an important business customer might have specific notes stored so agents can help with future problems.

The ticket object

A ticket object holds information about the Zendesk ticket that the placeholder asks for. The fields you can reach are:

  • Ticket ID
  • CC Names
  • CCs
  • Comments
  • Requester

One field stood out: ccs. It is similar to cc_names, because both describe the secondary users added to a ticket. In Zendesk, an end user can add other people to their ticket as CC users, the same idea as CC in email: those people can see and reply to the case.

The difference between the two fields matters:

  • cc_names is a list of plain names. It holds the first and last names of registered users. If a CCed address is not registered, the email address itself is included instead.
  • ccs is a list of full user objects for the people CCed on the ticket. If a CCed email address belongs to a valid user, that user's information is linked through ccs. Because each entry is a full user object, you can ask for specific user fields on it, such as custom_fields and notes.

That is the key to the whole attack: a list of names is not very sensitive, but a list of full user records is.

Writing placeholders

Zendesk uses a template language called Liquid, made by Shopify, to power its placeholders. A template language is a small set of rules for writing text that gets filled in later, a bit like a mail merge in a word processor. It makes it easy to write placeholders that reach specific information.

Some examples from the report:

  • {{ ticket.id }} - Ticket ID of the current ticket
  • {{ ticket.ccs }} - List of all Users CCed to the ticket
  • {{ ticket.comments }} - List of all comments (internal & external) on the ticket
  • {{ current_user.custom_fields }} - Custom Fields for the current user performing action on the ticket

Because some placeholders return lists and bundles rather than single values, Liquid's for loops can be used to tidy up the output. A loop means repeating something for every item in a list, like going through every name on a guest list one by one. To get information on the first user in ticket.ccs, the report gives this example:

Text
{% for *fields* in **ticket.ccs[0]** %}

{{ *fields* }}

{% endfor %}

Line by line:

  • {% for *fields* in **ticket.ccs[0]** %} starts a loop. It says: take the first entry of the CC list on this ticket, and for each piece of information inside it, call that piece fields.
  • {{ *fields* }} prints the current piece of information.
  • {% endfor %} closes the loop.

The result is that instead of one big jumble, you get each value listed out.

Finding vulnerable portals

With a good understanding of how Zendesk placeholders work, the researchers started testing custom portals that used Zendesk behind the scenes. To find such systems, they looked through their own internal list of assets for two patterns:

  1. The customer support portal did not have /hc/en- in its web address. A portal with /hc/en-* in the path is a standard Zendesk portal, not a custom one. Think of it as a standard shop sign versus a shop that has built its own front.
  2. After successfully creating a ticket, the confirmation email arrived with the Zendesk thread-token format. A thread token is a short code that lets Zendesk match an email reply to the right ticket, like a reference number on a letter.

Case study: GitHub's custom support portal

The first vulnerable system, and the researchers' Patient Zero (their first confirmed case), was GitHub's custom support portal at https://support.github.com. GitHub had recently moved from a standard Zendesk portal to this custom one. The portal lets users create support tickets for organisations they belong to as well as for their own account.

That image shows GitHub's custom support portal.

To work out what GitHub was doing behind the scenes, the researchers downloaded GitHub Enterprise Server (GHES). GHES is the version of GitHub that companies run on their own machines. It shares most of its code with github.com, apart from beta features not yet available for public beta, so reading it shows how the hosted service talks to the API.

Looking through the code, they noticed that GitHub called the tickets API endpoint instead of the requests API endpoint.

That image shows the relevant part of the code.

They then ran a series of tests to confirm and exploit the vulnerability.

That image shows the testing process.

Step 1: Confirm the vulnerability

To confirm the problem, they created a first ticket with this placeholder in the subject:

Text
{{ ticket.requester.email }}

In plain words: ticket.requester means the person who opened the ticket, and .email means their email address. So the whole thing asks the system to put the requester's email address where the placeholder is.

If the portal were vulnerable, the ticket would be created with a subject showing the requester's email address. The requester in this case was the account rojan-rijal on GitHub. After creating the ticket, they confirmed that the subject did indeed show the personal email address linked to that account.

That image shows the confirmation.

Step 2: Find out which user the portal uses

Next they pulled the {{ current_user }} object to see which user was creating the ticket inside Zendesk. current_user means the account the portal itself is logged in as when it talks to Zendesk, not the customer. The answer was mutwin+ticketbot[]github[.]com, and the role information returned confirmed that this user was an Admin user.

That image shows the returned user information.

This matters because it shows the portal was talking to Zendesk with a powerful account.

Step 3: Pull another user's data through CC

GitHub's support portal allowed adding a secondary user to a ticket. Because the ticket object exposes ccs as full user objects, being able to CC another person meant being able to pull that person's specific information through ticket.ccs. The exploit scenario:

  1. Add a victim user as a CC user to the ticket.
  2. Create a ticket subject with {{ ticket.ccs[0].custom_fields }}. This creates a ticket whose subject contains all stored custom fields about that user.

In plain words for step 2: ticket.ccs[0] means the first CCed user on the ticket, and .custom_fields means all the custom fields stored about them. The result lands in the subject line of the ticket.

Why it worked

The mistake is in the connection between the custom portal and Zendesk, not in Zendesk. A custom portal that sends customer-typed ticket content through the admin Tickets API endpoint (/v2/tickets.json) hands that content to a path where placeholders are active. The portal's own login checks do not help, because the placeholder is evaluated by Zendesk on its own servers after the portal has already accepted the input.

The Requests API endpoint (/v2/requests.json) is the door meant for end users, and there the same input was cleaned up: the placeholder was not activated and the curly brackets were stripped, which also blocks a second-level injection later on. The difference in behaviour between the two endpoints is the whole story.

What could be extracted

Across the companies the researchers found to be vulnerable, this injection allowed extracting:

  • Billing information of other users, including but not limited to their address, email and phone number.
  • Support agents' internal notes about users, and plaintext passwords hardcoded into agents' internal notes.
  • Support agent work status and assigned work location (city and country).

How far it reaches depends on what the placeholders can touch: the current user's own record, the ticket record including its CCed users, and the custom fields and notes the organisation stores on those users. The CC path is what turns a self-injection into disclosure about other people, and it requires that the portal lets the attacker add secondary users to a ticket.

How to fix it

The affected organisations fixed the issue themselves. The report's recommendations are:

  • Use the /v2/requests.json API endpoint where possible instead of the Tickets API.
  • If the Tickets API has to be used, clean up user input to prevent placeholder-like text in support tickets.

Things worth testing elsewhere

  • Custom portals on other support backends. The report notes growing use of Salesforce's Service Cloud as a backend, and that it has its own exploitable conditions, covered in a BSides San Francisco talk.
  • Comparing the two endpoints on a sample instance. Submit the same placeholder-bearing subject through the end-user endpoint and the admin endpoint.
  • CC-based disclosure. Add a second account as a CC user and reference {{ ticket.ccs[0].custom_fields }} or {{ ticket.ccs[0].notes }} in a ticket field.
  • Loop-based extraction. Where a placeholder returns a list, wrap it in a Liquid for loop to dump every entry.
  • Spotting a custom portal. Check whether the portal address lacks /hc/en- and whether confirmation emails carry the Zendesk thread-token format. Both were patterns the researchers used to identify custom portals with a Zendesk backend.
From the original on ophionsecurity.com

Glossary

  • API: the agreed way two computer systems exchange requests and answers, like a service counter with a fixed form.
  • API endpoint: one specific address on that counter, for one specific operation.
  • Admin API endpoint: an endpoint meant for staff or internal systems, which requires a staff-level login.
  • Authentication: proving who you are, for example by logging in.
  • Authorisation: what you are allowed to do once you are logged in.
  • OAuth: a standard way for one website to act on your behalf on another website with your permission, without sharing your password.
  • Session key: the proof that you are logged in, like a wristband at an event.
  • Support portal: the website where customers open and follow support tickets.
  • Ticket: a single support case, with a subject, messages and status.
  • Placeholder: a short code that a system replaces with real data before showing the text.
  • Activation and suppression: Zendesk's rules for when a placeholder is replaced with real data (activated) and when it is left as plain text (suppressed).
  • Template language: a small set of rules for writing text that gets filled in later, like a mail merge.
  • Liquid: the template language made by Shopify that Zendesk uses for placeholders.
  • Object: a bundle of related pieces of information, like a record card with several fields.
  • Field: one piece of information inside an object, such as an email address.
  • Array (list): an ordered collection of values, like a shopping list.
  • Loop (for loop): repeating an action once for every item in a list.
  • Custom fields: fields an organisation defines itself to store extra information about users.
  • Notes: text entries support agents write about a user account for future reference.
  • CC: adding another person to a ticket so they can see and reply to it, the same idea as CC in email.
  • CC names: a list of plain names of the people CCed on a ticket.
  • CCs: a list of full user records for the people CCed on a ticket.
  • Requester: the person who opened the ticket.
  • Current user: the account the portal is logged in as when it talks to the support system.
  • Sanitising input: cleaning up what a user typed so it cannot be interpreted as instructions.
  • Injection: tricking a system into treating user-typed text as instructions rather than as plain text.
  • SSTI (server-side template injection): injection into a template language, so the server evaluates the attacker's template code.
  • Information disclosure: leaking information to someone who should not see it.
  • Thread token: a short code that lets a support system match an email reply to the right ticket.
  • GHES (GitHub Enterprise Server): the version of GitHub that companies run on their own machines.
  • Asset tracker: an internal list of the systems a company or research team knows about.
  • Patient Zero: the first confirmed case in an investigation.
  • Plaintext password: a password stored as readable text rather than in a scrambled form.

More by OphionSecurity

View all

3 more disclosed reports, best first.

More from GitHub

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.