CVE-2024-8769

9.1 CRITICAL

📋 TL;DR

This vulnerability allows attackers to delete arbitrary files on systems running the aimhubio/aim tracking server. The flaw exists in the LockManager.release_locks function where user-controlled input is concatenated without proper path validation, enabling relative path traversal. Anyone running vulnerable versions of aimhubio/aim with the tracking server exposed is affected.

💻 Affected Systems

Products:
  • aimhubio/aim
Versions: Versions up to commit bb76afe
Operating Systems: All operating systems running aim
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with the tracking server running and accessible to attackers. The vulnerability requires access to the tracking server instruction API.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise through deletion of critical system files, potentially causing system crashes, data loss, or enabling further attacks by removing security controls.

🟠

Likely Case

Data destruction and service disruption through deletion of application files, configuration files, or user data, leading to downtime and potential data recovery costs.

🟢

If Mitigated

Limited impact if proper network segmentation and file system permissions restrict the tracking server's access to sensitive directories.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires access to the tracking server API but does not require authentication if the API is exposed without proper access controls. The vulnerability is straightforward to exploit once access is obtained.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after commit bb76afe

Vendor Advisory: https://huntr.com/bounties/59d3472f-f581-4beb-a090-afd36a00ecf7

Restart Required: Yes

Instructions:

1. Update aim to a version after commit bb76afe. 2. Restart the aim tracking server. 3. Verify the fix by checking that path normalization is implemented in LockManager.release_locks.

🔧 Temporary Workarounds

Network Access Restriction

linux

Restrict network access to the aim tracking server to only trusted IP addresses or networks.

Use firewall rules to limit access: iptables -A INPUT -p tcp --dport [aim_port] -s [trusted_ip] -j ACCEPT
iptables -A INPUT -p tcp --dport [aim_port] -j DROP

File System Permissions

linux

Run the aim tracking server with minimal file system permissions, restricting write access to necessary directories only.

chown -R aimuser:aimgroup /path/to/aim/data
chmod 750 /path/to/aim/data

🧯 If You Can't Patch

  • Implement strict network segmentation and firewall rules to prevent unauthorized access to the tracking server API.
  • Run the aim tracking server in a container or VM with restricted file system access and minimal privileges.

🔍 How to Verify

Check if Vulnerable:

Check if your aim version includes commit bb76afe or earlier in the git history: git log --oneline | grep bb76afe

Check Version:

Check aim version: aim --version or examine the git commit hash in your installation directory.

Verify Fix Applied:

Verify that path normalization is implemented in the LockManager.release_locks function by examining the source code or checking that the version is after commit bb76afe.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file deletion patterns in system logs
  • Failed file deletion attempts with path traversal patterns
  • Multiple API calls to _close_run() method with suspicious parameters

Network Indicators:

  • Unusual traffic to the aim tracking server API from unexpected sources
  • Multiple rapid requests to the tracking server instruction API

SIEM Query:

source="aim_logs" AND (message="*release_locks*" OR message="*_close_run*") AND (message="*../*" OR message="*..\\*")

🔗 References

📤 Share & Export