CVE-2024-22416

9.6 CRITICAL

📋 TL;DR

This CSRF vulnerability in pyLoad allows unauthenticated attackers to make arbitrary API calls via malicious GET requests. It affects all pyLoad instances with the vulnerable API configuration, potentially enabling complete system compromise. The issue stems from missing SameSite cookie protection on session cookies.

💻 Affected Systems

Products:
  • pyLoad
Versions: All versions before 0.5.0b3.dev78
Operating Systems: All platforms running pyLoad
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all pyLoad installations with API enabled (default configuration).

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system takeover: attackers could execute arbitrary commands, download malicious files, delete/download user data, or reconfigure the system.

🟠

Likely Case

Unauthorized file downloads/uploads, configuration changes, or data exfiltration from the pyLoad instance.

🟢

If Mitigated

Limited impact if proper network segmentation and access controls prevent external exploitation.

🌐 Internet-Facing: HIGH - Any internet-exposed pyLoad instance is trivially exploitable via CSRF.
🏢 Internal Only: MEDIUM - Internal attackers could still exploit via phishing or malicious internal sites.

🎯 Exploit Status

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

CSRF exploitation requires user interaction (visiting malicious page) but is trivial to implement.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.5.0b3.dev78

Vendor Advisory: https://github.com/pyload/pyload/security/advisories/GHSA-pgpj-v85q-h5fm

Restart Required: Yes

Instructions:

1. Backup pyLoad configuration and data. 2. Stop pyLoad service. 3. Update pyLoad using pip: 'pip install --upgrade pyload-ng'. 4. Verify version: 'pyload --version'. 5. Restart pyLoad service.

🔧 Temporary Workarounds

Disable API Access

all

Temporarily disable pyLoad API to prevent exploitation

Edit pyLoad config (typically ~/.pyload/pyload.conf)
Set 'api.enabled' to 'False'
Restart pyLoad service

Network Restriction

all

Restrict API access to trusted IPs only

Configure firewall to block external access to pyLoad API port (default: 8000)
Use reverse proxy with IP whitelisting

🧯 If You Can't Patch

  • Isolate pyLoad instance behind firewall with strict network access controls
  • Implement web application firewall (WAF) with CSRF protection rules

🔍 How to Verify

Check if Vulnerable:

Check if pyLoad version is below 0.5.0b3.dev78 and API is enabled in configuration

Check Version:

pyload --version

Verify Fix Applied:

Verify pyLoad version is 0.5.0b3.dev78 or higher and test API calls require proper authentication

📡 Detection & Monitoring

Log Indicators:

  • Unusual API calls from unexpected sources
  • GET requests to API endpoints with suspicious parameters
  • Configuration changes via API from unauthenticated sources

Network Indicators:

  • CSRF attack patterns in web traffic
  • API calls originating from web pages rather than direct client connections

SIEM Query:

source="pyload.log" AND ("GET /api/" OR "CSRF" OR "unauthorized")

🔗 References

📤 Share & Export