5.8
MEDIUM CVSS 3.1
CVE-2024-40627
OpaMiddleware does not filter HTTP OPTIONS requests
Description

Fastapi OPA is an opensource fastapi middleware which includes auth flow. HTTP `OPTIONS` requests are always allowed by `OpaMiddleware`, even when they lack authentication, and are passed through directly to the application. `OpaMiddleware` allows all HTTP `OPTIONS` requests without evaluating it against any policy. 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 issue has been addressed in release version 2.0.1. All users are advised to upgrade. There are no known workarounds for this vulnerability.

INFO

Published Date :

July 15, 2024, 8:15 p.m.

Last Modified :

April 15, 2026, 12:35 a.m.

Remotely Exploit :

Yes !
Affected Products

The following products are affected by CVE-2024-40627 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

No affected product recoded yet

CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 MEDIUM [email protected]
Solution
Upgrade FastAPI OPA middleware to version 2.0.1 or later.
  • Upgrade FastAPI OPA middleware to version 2.0.1.
  • Apply necessary updates to affected systems.
Public PoC/Exploit Available at Github

CVE-2024-40627 has a 1 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2024-40627 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2024-40627 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

CVE-Reproducer-System :一个基于大模型的漏打智能复现系统,采用五阶段流水线结构:CVE信息收集,RAG证据增强融合,环境配置生成,PoC代码生成,Validator容器化执行确认即迭代修复,此处公开了部分测试生成结果

Shell Python

Updated: 16 hours, 9 minutes ago
0 stars 0 fork 0 watcher
Born at : May 2, 2026, 9:16 a.m. This repo has been linked 41 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2024-40627 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2024-40627 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/busykoala/fastapi-opa/blob/6dd6f8c87e908fe080784a74707f016f1422b58a/fastapi_opa/opa/opa_middleware.py#L79-L80
    Added Reference https://github.com/busykoala/fastapi-opa/commit/9588109ff651f7ffc92687129c4956126443fb8c
    Added Reference https://github.com/busykoala/fastapi-opa/security/advisories/GHSA-5f5c-8rvc-j8wf
  • CVE Received by [email protected]

    Jul. 15, 2024

    Action Type Old Value New Value
    Added Description Fastapi OPA is an opensource fastapi middleware which includes auth flow. HTTP `OPTIONS` requests are always allowed by `OpaMiddleware`, even when they lack authentication, and are passed through directly to the application. `OpaMiddleware` allows all HTTP `OPTIONS` requests without evaluating it against any policy. 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 issue has been addressed in release version 2.0.1. All users are advised to upgrade. There are no known workarounds for this vulnerability.
    Added Reference GitHub, Inc. https://github.com/busykoala/fastapi-opa/security/advisories/GHSA-5f5c-8rvc-j8wf [No types assigned]
    Added Reference GitHub, Inc. https://github.com/busykoala/fastapi-opa/commit/9588109ff651f7ffc92687129c4956126443fb8c [No types assigned]
    Added Reference GitHub, Inc. https://github.com/busykoala/fastapi-opa/blob/6dd6f8c87e908fe080784a74707f016f1422b58a/fastapi_opa/opa/opa_middleware.py#L79-L80 [No types assigned]
    Added CWE GitHub, Inc. CWE-204
    Added CVSS V3.1 GitHub, Inc. AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.