CVE-2023-51839

9.1 CRITICAL

📋 TL;DR

CVE-2023-51839 is a cryptographic vulnerability in DeviceFarmer STF (Smartphone Test Farm) version 3.6.6 that uses broken or risky cryptographic algorithms, potentially allowing attackers to decrypt sensitive data or bypass authentication. This affects organizations using STF for mobile device testing and management. The high CVSS score of 9.1 indicates critical severity.

💻 Affected Systems

Products:
  • DeviceFarmer STF
Versions: Version 3.6.6 specifically
Operating Systems: Linux, Windows, macOS
Default Config Vulnerable: ⚠️ Yes
Notes: All deployments of STF v3.6.6 are vulnerable regardless of configuration. The vulnerability is in the cryptographic implementation itself.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of STF infrastructure, unauthorized access to connected mobile devices, theft of sensitive testing data, and potential lateral movement to internal networks.

🟠

Likely Case

Unauthorized access to STF dashboard, manipulation of device testing sessions, and exposure of device credentials or API keys.

🟢

If Mitigated

Limited impact with proper network segmentation and monitoring, though cryptographic weaknesses remain exploitable if accessed.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires network access to STF services but cryptographic attacks are well-documented. Public proof-of-concept code exists in GitHub repositories.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version 3.6.7 or later

Vendor Advisory: https://github.com/DeviceFarmer/stf/issues/736

Restart Required: Yes

Instructions:

1. Backup current STF configuration and data. 2. Stop all STF services. 3. Update STF to version 3.6.7 or later using npm: 'npm update -g stf'. 4. Verify the update with 'stf --version'. 5. Restart STF services.

🔧 Temporary Workarounds

Network Isolation

linux

Restrict network access to STF services to trusted IPs only

iptables -A INPUT -p tcp --dport 7100 -s TRUSTED_IP -j ACCEPT
iptables -A INPUT -p tcp --dport 7100 -j DROP

Disable Vulnerable Features

all

Temporarily disable STF features that use the broken cryptography

Modify STF config to disable authentication features if not critical

🧯 If You Can't Patch

  • Implement strict network segmentation and firewall rules to limit STF access
  • Monitor STF logs for unusual authentication attempts or cryptographic errors

🔍 How to Verify

Check if Vulnerable:

Check STF version with 'stf --version' and verify if it's 3.6.6

Check Version:

stf --version

Verify Fix Applied:

After update, confirm version is 3.6.7 or later with 'stf --version'

📡 Detection & Monitoring

Log Indicators:

  • Failed cryptographic operations
  • Unexpected authentication attempts
  • Multiple connection attempts to STF ports

Network Indicators:

  • Unusual traffic patterns to STF default ports (7100, 7110)
  • Multiple failed TLS/SSL handshakes

SIEM Query:

source="stf.log" AND ("crypto" OR "authentication" OR "decrypt") AND severity=ERROR

🔗 References

📤 Share & Export