CVEfocus › CVE database › CVE-2024-40627

CVE-2024-40627OpaMiddleware does not filter HTTP OPTIONS requests

CVSS 5.8 MediumEPSS 0.9% (higher than 56% of CVEs)Published 2024-07-15Updated 2024-08-02Assigner: GitHub_M

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.

CWE-204

What to do

Fixed builds are available from PyPI: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
1Fix pending
3Under investigation
1Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10fastapiFix pendingUBUNTU-CVE-2024-40627
Ubuntu 26.04fastapiUnder investigationUBUNTU-CVE-2024-40627
Ubuntu 25.10fastapiWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2024-40627
Ubuntu 24.04fastapiUnder investigationUBUNTU-CVE-2024-40627
Ubuntu 22.04fastapiUnder investigationUBUNTU-CVE-2024-40627
PyPI libraryfastapi-opaFixed2.0.1PYSEC-2026-1361

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.