Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. fastapi-opa
  4. ›
  5. CVE-2024-40627

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

July 15, 2024

HTTP OPTIONS requests are always allowed by OpaMiddleware, even when they lack authentication, and are passed through directly to the application.

The maintainer uncertain whether this should be classed as a “bug” or “security issue” – but is erring on the side of “security issue” as an application could reasonably assume OPA controls apply to all HTTP methods, and it bypasses more sophisticated policies.

References

  • github.com/advisories/GHSA-5f5c-8rvc-j8wf
  • github.com/busykoala/fastapi-opa
  • github.com/busykoala/fastapi-opa/blob/6dd6f8c87e908fe080784a74707f016f1422b58a/fastapi_opa/opa/opa_middleware.py
  • github.com/busykoala/fastapi-opa/commit/9458845a6f6f414c0b79587fae83d7f14d74dfb4
  • github.com/busykoala/fastapi-opa/security/advisories/GHSA-5f5c-8rvc-j8wf
  • nvd.nist.gov/vuln/detail/CVE-2024-40627

Code Behaviors & Features

Detect and mitigate CVE-2024-40627 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.0.1

Fixed versions

  • 2.0.1

Solution

Upgrade to version 2.0.1 or above.

Impact 5.8 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-204: Observable Response Discrepancy

Source file

pypi/fastapi-opa/CVE-2024-40627.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:04 +0000.