CVE-2024-57777

5.1 MEDIUM

📋 TL;DR

A directory traversal vulnerability in Ianproxy v0.1 and earlier allows remote attackers to access sensitive files outside the intended directory. This affects all deployments running vulnerable versions of Ianproxy, potentially exposing configuration files, credentials, or other sensitive data.

💻 Affected Systems

Products:
  • Ianproxy
Versions: v0.1 and earlier
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All default installations of affected versions are vulnerable. The vulnerability exists in the file handling mechanism.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise through exposure of sensitive configuration files, credentials, or private keys leading to lateral movement or data exfiltration.

🟠

Likely Case

Unauthorized access to sensitive files containing configuration details, API keys, or credentials stored within the application directory or accessible parent directories.

🟢

If Mitigated

Limited exposure of non-critical files if proper access controls and directory restrictions are implemented.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Directory traversal vulnerabilities are typically easy to exploit with simple HTTP requests containing path traversal sequences (../).

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

Vendor Advisory: https://github.com/ffay/lanproxy/issues/192

Restart Required: No

Instructions:

No official patch exists. Consider migrating to alternative software or implementing strict workarounds.

🔧 Temporary Workarounds

Implement Input Validation

all

Add server-side validation to reject any file path requests containing directory traversal sequences (../, ..\)

Configure web server or application firewall to block requests with ../ patterns

Restrict File Access

linux

Configure the application to run with minimal privileges and restrict file system access to only necessary directories

chmod 750 /path/to/ianproxy
chown www-data:www-data /path/to/ianproxy

🧯 If You Can't Patch

  • Isolate the vulnerable system in a restricted network segment with no internet access
  • Implement strict network access controls and monitor all file access attempts

🔍 How to Verify

Check if Vulnerable:

Attempt to access a file outside the intended directory using ../ sequences in URL parameters or file requests

Check Version:

Check the Ianproxy version in configuration files or via application interface

Verify Fix Applied:

Test that directory traversal attempts return access denied errors instead of file contents

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests containing ../ patterns
  • Unusual file access patterns outside normal directories
  • Failed file access attempts with traversal sequences

Network Indicators:

  • HTTP requests with encoded traversal sequences (%2e%2e%2f)
  • Multiple sequential requests attempting different directory paths

SIEM Query:

source="web_logs" AND (url="*../*" OR url="*..\\*" OR url="*%2e%2e%2f*")

🔗 References

📤 Share & Export