CVE-2024-41116

9.8 CRITICAL

📋 TL;DR

This vulnerability allows remote code execution in streamlit-geospatial applications by exploiting unsafe eval() usage with user-controlled input. Attackers can execute arbitrary code on affected systems, potentially compromising the entire server. Anyone using streamlit-geospatial versions before the fix commit is affected.

💻 Affected Systems

Products:
  • streamlit-geospatial
Versions: All versions prior to commit c4f81d9616d40c60584e36abb15300853a66e489
Operating Systems: All platforms running Python
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in the default Timelapse page of the application when user input reaches the eval() function.

📦 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 in the network.

🟠

Likely Case

Remote code execution leading to data exfiltration, service disruption, or cryptocurrency mining operations on vulnerable servers.

🟢

If Mitigated

No impact if the vulnerable code path is not accessible or proper input validation prevents exploitation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

The vulnerability is straightforward to exploit as it involves direct eval() of user input. Public advisories provide technical details that could be weaponized.

🛠️ 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 streamlit-geospatial version containing commit c4f81d9616d40c60584e36abb15300853a66e489. 2. Restart the streamlit application. 3. Verify the vulnerable eval() call has been removed or properly sanitized.

🔧 Temporary Workarounds

Disable Timelapse Page

all

Remove or disable the vulnerable Timelapse.py page from the application

mv pages/1_📷_Timelapse.py pages/1_📷_Timelapse.py.disabled

Input Validation Wrapper

all

Add input validation to sanitize vis_params before eval() usage

# Add validation function to check vis_params contains only safe characters

🧯 If You Can't Patch

  • Implement strict network access controls to limit who can access the streamlit application
  • Deploy web application firewall (WAF) rules to block suspicious eval() payloads

🔍 How to Verify

Check if Vulnerable:

Check if your streamlit-geospatial version contains the vulnerable eval() call at line 1345 in pages/1_📷_Timelapse.py

Check Version:

git log --oneline | grep c4f81d9616d40c60584e36abb15300853a66e489

Verify Fix Applied:

Verify commit c4f81d9616d40c60584e36abb15300853a66e489 is present in your git history and the eval() call has been removed or secured

📡 Detection & Monitoring

Log Indicators:

  • Unusual Python code execution in streamlit logs
  • Suspicious import statements or system calls in application logs

Network Indicators:

  • HTTP POST requests containing Python code snippets to the Timelapse endpoint

SIEM Query:

source="streamlit.logs" AND "eval" AND ("import os" OR "import subprocess" OR "__import__")

🔗 References

📤 Share & Export