Skip to content

← Public intelligence

PyPI package

fastapi-opa

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

1 actionable advisory, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 6.9PyPIAmendedPublished

    OpaMiddleware does not filter HTTP OPTIONS requests

    CVE-2024-40627 · GHSA-5f5c-8rvc-j8wf

    Affected
    • PyPI fastapi-opa < 2.0.1
    Fixed in
    2.0.1· Vendor fix available
    Issue
    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. Details OpaMiddleware allows all HTTP OPTIONS requests without evaluating it against any policy: https://github.com/busykoala/fastapi-opa/blob/6dd6f8c87e908fe080784a74707f016f1422b58a/fastapiopa/opa/opamiddleware.py#L79-L80 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 (CWE-204). PoC This toy application is based on the behaviour of an app[^1] which can use…

    Recommended action: Upgrade to 2.0.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →