CVE-2025-11148

9.8 CRITICAL

📋 TL;DR

CVE-2025-11148 is a critical command injection vulnerability in the check-branches npm package that allows attackers to execute arbitrary commands on systems running this tool. The vulnerability affects anyone using check-branches in CI/CD pipelines or locally, as malicious branch names can be injected into git commands. Attackers with repository access can exploit this to gain remote code execution.

💻 Affected Systems

Products:
  • check-branches
Versions: All versions
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerable in all configurations where check-branches processes untrusted branch names.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with attacker gaining shell access, data exfiltration, lateral movement, and persistence establishment.

🟠

Likely Case

Unauthorized command execution in CI/CD environments leading to pipeline compromise, credential theft, and repository manipulation.

🟢

If Mitigated

Limited impact with proper input validation and sandboxing, potentially only affecting isolated CI/CD runners.

🌐 Internet-Facing: HIGH - CI/CD systems exposed to external repositories or pull requests are directly vulnerable.
🏢 Internal Only: MEDIUM - Internal repositories still pose risk if users can create malicious branches.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires ability to create branches in target repository. Public proof-of-concept demonstrates command injection.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: None

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

Restart Required: No

Instructions:

No official patch available. Remove check-branches from your environment and use alternative tools.

🔧 Temporary Workarounds

Remove check-branches

all

Uninstall check-branches package and remove from CI/CD pipelines

npm uninstall -g check-branches
Remove check-branches from package.json and CI/CD configs

Use alternative branch checking

all

Replace check-branches with git native commands or other validated tools

git branch --merged
git branch --no-merged

🧯 If You Can't Patch

  • Implement strict branch naming policies to prevent special characters
  • Run check-branches in isolated containers with minimal privileges

🔍 How to Verify

Check if Vulnerable:

Check if check-branches is installed: npm list -g check-branches or check package.json dependencies

Check Version:

check-branches --version

Verify Fix Applied:

Confirm check-branches is not installed and not referenced in CI/CD configurations

📡 Detection & Monitoring

Log Indicators:

  • Unusual git commands in CI/CD logs
  • Suspicious branch names containing shell metacharacters
  • Unexpected command execution in pipeline logs

Network Indicators:

  • Unusual outbound connections from CI/CD systems
  • Git operations with malicious payloads

SIEM Query:

Search for 'check-branches' execution logs with suspicious branch names containing |, ;, $, &, or backticks

🔗 References

📤 Share & Export