/

CVE-2026-25761

Severity:

HIGH RISK

(8.8)

Command Injection in GitHub Super-Linter Action

CVE-2026-25761

Analyzed

Vulnerability type

Category:

Command Injection

CWE:

CWE-77

Impact:

Remote Code Execution in CI/CD Workflow Runner

Severity:

HIGH RISK

(8.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

GitHub's Super-linter Action versions 6.0.0 through 8.3.0 contain a command injection vulnerability where crafted filenames containing shell command substitution syntax (e.g., $(...)) can lead to arbitrary command execution during file discovery.

When Super-linter is used in downstream GitHub Actions workflows, an attacker can open a pull request that adds a maliciously named file, potentially causing the workflow runner to execute attacker-controlled commands and, in some configurations, disclose the job's GITHUB_TOKEN.

Affected context

This issue affects repositories that:

  • Use the vulnerable versions (6.0.0–8.3.0) of the GitHub Super-linter Action, and
  • Run Super-linter against files introduced or modified by untrusted contributors (e.g., pull requests from forks or external collaborators).

The vulnerability occurs in Super-linter's runtime scripts that perform file discovery and invoke shell commands using untrusted filenames without proper sanitization or escaping. It becomes risky whenever the CI runner processes filenames that an attacker can control.

Exploit preconditions

  • Attack surface: GitHub Actions workflows (or other CI setups) that invoke the Super-linter Action.
  • Required access: Ability to submit changes that introduce or rename files in the repository, such as creating a pull request from a fork or branch.
  • Trigger point: Execution of the Super-linter workflow run that scans the newly introduced or modified files.
  • Why exploitation is possible: The file discovery logic incorporates filenames directly into shell command lines or patterns that support command substitution syntax ($(...)) without proper quoting or neutralization, allowing the shell to interpret parts of the filename as executable commands.

Why this happens

The underlying bug is an instance of CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').

The Super-linter runtime scripts treat filenames—data that can be influenced by users—as trusted text in shell commands. When filenames are interpolated directly into command lines or evaluated by a shell that supports command substitution, characters like $( and ) are interpreted as directives to execute a nested command. Because the code does not consistently sanitize, escape, or safely handle these inputs (e.g., via strict quoting or non-shell-based APIs), attackers can encode arbitrary commands in the filename itself, which the CI runner then executes under the permissions of the workflow job.

Potential impact

  • Execution of arbitrary commands within the GitHub Actions runner environment.
  • Exposure or exfiltration of the job's GITHUB_TOKEN, depending on configured permissions.
  • Unauthorized actions against the repository, such as pushing commits, creating or modifying pull requests, or changing settings if the token is sufficiently privileged.
  • Lateral movement within the CI environment, including attempts to access other secrets, artifacts, or services reachable from the runner.
  • Tampering with build artifacts, test results, or security scans performed during the workflow.

General mitigation guidance

Effective mitigation focuses on treating filenames and other user-influenced values as untrusted input and avoiding unsafe shell construction patterns.

General defensive patterns include:

  • Avoid building shell commands by string concatenation or interpolation of filenames; instead, use APIs that pass arguments as separate parameters (e.g., using arrays or non-shell libraries).
  • Apply strict, consistent quoting and escaping for any filename or path passed to the shell, and avoid constructs that expand or evaluate the input (such as command substitution or eval-like behavior).
  • Constrain which files are processed by linting jobs, preferring explicit allowlists or patterns that cannot contain shell metacharacters.
  • Run CI jobs with least privilege, minimizing the capabilities of GITHUB_TOKEN and other credentials so that compromise of a single job has limited blast radius.
  • Separate security-sensitive steps (e.g., deployment, secret access) from steps that process untrusted pull request input, using GitHub's permission model and environment protections to gate privileged operations.

How teams detect issues like this

Detection approaches can focus on both configuration review and code analysis of CI scripts:

  • Static analysis and linting of workflow scripts: Look for shell commands that embed variables like filenames, paths, or glob patterns without robust quoting (e.g., "$file" vs. $file) and that allow command substitution syntax.
  • Code review signals: Pay attention to any use of sh -c, eval, or dynamically constructed command strings in CI workflows and related helper scripts, especially when driven by repository content or user input.
  • Policy enforcement: Use organizational policies or repository rules to restrict or centrally approve changes to critical GitHub Actions workflows and shared CI templates, including usage of third-party actions.
  • Runtime monitoring: Inspect CI logs for unexpected command expansions or anomalous shell output triggered by unusual filenames, and enforce logging of executed commands in the CI environment where feasible.
  • Automated tools: Integrate security scanners that understand workflow configuration (e.g., GitHub Actions analysis tools) to flag unsafe patterns and dependencies on known-vulnerable action versions.

Sources

SourceLink
github.comgithub.com/super-linter/super-linter/releases/tag/v8.3.1
github.comgithub.com/super-linter/super-linter/security/advisories/GHSA-r79c-pqj3-577x

Frequently asked

questions

Yes. If a repository's workflow runs the vulnerable Super-linter Action on pull requests from forks or external contributors, an attacker can propose a change that adds or renames a file with a malicious filename, potentially triggering command execution when the workflow runs.

The attacker typically needs the ability to submit changes that will be linted—most commonly, permission to open a pull request. Direct access to the CI infrastructure is not required; the workflow runner executes the malicious filename logic on the attacker's behalf when the pull request is processed.

The safest pattern is to avoid embedding untrusted data—such as filenames—into shell commands entirely. Where shell usage is unavoidable, pass arguments via structured interfaces or arrays, apply strict quoting to every variable expansion, and disallow constructs that cause the shell to re-interpret input (like command substitution or eval).

To prevent similar problems, treat CI configurations as production code: subject them to security-focused review, apply linters that detect unsafe shell patterns, restrict action versions to trusted and regularly updated releases, and design workflows so that steps processing untrusted contributions run with limited permissions and cannot directly access sensitive tokens or deployment mechanisms.

Find out what's already
exploitable in your codebase.