CVE-2020-28490

9.1 CRITICAL

📋 TL;DR

CVE-2020-28490 is a command injection vulnerability in async-git npm package versions before 1.13.2. Attackers can execute arbitrary shell commands by injecting shell metacharacters (like backticks) into git command arguments. This affects any application using vulnerable async-git versions to execute git operations.

💻 Affected Systems

Products:
  • async-git npm package
Versions: All versions before 1.13.2
Operating Systems: All platforms where async-git runs (Linux, Windows, macOS)
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists when user input is passed to async-git methods without proper sanitization.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise allowing remote code execution, data theft, lateral movement, and complete control of affected systems.

🟠

Likely Case

Arbitrary command execution with application user privileges, potentially leading to data exfiltration, service disruption, or further exploitation.

🟢

If Mitigated

Limited impact due to input validation, sandboxing, or restricted user permissions preventing privilege escalation.

🌐 Internet-Facing: HIGH - Web applications using async-git with user-controlled input could allow remote attackers to execute commands.
🏢 Internal Only: MEDIUM - Internal applications could be exploited by authenticated users or through other attack vectors.

🎯 Exploit Status

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

Simple command injection via backticks demonstrated in vulnerability reports. Exploitation requires user input to reach vulnerable functions.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.13.2 and later

Vendor Advisory: https://github.com/omrilotan/async-git/commit/d1950a5021f4e19d92f347614be0d85ce991510d

Restart Required: No

Instructions:

1. Update async-git package to version 1.13.2 or later using npm: npm update async-git@latest 2. Verify the update with: npm list async-git 3. Test application functionality after update.

🔧 Temporary Workarounds

Input validation and sanitization

all

Implement strict input validation to reject shell metacharacters before passing to async-git functions.

// JavaScript example: validate input before async-git call
function sanitizeInput(input) {
    const dangerousChars = /[`$();|&<>]/;
    if (dangerousChars.test(input)) {
        throw new Error('Invalid input');
    }
    return input;
}

🧯 If You Can't Patch

  • Implement strict input validation and sanitization for all user inputs passed to async-git functions.
  • Run application with minimal privileges and in isolated environments (containers, sandboxes) to limit impact.

🔍 How to Verify

Check if Vulnerable:

Check package.json or run: npm list async-git | grep async-git

Check Version:

npm list async-git | grep async-git

Verify Fix Applied:

Verify installed version is 1.13.2 or higher: npm list async-git

📡 Detection & Monitoring

Log Indicators:

  • Unusual git command executions with shell metacharacters
  • Suspicious child process spawns from node.js application
  • Error logs showing command injection attempts

Network Indicators:

  • Unexpected outbound connections from application server
  • Data exfiltration patterns

SIEM Query:

process.name:node AND cmdline:*backtick* OR cmdline:*`*

🔗 References

📤 Share & Export