CVE-2024-40627
Python vulnerability analysis and mitigation

Overview

Fastapi OPA is an opensource fastapi middleware which includes auth flow. The vulnerability (CVE-2024-40627) was discovered where HTTP OPTIONS requests are always allowed by OpaMiddleware, even when they lack authentication, and are passed through directly to the application. The issue affects versions up to and including 2.0.0 and has been fixed in version 2.0.1. The vulnerability was discovered and disclosed on July 15, 2024 (GitHub Advisory).

Technical details

The vulnerability exists in the OpaMiddleware component where it allows all HTTP OPTIONS requests without evaluating them against any policy. The issue stems from a code section that explicitly bypasses authentication checks for OPTIONS requests. The vulnerability has been assigned a CVSS v3.1 base score of 5.8 (Medium) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N, indicating it can be exploited remotely without requiring privileges or user interaction (GitHub Advisory).

Impact

If an application provides different responses to HTTP OPTIONS requests based on an entity existing (such as to indicate whether an entity is writable on a system level), an unauthenticated attacker could discover which entities exist within an application. This could lead to information disclosure and potential enumeration of system resources (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in version 2.0.1 of fastapi-opa. Users are advised to upgrade to this version or later. There are no known workarounds for this vulnerability other than upgrading to the patched version (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-65896CRITICAL9.8
  • PythonPython
  • asyncmy
NoNoDec 02, 2025
CVE-2025-66423HIGH7.1
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-66454MEDIUM6.5
  • PythonPython
  • arcade-mcp-server
NoYesDec 02, 2025
CVE-2025-66424MEDIUM6.5
  • PythonPython
  • trytond
NoYesNov 30, 2025
CVE-2025-65858LOW3.5
  • PythonPython
  • calibreweb
NoNoDec 02, 2025

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

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