CVE-2023-30861 is an information-disclosure flaw in Flask's handling of refreshed permanent sessions. When Flask refreshes a permanent session cookie without the application accessing or modifying the session, vulnerable versions resend the cookie but do not add the HTTP Vary: Cookie response header. A shared caching proxy can therefore treat responses for clients with different cookies as equivalent and cache a response intended for one client for delivery to another. The issue is fixed in Flask 2.2.5 and 2.3.2.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Set-Cookie headers, it can expose one client's Flask session cookie to another client. The resulting impact depends on the application's session design and the proxy's cookie-caching behavior, but may include session hijacking and unauthorized access under the affected user's session.If you can’t patch tonight, do this now.
Set-Cookie headers. Mark relevant responses with restrictive Cache-Control directives, such as private or no-store, as appropriate. Where operationally acceptable, avoid permanent sessions or disable SESSION_REFRESH_EACH_REQUEST.Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
This repository is a Proof of Concept (PoC) for CVE-2023-30861, a vulnerability in Flask applications when used behind a reverse proxy cache (such as nginx) that ignores Set-Cookie headers. The PoC demonstrates how improper session handling between Flask and the proxy can lead to security issues, such as session confusion or bypass. The repository includes a simple Flask app (app/app.py) with login and session functionality, a Dockerfile and docker-compose.yml for easy setup, and an nginx configuration (nginx.conf) that intentionally ignores Set-Cookie headers and caches responses. The test.http file provides example HTTP requests to interact with the app via the nginx proxy on port 8080. The main attack vector is network-based, targeting the HTTP endpoints exposed by the reverse proxy. The PoC is intended for local, educational use only and should not be exposed to the public internet.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
2 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A Flask vulnerability that can disclose a permanent session cookie when the Vary: Cookie response header is missing. Red Hat fixed it in the OpenShift Container Platform 4.13.3 security update.
A Flask vulnerability that may disclose a permanent session cookie because the Vary: Cookie response header is missing.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.