CVE-2022-35918 Streamlit directory traversal vulnerability
Attackers can read sensitive files from the server via crafted URLs in Streamlit apps using custom components, requiring an upgrade to fix.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2022-35918?
CVE-2022-35918 is a medium-severity path traversal vulnerability in streamlit, published on 1 Aug 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Streamlit is a data oriented application development framework for python. Users hosting Streamlit app(s) that use custom components are vulnerable to a directory traversal attack that could leak data from their web server file-system such as: server logs, world readable files, and potentially other sensitive information. An attacker can craft a malicious URL with file paths and the streamlit server would process that URL and return the contents of that file. This issue has been resolved in version 1.11.1. Users are advised to upgrade. There are no known workarounds for this issue.
Weakness: CWE-22
Which versions are affected by CVE-2022-35918?
3 open source packages ship an affected version, including streamlit. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
streamlit PyPI | From 0.63.0 | 1.11.1 |
streamlit PyPI | From 0.63.0 | 1.11.1 |
streamlit PyPI | From 0.63.0 | 1.11.1 |
Products include Snowflake Streamlit.
How do I fix CVE-2022-35918?
Upgrade streamlit to 1.11.1 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2022-35918 being exploited?
There is no known exploitation of CVE-2022-35918 in the wild and no public exploit code.
Other vulnerabilities in streamlit
Sources
Also known as GHSA-v4hr-4jpx-56gc, PYSEC-2022-248.