CVE-2024-41119

9.8 CRITICAL

📋 TL;DR

CVE-2024-41119 is a critical remote code execution vulnerability in streamlit-geospatial where user-controlled input is passed to the eval() function without proper validation. This allows attackers to execute arbitrary code on affected systems. All users running vulnerable versions of streamlit-geospatial are affected.

💻 Affected Systems

Products:
  • streamlit-geospatial
Versions: All versions prior to commit c4f81d9616d40c60584e36abb15300853a66e489
Operating Systems: All platforms running Python
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default configuration of the Raster Data Visualization page.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to execute arbitrary commands, steal data, install malware, or pivot to other systems.

🟠

Likely Case

Remote code execution leading to data theft, system manipulation, or deployment of ransomware/cryptominers.

🟢

If Mitigated

No impact if proper input validation and sanitization are implemented.

🌐 Internet-Facing: HIGH - The vulnerability is in a web application component and can be exploited remotely without authentication.
🏢 Internal Only: HIGH - Even internally, the vulnerability allows code execution if an attacker gains access to the application.

🎯 Exploit Status

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

The vulnerability is straightforward to exploit as it involves passing malicious input to an eval() function.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Commit c4f81d9616d40c60584e36abb15300853a66e489

Vendor Advisory: https://securitylab.github.com/advisories/GHSL-2024-100_GHSL-2024-108_streamlit-geospatial/

Restart Required: Yes

Instructions:

1. Update to the latest version of streamlit-geospatial. 2. Ensure commit c4f81d9616d40c60584e36abb15300853a66e489 is included. 3. Restart the Streamlit application.

🔧 Temporary Workarounds

Disable vulnerable page

all

Remove or disable the Raster Data Visualization page (8_🏜️_Raster_Data_Visualization.py) from the application.

mv pages/8_🏜️_Raster_Data_Visualization.py pages/8_🏜️_Raster_Data_Visualization.py.disabled

Input validation wrapper

all

Add input validation to sanitize the vis_params variable before eval() execution.

# Replace line 86 eval(vis_params) with: import ast; ast.literal_eval(vis_params) if possible, or implement strict validation

🧯 If You Can't Patch

  • Implement network segmentation to isolate the vulnerable application from critical systems.
  • Deploy a web application firewall (WAF) with rules to block malicious eval() payloads.

🔍 How to Verify

Check if Vulnerable:

Check if your streamlit-geospatial version includes commit c4f81d9616d40c60584e36abb15300853a66e489. Review pages/8_🏜️_Raster_Data_Visualization.py lines 80-86 for eval() usage with user input.

Check Version:

git log --oneline | grep c4f81d9616d40c60584e36abb15300853a66e489

Verify Fix Applied:

Confirm that eval() is no longer used with unsanitized user input in the patched version. Test that malicious input in vis_params does not execute code.

📡 Detection & Monitoring

Log Indicators:

  • Unusual Python code execution in Streamlit logs
  • Errors from eval() function with unexpected input
  • Suspicious process creation from Streamlit

Network Indicators:

  • Unexpected outbound connections from Streamlit application
  • Traffic patterns indicating command and control

SIEM Query:

source="streamlit.logs" AND "eval" AND ("error" OR "exception")

🔗 References

📤 Share & Export