/

CVE-2026-34243

Severity:

CRITICAL RISK

(9.8)

Command Injection in GitHub Actions Workflow for wenxian

CVE-2026-34243

Analyzed

Vulnerability type

Category:

Command Injection

CWE:

CWE-77, CWE-78

Impact:

Remote Code Execution on CI Runner

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

wenxian's GitHub Actions workflow processes untrusted issue comments directly in a shell command, enabling command injection on the CI runner.

An attacker who can post crafted comments to the repository's issues may execute arbitrary commands with the runner's privileges during workflow runs.

Affected context

The vulnerability appears in the project's GitHub Actions automation, not in the wenxian CLI tool itself.

It affects repositories that use the vulnerable workflow configuration, where a workflow is triggered by issue comments and interpolates the raw issue_comment.body into a shell command.

The risk is present when the workflow runs on GitHub-hosted or self-hosted runners with permissions or secrets that would be valuable if compromised.

Exploit preconditions

  • Attack surface: GitHub repository issue comment interface (web UI, API, or any integration that can post comments).
  • Required access: Ability to create or modify issue comments in a repo where the vulnerable workflow is enabled. This may include unauthenticated users in public repositories or any authenticated collaborator, depending on repository settings and workflow permissions.
  • Trigger point: A workflow run that reads issue_comment.body and concatenates it into a shell command line (e.g., via run: steps, bash -c, or similar).
  • Why exploitation is possible: The workflow treats untrusted text from issue comments as part of a shell command without proper quoting, escaping, or contextual sanitization, allowing the attacker to break out of the intended argument and inject arbitrary shell syntax.

Why this happens

The core bug is the direct inclusion of untrusted user input in a command executed by a shell in a GitHub Actions workflow.

This maps to CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') and is closely related to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

Instead of treating issue_comment.body as data and passing it as a constrained argument, the workflow composes a command string where shell metacharacters (such as ;, &&, |, backticks, or $()) are interpreted by the shell.

In the CI/CD context, this pattern is particularly dangerous because the workflow may have access to repository contents, tokens, or deployment credentials, all of which become reachable if the shell is subverted.

Potential impact

  • Execution of arbitrary commands on the GitHub Actions runner.
  • Theft or misuse of repository secrets, tokens, or credentials available to the workflow.
  • Unauthorized modification or exfiltration of repository contents and artifacts.
  • Tampering with generated BIBTEX files or other build outputs consumed downstream.
  • Lateral movement into other systems that the CI pipeline can reach (e.g., artifact stores, registries, staging environments).
  • Abuse of compute resources for malicious activities such as cryptomining or hosting malware.

General mitigation guidance

Effective mitigation focuses on treating all workflow-supplied user input as untrusted and eliminating direct shell interpolation:

  • Prefer data-driven actions: use official GitHub Actions or scripts that accept data via inputs or environment variables rather than building shell command strings from user content.
  • If shell commands are unavoidable, ensure strict quoting and escaping and avoid passing raw user input to the shell; use positional arguments instead of bash -c "…$USER_INPUT…".
  • Apply input validation and filtering in the workflow logic, allowing only expected patterns (e.g., restricted identifier formats like DOI/PMID/arXiv IDs), and reject or neutralize any unexpected characters or structures.
  • Minimize workflow privileges: use least-privilege tokens, disable unnecessary permissions, and avoid granting workflows wide-ranging repository or environment access.
  • Isolate risky jobs: run them in constrained environments with no secrets and minimal network and filesystem access, so even if input handling fails, the blast radius is limited.
  • Document security assumptions around automation that ingests community input, so future workflows avoid repeating the pattern.

How teams detect issues like this

Detection involves both code-centric and pipeline-centric reviews:

  • Workflow configuration review: Examine .github/workflows/*.yml for run: steps that concatenate values like github.event.comment.body, issue_comment.body, or other user-controlled fields into shell commands.
  • Static analysis: Apply rules that flag shell invocations with untrusted inputs, especially where interpolation occurs inside "..." or '...' in run: blocks or scripts.
  • Policy enforcement: Use repository governance (branch protection, code owners, mandatory security review for workflow changes) to ensure that new or modified workflows with shell execution receive explicit scrutiny.
  • Runtime monitoring: Review GitHub Actions logs for suspicious patterns, such as unexpected command sequences or failed steps that include suspicious user-generated content.
  • Automated tooling: Integrate security scanners that understand GitHub Actions semantics and can identify injection-prone constructs in workflow YAML and related scripts.

Sources

SourceLink
github.comgithub.com/njzjz/wenxian/security/advisories/GHSA-r4fj-r33x-8v88

Frequently asked

questions

Yes. In repositories where the workflow can be triggered from issue comments, any user who can create or influence those comments may be able to trigger command execution, subject to repository and workflow configuration.

The attacker needs the ability to post issue comments that the workflow consumes. In public projects, this often requires only a standard GitHub account, but private or restricted repositories may limit who can comment or trigger workflows.

The safest pattern is to remove direct shell interpolation of user-controlled fields and instead pass user data as validated, constrained inputs to non-shell actions or scripts. Where shell usage is necessary, commands should be parameterized so the shell never interprets user content as part of the command itself.

Establish secure CI/CD design practices: treat all event payload fields as untrusted, prohibit raw shell command construction from user input, enforce code review for workflow changes, and adopt linters or policies that flag injection-prone patterns before they are merged.

Find out what's already
exploitable in your codebase.