CVE-2026-41255: 
Python vulnerability analysis and mitigation

Overview

CVE-2026-41255 is a Cross-Site Request Forgery (CSRF) protection bypass vulnerability in CKAN, the open-source data management platform maintained by the Open Knowledge Foundation (okfn). The flaw allows unauthenticated requests to permanently exempt protected endpoints from CSRF validation for the lifetime of a server worker process, enabling subsequent CSRF attacks against authenticated users. It affects CKAN versions >= 2.10.0 and < 2.10.10, and >= 2.11.0 and <= 2.11.4. Disclosed on April 29, 2026, it carries a CVSS v3.1 base score of 6.1 (Medium) (GitHub Advisory, CKAN Advisory).

Technical details

The root cause (CWE-352) lies in how CKAN's Flask middleware handles CSRF exemptions at runtime. The flask-wtf.csrf.CSRFProtect() object stores exemption state as a module-level variable in ckan/config/middleware/flask_app.py; this API was designed for static, decorator-based configuration, not per-request mutation. When an unauthenticated or token-authenticated request reaches a protected endpoint (e.g., user.sysadmin in ckan/views/user.py), CKAN's anonymous fallback path calls csrf.exempt() on the resolved view, writing the exemption into global application state. This exemption then persists for all subsequent requests handled by the same worker process (e.g., a single uWSGI worker), meaning any authenticated user hitting that endpoint afterward is no longer protected by CSRF validation. The vulnerability was discovered and reported by Shirsendu Mondal (University of North Carolina at Pembroke) (GitHub Advisory, Reporter Advisory).

Impact

Successful exploitation allows an attacker to bypass CSRF protections on sensitive POST endpoints for the duration of a server worker's lifetime, enabling state-changing actions to be performed using an authenticated victim's session credentials without their knowledge. The demonstrated impact includes privilege escalation (e.g., granting sysadmin rights) and other account-impacting actions when combined with an XSS delivery mechanism. Confidentiality and integrity are both partially compromised, while availability is unaffected (GitHub Advisory, Reporter Advisory).

Exploitability

No public exploit code or in-the-wild exploitation has been reported as of the time of writing. The EPSS score is approximately 0.014% (0th percentile), indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires user interaction (a victim must visit a page or trigger a request) and is most practical when chained with an XSS vulnerability to deliver the CSRF payload (GitHub Advisory, Feedly).

Exploitation steps

  1. Reconnaissance: Identify a publicly accessible CKAN instance running a vulnerable version (>= 2.10.0 < 2.10.10, or >= 2.11.0 <= 2.11.4) by checking the CKAN version endpoint or changelog pages.
  2. Prime the CSRF exemption: Send an unauthenticated HTTP request to a sensitive, CSRF-protected endpoint (e.g., the user.sysadmin view). This triggers CKAN's anonymous fallback path, which calls csrf.exempt() on the view and stores the exemption in global application state for that worker process.
  3. Verify exemption persistence: Confirm the exemption is active by sending a follow-up POST request without a CSRF token to the same endpoint and observing that it is not rejected.
  4. Deliver CSRF payload to victim: Using a separate XSS vulnerability or social engineering, cause an authenticated victim (ideally a sysadmin) to submit a crafted POST request to the now-exempted endpoint — for example, a form that grants sysadmin privileges to an attacker-controlled account — without requiring a valid CSRF token.
  5. Achieve objective: The server processes the forged request under the victim's session, completing the privilege escalation or other targeted action (GitHub Advisory, Reporter Advisory).

Indicators of compromise

  • Logs: Web server or application logs showing unauthenticated (no session cookie) or token-authenticated GET/POST requests to sensitive CKAN endpoints such as /user/sysadmin or similar admin views, particularly from unexpected IP addresses.
  • Logs: Subsequent POST requests to the same sensitive endpoints lacking a valid CSRF token that are accepted without error (HTTP 200 or redirect rather than 403).
  • Logs: Unexpected privilege changes in CKAN audit logs, such as a user account being granted sysadmin status without an administrator initiating the action.
  • Network: Unusual cross-origin POST requests to CKAN admin endpoints originating from non-administrative user sessions, potentially indicating a CSRF payload delivery.

Mitigation and workarounds

CKAN has released patched versions 2.10.10 and 2.11.5, both published on April 29, 2026. Administrators should upgrade to these versions immediately. As a temporary workaround, restarting worker processes (e.g., uWSGI workers) clears the in-memory exemption state, though this does not prevent re-priming. Restricting unauthenticated access to sensitive endpoints at the network or reverse-proxy level can reduce the attack surface until patching is complete (GitHub Advisory, CKAN 2.10 Changelog, CKAN 2.11 Changelog).

Community reactions

A technical blog post analyzing the vulnerability was published at infinitsec.net shortly after disclosure, titled "CVE-2026-41255: CKAN CSRF Exemption Primed by Anonymous Requests," providing additional context on the attack mechanics (Feedly). The original reporter, Shirsendu Mondal, published a detailed advisory repository including technical analysis, impact assessment, and remediation guidance (Reporter Advisory). No significant broader media coverage or notable vendor statements beyond the official CKAN security advisory have been identified.

Additional resources


Source: This report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-3r6w-7pcg-c4x2HIGH7.5
  • Python logoPython
  • ag2
NoYesNov 22, 2026
GHSA-xx4q-fj82-qjp5MEDIUM6.5
  • Python logoPython
  • libp2p
NoNoNov 22, 2026
GHSA-224h-jmfq-qc67MEDIUM5.9
  • Python logoPython
  • ag2
NoYesNov 22, 2026
GHSA-8r36-g3rm-mf85MEDIUMN/A
  • Python logoPython
  • pymaxim
NoYesNov 22, 2026
GHSA-7xgg-5cm6-g46fMEDIUMN/A
  • Python logoPython
  • pymaxim
NoYesNov 22, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management