CVE-2023-2859

8.8 HIGH

📋 TL;DR

This CVE describes a code injection vulnerability in TeamPass password manager that allows attackers to execute arbitrary code on affected systems. It affects all TeamPass installations prior to version 3.0.9. Attackers can exploit this to compromise the password manager server and potentially access stored credentials.

💻 Affected Systems

Products:
  • TeamPass
Versions: All versions prior to 3.0.9
Operating Systems: Any OS running TeamPass (typically Linux)
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all TeamPass deployments regardless of configuration. The vulnerability is in the core application code.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of the TeamPass server leading to theft of all stored passwords, installation of persistent backdoors, and lateral movement to other systems in the network.

🟠

Likely Case

Unauthorized access to stored credentials, modification of password entries, and potential privilege escalation within the TeamPass environment.

🟢

If Mitigated

Limited impact with proper network segmentation, strong authentication controls, and regular security monitoring in place.

🌐 Internet-Facing: HIGH - If TeamPass is exposed to the internet, attackers can directly exploit this vulnerability without internal access.
🏢 Internal Only: MEDIUM - Internal attackers or compromised internal systems can exploit this, but requires some level of network access.

🎯 Exploit Status

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

Exploit details are publicly available through the huntr.dev bounty report. Attackers need some level of access to the application.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.0.9

Vendor Advisory: https://github.com/nilsteampassnet/teampass/commit/1f51482a0c4d152ca876844212b0f8f3cb9387af

Restart Required: Yes

Instructions:

1. Backup your TeamPass database and configuration files. 2. Download TeamPass 3.0.9 or later from the official repository. 3. Replace the existing installation with the patched version. 4. Restart the web server service. 5. Verify the installation is working correctly.

🔧 Temporary Workarounds

Restrict Access

linux

Limit network access to TeamPass to only trusted IP addresses or internal networks

iptables -A INPUT -p tcp --dport 80 -s trusted_ip -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -s trusted_ip -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j DROP
iptables -A INPUT -p tcp --dport 443 -j DROP

Web Application Firewall

all

Deploy a WAF with code injection protection rules

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate TeamPass from other critical systems
  • Enable detailed logging and monitoring for suspicious activities and implement alerting

🔍 How to Verify

Check if Vulnerable:

Check the TeamPass version in the application interface or by examining the source code files. Versions below 3.0.9 are vulnerable.

Check Version:

Check the version in the TeamPass web interface under Settings or examine includes/config.php

Verify Fix Applied:

Verify the version is 3.0.9 or higher and check that the commit 1f51482a0c4d152ca876844212b0f8f3cb9387af is present in the installation.

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to TeamPass endpoints
  • Unexpected file writes or modifications in the TeamPass directory
  • Suspicious PHP execution patterns

Network Indicators:

  • Unusual outbound connections from the TeamPass server
  • Traffic patterns indicating data exfiltration

SIEM Query:

source="teampass_logs" AND (method="POST" AND (uri="/index.php" OR uri="/sources") AND size>10000) OR (process="php" AND cmdline="*eval*" OR cmdline="*system*")

🔗 References

📤 Share & Export