Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2023-30861: Flask permanent session cookie disclosure through shared caching

Published May 2, 2023 · Updated 7 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days1 mention · peak 1 in a dayToday
CVSS7.5High · v3.1
EPSS1.3%70th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
Palletsprojects
IdentifiersCVE-2023-30861CWE-524

CVE-2023-30861 is an information disclosure vulnerability in Flask's session refresh handling. Vulnerable releases set the Vary: Cookie response header when a session is accessed or modified, but omit it when a permanent session is refreshed without being accessed or modified. Under specific application and proxy configurations, a shared caching proxy can consequently serve a response intended for one client to another. If the proxy also caches and replays Set-Cookie headers, it can disclose the first client's session cookie. The issue is fixed in Flask 2.2.5 and 2.3.2.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Cross-client disclosure of cached response data and, when Set-Cookie headers are cached, permanent session cookies. A disclosed cookie may permit session impersonation or unauthorized access to session-associated data, depending on how the application uses sessions. Severity depends on application behavior and the proxy's handling of cookies; arbitrary code execution and availability impacts are not established.

Mitigation

If you can’t patch tonight, do this now.

Until patched, prevent shared caching of session-bearing or personalized responses by setting Cache-Control: private or no-store and configuring upstream proxies not to cache such responses, including responses containing Set-Cookie. Where application requirements permit, avoid permanent sessions or disable SESSION_REFRESH_EACH_REQUEST. Suppressing cached Set-Cookie headers alone does not prevent disclosure of a cached response body.

Remediation

Patch, then assume compromise.

Upgrade Flask to a fixed release: 2.2.5 for the 2.2.x branch, 2.3.2 for the 2.3.x branch, or a later supported release containing the fix. For vendor-managed deployments, install the corresponding vendor security updates. OpenShift Container Platform fixes were included in releases 4.12.21 and 4.13.3.

Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
PalletsprojectsFlaskapplication
FAQ

Frequently asked questions

Is CVE-2023-30861 exploited in the wild?
As of Nov 18, 2026, Mallory has no reports of CVE-2023-30861 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2023-30861?
Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2023-30861, the earliest disclosed Apr 25, 2025.
Is there a patch for CVE-2023-30861?
Upgrade Flask to a fixed release: 2.2.5 for the 2.2.x branch, 2.3.2 for the 2.3.x branch, or a later supported release containing the fix. For vendor-managed deployments, install the corresponding vendor security updates.
What products are affected by CVE-2023-30861?
Palletsprojects Flask.
How severe is CVE-2023-30861?
CVE-2023-30861 has a CVSS v3.1 score of 7.5 (High) and an EPSS score of 1.3% (70th percentile) as of Nov 18, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.