/

CVE-2026-33475

Severity:

CRITICAL RISK

(9.1)

Shell Command Injection in CI/CD Pipelines in Langflow CI

CVE-2026-33475

Analyzed

Vulnerability type

Category:

Shell Command Injection in CI/CD Pipelines

CWE:

CWE-74, CWE-78

Impact:

Remote Code Execution in CI environment and Secret Exfiltration

Severity:

CRITICAL RISK

(9.1)

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

Multiple GitHub Actions workflows in the Langflow repository prior to 1.9.0 interpolate untrusted GitHub context values directly into run: shell commands without proper quoting or sanitization.

An attacker can craft malicious branch names, pull request titles, or workflow inputs that inject arbitrary shell commands into the CI environment, potentially leading to secret exfiltration, release tampering, and broader supply-chain compromise.

Affected context

The vulnerability occurs in GitHub Actions workflows and composite actions under .github/workflows/ and .github/actions/ in Langflow repositories that:

  • Are using versions prior to 1.9.0
  • Reference GitHub context fields (e.g., github.head_ref, github.event.pull_request.title, inputs.*) directly inside run: shell steps
  • Execute these workflows for untrusted contributions (e.g., forks, feature branches, or PRs from external contributors)

Any Langflow repository with GitHub Actions enabled and these patterns present may be exposed, especially when workflows run with elevated permissions and access to CI secrets.

Exploit preconditions

  • Attack surface: GitHub-hosted CI environment (GitHub Actions) associated with a Langflow repository.
  • Required access: Ability to create a fork and open a pull request, or otherwise cause a branch/PR to be processed by the vulnerable workflows; no repository write access is required on the upstream.
  • Trigger point: Execution of workflows that interpolate GitHub context values (branch name, PR title, workflow inputs) directly into shell commands within run: steps.
  • Why exploitation is possible: Shell interprets unquoted or improperly quoted interpolated values as part of the command line. User-controlled strings (e.g., containing &&, ;, or command substitutions) are concatenated into the script, allowing attackers to break out of the intended command and execute arbitrary commands with the workflow's permissions.

Why this happens

This issue stems from treating GitHub Actions context data as trusted when embedding it into shell commands, mapping to:

  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
  • CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component

In affected workflows, expressions such as ${{ github.head_ref }} or ${{ inputs.browsers }} are inserted directly into run: steps. When those values are not wrapped in robust quoting or safely passed as environment variables/arguments, shell metacharacters are interpreted by /bin/sh or bash, turning data into executable instructions. This is a classic injection pattern where downstream command interpreters process unvalidated, user-controlled input.

Potential impact

  • Exfiltration of CI secrets (e.g., GITHUB_TOKEN, cloud provider credentials, package registry tokens).
  • Unauthorized modification of repository state via GITHUB_TOKEN, including pushing malicious commits, tags, or releases.
  • Tampering with build artifacts, Docker images, or published packages, enabling supply-chain attacks on downstream users.
  • Modification of deployment scripts or infrastructure configuration executed from CI workflows.
  • Abuse of CI runners for arbitrary workloads, such as scanning internal resources reachable from the runner.

General mitigation guidance

Effective mitigation focuses on eliminating direct shell injection vectors and reducing trust in CI input data:

  • Prefer passing context values via environment variables or action inputs and referencing them inside run: steps with strict quoting (e.g., "$BRANCH_NAME").
  • Treat all GitHub context fields and workflow inputs as untrusted; avoid building shell command lines via string concatenation.
  • Use safe argument passing patterns, such as explicit flags and arrays, rather than interpolating values into a single command string.
  • Apply default-deny validation on user-controlled values where practical, enforcing whitelists for branch names, titles, or input parameters.
  • Limit workflow permissions (e.g., GitHub token scopes) to the least privilege necessary, so even if a command injection occurs, its impact is constrained.
  • Isolate high-privilege steps (such as publishing or deploying) into separate workflows that cannot be triggered with untrusted context or from forks.

How teams detect issues like this

Detection approaches generally combine code review discipline with automated analysis:

  • Static analysis / linters for GitHub Actions that flag ${{ ... }} expressions embedded directly in run: steps, especially those touching github.* or inputs.*.
  • Code review checklists that require reviewers to scrutinize any new or modified workflows for unquoted context interpolation and shell-based logic.
  • Repository-wide searches or CI policies for patterns like ${{ github.head_ref }}, ${{ github.event.pull_request.title }}, and ${{ inputs. inside shell commands, ensuring they are properly quoted or refactored.
  • Use of policy-as-code tools (e.g., Open Policy Agent, custom GitHub Apps) to enforce rules on workflow files before merging.
  • Periodic audits of workflows and composite actions, particularly those that have access to sensitive secrets or perform release/deployment operations.

Sources

SourceLink
github.comgithub.com/langflow-ai/langflow/security/advisories/GHSA-87cc-65ph-2j4w

Frequently asked

questions

The exploit occurs within GitHub Actions runners. An attacker interacts through GitHub (e.g., fork + pull request), and the injected commands run in the CI environment, not directly on user machines or production servers. However, compromised workflows can indirectly affect downstream users through tampered artifacts.

Typically no. Because branch names, pull request titles, and some workflow inputs are derived from user-controlled data, an attacker usually needs only the ability to fork the repository and open a pull request or otherwise trigger the workflow from a branch they control.

Move all user-controlled or context-derived values into environment variables or inputs, and always reference them in run: steps with strict quoting. Avoid constructing shell command lines from interpolated strings; instead, treat these values as opaque data passed as arguments.

Establish internal guidelines for GitHub Actions that treat all context values as untrusted by default, require secure quoting and validation, and encourage the use of dedicated actions or scripts for complex logic. Combine these guidelines with automated checks in CI and regular reviews of workflow changes before merging.

Find out what's already
exploitable in your codebase.