CVE-2025-6624

7.2 HIGH

📋 TL;DR

Snyk CLI versions before 1.1297.3 expose sensitive credentials in debug logs when running in DEBUG or TRACE mode. This affects users who run Snyk container, auth, or IaC commands with debug logging enabled and credentials provided via environment variables or command line arguments.

💻 Affected Systems

Products:
  • Snyk CLI
Versions: All versions before 1.1297.3
Operating Systems: All platforms running Snyk CLI
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when debug logging is enabled (DEBUG or TRACE mode) AND credentials are provided via environment variables or command line arguments.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers with access to debug log files can steal container registry credentials, Snyk API tokens, and Docker registry tokens, potentially compromising container registries, Snyk accounts, and infrastructure.

🟠

Likely Case

Accidental credential exposure in debug logs stored on developer workstations or CI/CD systems, leading to credential leakage if logs are not properly secured.

🟢

If Mitigated

Minimal impact if debug logging is disabled or logs are properly secured with restricted access permissions.

🌐 Internet-Facing: LOW - This requires local access to debug log files, not directly exploitable over the network.
🏢 Internal Only: MEDIUM - Internal attackers or compromised systems with access to debug logs can extract credentials.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: LOW - Requires reading local debug log files.

Exploitation requires access to debug log files containing the exposed credentials.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.1297.3

Vendor Advisory: https://security.snyk.io/vuln/SNYK-JS-SNYK-10497607

Restart Required: No

Instructions:

1. Update Snyk CLI: npm update -g snyk 2. Verify version: snyk --version 3. Ensure version is 1.1297.3 or higher

🔧 Temporary Workarounds

Disable debug logging

all

Avoid using DEBUG or TRACE logging modes when running Snyk commands with sensitive credentials.

unset SNYK_DEBUG
unset SNYK_LOG_LEVEL

Use credential files instead of environment variables

all

Store credentials in secure files rather than passing via environment variables or command line.

🧯 If You Can't Patch

  • Disable debug logging completely by removing DEBUG/TRACE environment variables
  • Secure debug log files with strict file permissions (chmod 600) and regular cleanup

🔍 How to Verify

Check if Vulnerable:

Check Snyk CLI version: snyk --version. If version is below 1.1297.3, you are vulnerable when using debug logging with credentials.

Check Version:

snyk --version

Verify Fix Applied:

Run snyk --version and confirm version is 1.1297.3 or higher. Test with debug logging enabled to verify credentials are no longer logged.

📡 Detection & Monitoring

Log Indicators:

  • Sensitive strings like passwords, tokens, or registry credentials in Snyk debug log files
  • DEBUG or TRACE log entries containing credential patterns

Network Indicators:

  • None - this is a local information disclosure issue

SIEM Query:

Search for log files containing 'SNYK_REGISTRY_PASSWORD', '--password', or token patterns in Snyk debug logs

🔗 References

📤 Share & Export