CVE-2024-41799

8.4 HIGH

📋 TL;DR

This vulnerability in tgstation-server allows low-permission users with 'Set .dme Path' privilege to potentially execute malicious .dme files, which could lead to remote code execution when combined with other configuration weaknesses. It affects tgstation-server installations prior to version 6.8.0. The attack requires multiple privileges but bypasses some intended security controls.

💻 Affected Systems

Products:
  • tgstation-server
Versions: All versions prior to 6.8.0
Operating Systems: All platforms running tgstation-server
Default Config Vulnerable: ✅ No
Notes: Requires specific privilege assignments and BYOND trusted security level configuration to be fully exploitable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution on the host server through BYOND's shell() procedure, potentially leading to full system compromise.

🟠

Likely Case

Privilege escalation within tgstation-server allowing unauthorized code execution in BYOND game servers.

🟢

If Mitigated

Limited to setting .dme paths without execution capability if proper security levels are configured.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires authenticated low-privilege user with 'Set .dme Path' privilege, plus additional configuration weaknesses.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 6.8.0 and above

Vendor Advisory: https://github.com/tgstation/tgstation-server/security/advisories/GHSA-c3h4-9gc2-f7h4

Restart Required: Yes

Instructions:

1. Backup current configuration and data. 2. Update tgstation-server to version 6.8.0 or later. 3. Restart the tgstation-server service. 4. Verify the update was successful.

🔧 Temporary Workarounds

Remove 'Set .dme Path' privilege from low-permission users

all

Restrict the 'Set .dme Path' privilege to only trusted administrators

Disable BYOND trusted security level

all

Configure BYOND to run in untrusted mode to prevent shell() execution

🧯 If You Can't Patch

  • Review and restrict user privileges, especially 'Set .dme Path' and deployment code source control
  • Implement strict file upload controls and monitor for malicious .dme file uploads

🔍 How to Verify

Check if Vulnerable:

Check tgstation-server version and verify it's below 6.8.0

Check Version:

tgs --version or check server configuration/interface

Verify Fix Applied:

Confirm tgstation-server version is 6.8.0 or higher

📡 Detection & Monitoring

Log Indicators:

  • Unauthorized .dme file path changes
  • Unexpected .dme compilation attempts
  • Shell command execution in BYOND logs

Network Indicators:

  • Unusual outbound connections from BYOND server process

SIEM Query:

Process execution from BYOND with suspicious command-line arguments

🔗 References

📤 Share & Export