CVE-2024-31214

9.6 CRITICAL

📋 TL;DR

Traccar GPS tracking system versions 5.1 through 5.12 contain an unrestricted file upload vulnerability in the device image upload API. Attackers can upload arbitrary files with controlled content, names, and extensions to any location on the file system, potentially leading to remote code execution, cross-site scripting, or denial of service. All users running affected versions with default configurations are vulnerable.

💻 Affected Systems

Products:
  • Traccar GPS Tracking System
Versions: 5.1 through 5.12
Operating Systems: All platforms running Traccar
Default Config Vulnerable: ⚠️ Yes
Notes: Default installation with self-registration enabled and root/system privileges increases severity.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with root/system privileges leading to complete system compromise, data theft, and persistent backdoor installation.

🟠

Likely Case

Remote code execution leading to web shell deployment, data exfiltration, or system disruption.

🟢

If Mitigated

Limited impact with proper file upload restrictions and non-privileged execution context.

🌐 Internet-Facing: HIGH - Default configuration allows self-registration, making exploitation trivial for internet-facing instances.
🏢 Internal Only: MEDIUM - Requires authenticated access but still poses significant risk if internal attackers exist.

🎯 Exploit Status

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

Self-registration enabled by default allows unauthenticated exploitation. File upload API provides full control over file parameters.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 6.0

Vendor Advisory: https://github.com/traccar/traccar/security/advisories/GHSA-3gxq-f2qj-c8v9

Restart Required: Yes

Instructions:

1. Backup your Traccar configuration and data. 2. Stop the Traccar service. 3. Upgrade to Traccar version 6.0 or later. 4. Restart the Traccar service. 5. Verify the upgrade was successful.

🔧 Temporary Workarounds

Disable Self-Registration

all

Prevents unauthenticated users from creating accounts to exploit the vulnerability.

Edit traccar.xml configuration file and set <entry key='web.registration'>false</entry>

Run Traccar with Non-Privileged User

linux

Limits file system access to prevent writing to sensitive locations.

Create dedicated user: sudo useradd -r -s /bin/false traccar
Change ownership: sudo chown -R traccar:traccar /opt/traccar
Update service configuration to run as traccar user

🧯 If You Can't Patch

  • Disable self-registration immediately to prevent unauthenticated exploitation
  • Implement web application firewall rules to block suspicious file upload requests
  • Monitor file system for unexpected file creations in Traccar directories
  • Restrict network access to Traccar instances to trusted sources only

🔍 How to Verify

Check if Vulnerable:

Check Traccar version in web interface or configuration files. Versions 5.1 through 5.12 are vulnerable.

Check Version:

Check web interface or grep version from traccar.xml: grep -i version /opt/traccar/conf/traccar.xml

Verify Fix Applied:

Verify Traccar version is 6.0 or later. Test file upload functionality with malicious file extensions.

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed authentication attempts followed by successful registration
  • File upload requests with unusual file extensions (.php, .jsp, .sh)
  • Files created in unexpected directories

Network Indicators:

  • POST requests to /api/device/*/image endpoint with file uploads
  • Unusual outbound connections from Traccar server

SIEM Query:

source="traccar" AND (uri_path="/api/device/*/image" OR method="POST") AND (file_extension="php" OR file_extension="jsp" OR file_extension="sh")

🔗 References

📤 Share & Export