CVE-2024-57609

8.6 HIGH

📋 TL;DR

A code injection vulnerability in Pygwalker's login redirection function allows attackers to execute arbitrary code and access sensitive information by manipulating the redirect_path parameter. This affects all users running Pygwalker versions before 0.4.9.9. Remote attackers can exploit this without authentication to compromise affected systems.

💻 Affected Systems

Products:
  • Kanaries Inc Pygwalker
Versions: All versions before 0.4.9.9
Operating Systems: All platforms running Pygwalker
Default Config Vulnerable: ⚠️ Yes
Notes: All default installations are vulnerable. The vulnerability exists in the login redirection function regardless of configuration.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with remote code execution leading to data theft, lateral movement, and persistent backdoor installation.

🟠

Likely Case

Sensitive information disclosure and limited code execution within the application context, potentially leading to credential theft and further exploitation.

🟢

If Mitigated

Attack blocked at perimeter with proper input validation and network segmentation, limiting impact to isolated application component.

🌐 Internet-Facing: HIGH - Remote exploitation without authentication makes internet-facing instances immediate targets.
🏢 Internal Only: MEDIUM - Internal attackers or compromised internal systems could exploit this for lateral movement.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires crafting malicious redirect_path parameter but no authentication is needed. The GitHub reference suggests proof-of-concept details are available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.4.9.9 and later

Vendor Advisory: Not specified in provided references

Restart Required: No

Instructions:

1. Update Pygwalker to version 0.4.9.9 or later using pip: pip install --upgrade pygwalker>=0.4.9.9
2. Verify the update completed successfully
3. Test login functionality to ensure no regression

🔧 Temporary Workarounds

Input Validation Filter

all

Implement server-side validation to sanitize redirect_path parameter before processing

Implement regex filter: ^[a-zA-Z0-9\/\-\._]+$ for redirect_path values

Web Application Firewall Rule

all

Block requests containing suspicious patterns in redirect_path parameter

WAF rule to block: redirect_path containing ';', '|', '&', '$', '(', ')', '{', '}'

🧯 If You Can't Patch

  • Isolate Pygwalker instances behind strict network segmentation with no internet access
  • Implement reverse proxy with strict input validation for all redirect_path parameters

🔍 How to Verify

Check if Vulnerable:

Check Pygwalker version: python -c "import pygwalker; print(pygwalker.__version__)" and compare to 0.4.9.9

Check Version:

python -c "import pygwalker; print('Pygwalker version:', pygwalker.__version__)"

Verify Fix Applied:

After update, verify version is 0.4.9.9 or higher and test login redirection with various inputs

📡 Detection & Monitoring

Log Indicators:

  • Unusual redirect_path parameter values in login requests
  • Multiple failed login attempts with crafted redirect parameters
  • Application errors related to redirect processing

Network Indicators:

  • HTTP requests with suspicious characters in redirect_path parameter
  • Unexpected outbound connections from Pygwalker instances

SIEM Query:

source="*pygwalker*" AND (redirect_path="*;*" OR redirect_path="*|*" OR redirect_path="*$*" OR redirect_path="*&*" OR redirect_path="*`*")

🔗 References

📤 Share & Export