CVE-2023-27494: Streamlit: reflected XSS enables session hijacking
MEDIUMAny team hosting Streamlit apps on versions 0.63.0–0.80.0 is exposed to reflected XSS via crafted URLs — a realistic credential theft vector targeting ML engineers and data scientists. Upgrade to 0.81.0 immediately. Priority is elevated if Streamlit instances are exposed externally or used as front-ends for internal ML tooling accessible by broad audiences.
Risk Assessment
Medium severity (CVSS 6.1) but contextually significant in AI/ML environments where Streamlit is pervasive for rapid prototyping and internal tooling. The attack requires no authentication and minimal technical skill; an adversary only needs to craft a malicious URL and socially engineer a click. Exposure is highest for organizations publishing Streamlit apps externally or sharing demo links broadly within the company. The lack of CISA KEV listing and the user-interaction requirement keep overall risk moderate.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| streamlit | pip | — | No patch |
Do you use streamlit? You're affected.
Severity & Risk
Attack Surface
Recommended Action
1 step-
1) Upgrade Streamlit to 0.81.0 or later — this is the only definitive fix. 2) If immediate patching is blocked, deploy a WAF rule to reject or sanitize requests containing JavaScript patterns in URL query parameters. 3) Implement a Content Security Policy (CSP) header to block inline script execution. 4) Audit all Streamlit instances across your environment; prioritize any exposed to external or untrusted users. 5) Review access logs for anomalous URL patterns containing script tags, event handlers, or URL-encoded JavaScript. 6) Enforce least-privilege browser sessions for internal ML tooling users.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2023-27494?
Any team hosting Streamlit apps on versions 0.63.0–0.80.0 is exposed to reflected XSS via crafted URLs — a realistic credential theft vector targeting ML engineers and data scientists. Upgrade to 0.81.0 immediately. Priority is elevated if Streamlit instances are exposed externally or used as front-ends for internal ML tooling accessible by broad audiences.
Is CVE-2023-27494 actively exploited?
No confirmed active exploitation of CVE-2023-27494 has been reported, but organizations should still patch proactively.
How to fix CVE-2023-27494?
1) Upgrade Streamlit to 0.81.0 or later — this is the only definitive fix. 2) If immediate patching is blocked, deploy a WAF rule to reject or sanitize requests containing JavaScript patterns in URL query parameters. 3) Implement a Content Security Policy (CSP) header to block inline script execution. 4) Audit all Streamlit instances across your environment; prioritize any exposed to external or untrusted users. 5) Review access logs for anomalous URL patterns containing script tags, event handlers, or URL-encoded JavaScript. 6) Enforce least-privilege browser sessions for internal ML tooling users.
What systems are affected by CVE-2023-27494?
This vulnerability affects the following AI/ML architecture patterns: ML dashboards and demo applications, Model inference UIs, Data exploration and visualization tools, Internal MLOps portals.
What is the CVSS score for CVE-2023-27494?
CVE-2023-27494 has a CVSS v3.1 base score of 6.1 (MEDIUM). The EPSS exploitation probability is 0.70%.
Technical Details
NVD Description
Streamlit, software for turning data scripts into web applications, had a cross-site scripting (XSS) vulnerability in versions 0.63.0 through 0.80.0. Users of hosted Streamlit app(s) were vulnerable to a reflected XSS vulnerability. An attacker could craft a malicious URL with Javascript payloads to a Streamlit app. The attacker could then trick the user into visiting the malicious URL and, if successful, the server would render the malicious javascript payload as-is, leading to XSS. Version 0.81.0 contains a patch for this vulnerability.
Exploitation Scenario
An adversary identifies a target organization hosting a Streamlit-based ML demo or internal model dashboard on a vulnerable version. They craft a URL embedding a JavaScript payload (e.g., a cookie-stealing script or credential-phishing redirect) and deliver it via phishing email, Slack message, or a GitHub comment targeting ML engineers. When the victim clicks the link, the Streamlit server reflects the unsanitized payload directly into the page response, the browser executes the JavaScript, and the attacker captures session tokens or redirects the victim to a credential harvesting page — gaining persistent access to internal ML tooling or connected enterprise systems.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N References
Timeline
Related Vulnerabilities
CVE-2024-41115 9.8 streamlit-geospatial: eval() injection enables RCE
Same package: streamlit CVE-2024-41112 9.8 streamlit-geospatial: RCE via eval() on palette input
Same package: streamlit CVE-2024-41114 9.8 streamlit-geospatial: RCE via eval() on palette input
Same package: streamlit CVE-2024-41113 9.8 streamlit-geospatial: RCE via eval() in Timelapse page
Same package: streamlit CVE-2024-41116 9.8 streamlit-geospatial: RCE via eval() injection
Same package: streamlit
AI Threat Alert