CVE-2024-42474
Path traversal vulnerability in Streamlit's static file sharing on Windows.
- CVSS 6.5
- CWE-22
- Information Leakage
- Remote
Streamlit is a data oriented application development framework for python. Snowflake Streamlit open source addressed a security vulnerability via the static file sharing feature. Users of hosted Streamlit app(s) on Windows were vulnerable to a path traversal vulnerability when the static file sharing feature is enabled. An attacker could utilize the vulnerability to leak the password hash of the Windows user running Streamlit. The vulnerability was patched on Jul 25, 2024, as part of Streamlit open source version 1.37.0. The vulnerability only affects Windows.
- CWE
- CWE-22
- CVSS base score
- 6.5
- Published
- 2024-08-12
- OWASP
- A03 Sensitive Data Exposure
- Orthogonal defect classification
- Interface
- Code defect classification
- Incorrect Interface
- Category
- Information Leakage
- Subcategory
- Path Traversal
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Affected component
- Streamlit
- Fixed by upgrading
- Yes
Solution
Upgrade to Streamlit open source version 1.37.0 or later.
Vulnerable code sample
import streamlit as st
st.set_option('server.enableStaticFileSharing', True)
st.title("Streamlit App")
st.write("This app allows static file sharing.")Patched code sample
import streamlit as st
import os
st.set_option('server.enableStaticFileSharing', False)
st.title("Streamlit App")
st.write("This app does not allow static file sharing.")Payload
../../../../../../../../Windows/System32/config/SAM
Cite this entry
@misc{vaitp:cve202442474,
title = {{Path traversal vulnerability in Streamlit's static file sharing on Windows.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2024},
note = {VAITP Python Vulnerability Dataset, entry CVE-2024-42474},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-42474/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
