GHSA-Q5PW-PP6J-MVFC: GHSA-q5pw-pp6j-mvfc: Arbitrary Command Execution via Argument Injection in Samsung/CredSweeper GitHub…
GHSA-q5pw-pp6j-mvfc: Arbitrary Command Execution via Argument Injection in Samsung/CredSweeper GitHub Action Vulnerability ID: GHSA-Q5PW-PP6J-MVFC CVSS Score: 7.1 Published: 2026-12-03 The Samsung/CredSweeper GitHub
GHSA-q5pw-pp6j-mvfc: Arbitrary Command Execution via Argument Injection in Samsung/CredSweeper GitHub Action
Vulnerability ID: GHSA-Q5PW-PP6J-MVFC
CVSS Score: 7.1
Published: 2026-12-03
The Samsung/CredSweeper GitHub Action between versions 1.11.6 and 1.16.x contains an argument injection vulnerability (CWE-88) in its composite action definition. The action accepts unvalidated strings for the 'error' and 'hashed' input parameters and passes them directly as command-line arguments to the CredSweeper CLI. An attacker capable of controlling these action inputs can inject the '--log_config' flag pointing to an attacker-controlled YAML file. Because CredSweeper loads this configuration using Python's logging.config.dictConfig, which supports instantiating arbitrary callables via the '()' factory key, this flaw leads to arbitrary command execution within the GitHub Actions runner environment.
TL;DR
An argument injection flaw in the Samsung/CredSweeper GitHub Action (versions >= 1.11.6, < 1.17.0) allows attackers who control action inputs ('error' and 'hashed') to inject the '--log_config' CLI parameter. By supplying a crafted YAML configuration processed by Python's logging.config.dictConfig, an attacker achieves arbitrary command execution on the GitHub Actions runner.
⚠️ Exploit Status: POC
Technical Details
- Advisory ID: GHSA-q5pw-pp6j-mvfc
- Vulnerability Class: Argument Injection (CWE-88) / External Control of Configuration (CWE-15)
- CVSS v3.1 Score: 7.1 High (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N)
- Affected Component: Samsung/CredSweeper GitHub Action (>= 1.11.6, < 1.17.0)
- Patched Version: 1.17.0 (Commit 088249b11bd7832afa0051d6bdfb1d1d16aa1b1f)
- Execution Sink: Python logging.config.dictConfig() callable factory ('()')
- Impact: Arbitrary Command Execution in GitHub Actions Runner
- Exploit Status: Public Proof-of-Concept (PoC)
Affected Systems
- Samsung/CredSweeper GitHub Action (>= 1.11.6, < 1.17.0)
-
Samsung/CredSweeper (GitHub Action): >= 1.11.6, < 1.17.0 (Fixed in:
1.17.0)
Code Analysis
Commit: 088249b
Refactoring action (#869): Replace bash CLI invocation with Python wrapper enforcing strict boolean flag evaluation and workspace path containment.
--- a/action.yml
+++ b/action.yml
@@ -12,44 +12,87 @@ inputs:
path:
description: "Path to scan"
required: true
+ severity:
+ description: "Minimal severity rule filter"
+ default: "INFO"
+ required: false
report:
description: "CredSweeper report in JSON format"
default: "output.json"
required: false
hashed:
description: "Report output is hashed by default"
- default: "--hashed"
+ default: "true"
required: false
error:
- description: "Exit with an error code if credentials are detected"
- default: "--error"
+ description: "Exit with the common error code if credentials are detected"
+ default: "true"
+ required: false
+ subtext:
+ description: "Reduce line in report around found value"
+ default: "false"
required: false
runs:
using: "composite"
steps:
- - name: DEBUG
- shell: bash
- env:
- path: ${{ inputs.path }}
- report: ${{ inputs.report }}
- error: ${{ inputs.error }}
- hashed: ${{ inputs.hashed }}
- run: echo "print ('@@@ $error @@@ $report @@@ $path @@@ $PATH @@@')"
-
- name: Setup Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 - 2026.06.24
with:
python-version: ${{ inputs.python_version }}
- - name: Install CredSweeper
+ - name: Install latest CredSweeper
shell: bash
- run: python -m pip install credsweeper
+ run: python -m pip install --upgrade pip credsweeper
- name: Run CredSweeper
- shell: bash
+ shell: python
env:
+ WORKSPACE: ${{ github.workspace }}
path: ${{ inputs.path }}
+ severity: ${{ inputs.severity }}
report: ${{ inputs.report }}
- error: ${{ inputs.error }}
hashed: ${{ inputs.hashed }}
- run: python -m credsweeper --banner --log INFO --no-color --no-stdout "$error" "$hashed" --save-json "$report" --path "$path"
+ error: ${{ inputs.error }}
+ subtext: ${{ inputs.subtext }}
+ run: |
+ import os
+ import sys
+ from multiprocessing import freeze_support
+ from pathlib import Path
+ from credsweeper.main import main
+ workspace = Path(os.environ["WORKSPACE"]).resolve()
+ if not workspace.exists():
+ print(f"ERROR: Workspace does not exist: {workspace}", file=sys.stderr)
+ sys.exit(1)
+ scan_path = (workspace / os.environ["path"]).resolve()
+ if not scan_path.exists():
+ print(f"ERROR: Scan path does not exist: {scan_path}", file=sys.stderr)
+ sys.exit(1)
+ try:
+ scan_path.relative_to(workspace)
+ except ValueError:
+ print(f"ERROR: Scan path must be within workspace", file=sys.stderr)
+ sys.exit(1)
+ report_path = (workspace / os.environ["report"]).resolve()
+ try:
+ report_path.relative_to(workspace)
+ except ValueError:
+ print(f"ERROR: Report path must be within workspace", file=sys.stderr)
+ sys.exit(1)
+ report_path.parent.mkdir(parents=True, exist_ok=True)
+ if __name__ == '__main__':
+ freeze_support()
+ argv=[
+ "--banner",
+ "--log", "INFO",
+ "--no-color",
+ "--no-stdout",
+ "--error" if "true" == os.environ["error"].lower() else "--no-error",
+ "--hashed" if "true" == os.environ["hashed"].lower() else "--no-hashed",
+ "--subtext" if "true" == os.environ["subtext"].lower() else "--no-subtext",
+ "--save-json", str(os.environ["report"]),
+ "--severity", str(os.environ["severity"]),
+ "--path", str(os.environ["path"]),
+ ]
+ exit_code=main(argv)
+ sys.exit(exit_code)
Exploit Details
- GitHub Security Advisory: Official advisory containing functional proof-of-concept YAML logging configuration and GitHub Actions workflow step demonstrating arbitrary command execution via subprocess.Popen.
Mitigation Strategies
- Upgrade Samsung/CredSweeper GitHub Action references to v1.17.0 or later across all repository workflows.
- Pin GitHub Actions to full 40-character commit SHAs (e.g., 088249b11bd7832afa0051d6bdfb1d1d16aa1b1f) to guarantee immutable execution of the patched composite action.
- Eliminate dynamic interpolation of untrusted inputs (such as workflow_dispatch inputs or pull request metadata) into action parameters.
- Enforce least-privilege permissions on the GITHUB_TOKEN (e.g., 'permissions: contents: read') in secret-scanning workflows.
- Use ephemeral runners rather than persistent self-hosted runners for workflows triggered by external pull requests.
Remediation Steps:
- Locate all workflow YAML files in '.github/workflows/' that reference 'Samsung/CredSweeper'.
- Update the version tag from any version in the range '>= 1.11.6, < 1.17.0' to 'Samsung/[email protected]' (or commit SHA '088249b11bd7832afa0051d6bdfb1d1d16aa1b1f').
- Update any explicit 'error' or 'hashed' input values in the workflow from CLI flag syntax ('--error', '--hashed') to boolean strings ('true' or 'false') to match the v1.17.0 schema.
- Review past workflow run logs for unexpected '--log_config' parameters in the 'DEBUG' step output ('@@@ $error @@@') to verify no prior exploitation occurred.
References
- GitHub Advisory Database: GHSA-q5pw-pp6j-mvfc
- Samsung/CredSweeper Security Advisory: GHSA-q5pw-pp6j-mvfc
- Fix Commit 088249b11bd7832afa0051d6bdfb1d1d16aa1b1f: Refactoring action
- Pull Request #869: Refactoring action
- Samsung/CredSweeper Release v1.17.0
- Samsung/CredSweeper Source Repository
Read the full report for GHSA-Q5PW-PP6J-MVFC on our website for more details including interactive diagrams and full exploit analysis.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.