Vulnerabilities in pkg:pypi/fastapi-proxy-lib

PACKAGE
Advisory Summary

GHSA-7vwr-g6pm-9hc8 is a HIGH (CVSS 7.5) cookie leakage between different users vulnerability (General Security Weakness) affecting Fastapi proxy lib libraries in the PyPI ecosystem. The issue involves cookie leakage between different users in fastapi-proxy-lib. Remediation is available by upgrading affected packages to version 0.1.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/fastapi-proxy-lib

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/fastapi-proxy-lib. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-7vwr-g6pm-9hc8 - HIGH Cookie leakage between different users in fastapi-proxy-lib

GHSA-7vwr-g6pm-9hc8 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-7vwr-g6pm-9hc8
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification General Security Weakness
Affected Product Fastapi proxy lib
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-7vwr-g6pm-9hc8

To remediate this vulnerability, upgrade all affected Fastapi proxy lib dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

fastapi-proxy-lib fixed: 0.1.0
pip install fastapi-proxy-lib>=0.1.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show fastapi-proxy-lib

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-7vwr-g6pm-9hc8, inspect your installed packages using pip:

pip show fastapi-proxy-lib

Analyze the terminal output to locate any version of Fastapi proxy lib in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.0), your application is affected.

Note: The pip show fastapi-proxy-lib command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Fastapi proxy lib, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact In the implementation of version `0.0.1`, requests from different user clients are processed using a shared `httpx.AsyncClient`. However, one oversight is that the `httpx.AsyncClient` will persistently store cookies based on the `set-cookie` response header sent by the target server and share these cookies across different user requests. This results in a cookie leakage issue among all user clients sharing the same `httpx.AsyncClient`. ### Patches It's fixed in `0.1.0` ### Workarounds If you insist `0.0.1`: - Do not use `ForwardHttpProxy` at all. - Do not use `ReverseHttpProxy` or `ReverseWebSocketProxy` for any servers that may potentially send a `set-cookie` response. **However, it's best to upgrade to the latest version.** ### References fixed in [#10](https://github.com/WSH032/fastapi-proxy-lib/pull/10)

GHSA-7vwr-g6pm-9hc8 Affected Fastapi proxy lib Versions

1 component(s)
Fixed Versions:
0.1.0
Product / Package Ecosystem Affected Versions Fixed Version
fastapi-proxy-lib
PyPI
< 0.1.0
0.1.0

References

Frequently Asked Questions

What is GHSA-7vwr-g6pm-9hc8?
GHSA-7vwr-g6pm-9hc8 is a security vulnerability in Fastapi proxy lib involving Cookie leakage between different users in fastapi-proxy-lib under General Security Weakness.
Which Fastapi proxy lib versions are affected?
Affected versions include releases prior to 0.1.0 across affected packages: fastapi-proxy-lib.
What version fixes GHSA-7vwr-g6pm-9hc8?
Upgrading to 0.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is fastapi-proxy-lib affected?
Yes, fastapi-proxy-lib is affected in releases prior to 0.1.0. Upgrade your dependency to 0.1.0 or later.
What is the CVSS score of GHSA-7vwr-g6pm-9hc8?
GHSA-7vwr-g6pm-9hc8 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with GHSA-7vwr-g6pm-9hc8?
GHSA-7vwr-g6pm-9hc8 is classified under General Security Weakness.
How can I check PyPI dependencies for GHSA-7vwr-g6pm-9hc8?
Run the dependency tree command: 'pip show fastapi-proxy-lib'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7vwr-g6pm-9hc8",
  "modified" : "2023-12-01T19:23:49Z",
  "published" : "2023-12-01T19:23:49Z",
  "aliases" : [ ],
  "summary" : "Cookie leakage between different users in fastapi-proxy-lib",
  "details" : "### Impact\n\nIn the implementation of version `0.0.1`, requests from different user clients are processed using a shared `httpx.AsyncClient`.\n\nHowever, one oversight is that the `httpx.AsyncClient` will persistently store cookies based on the `set-cookie` response header sent by the target server and share these cookies across different user requests.\n\nThis results in a cookie leakage issue among all user clients sharing the same `httpx.AsyncClient`.\n\n### Patches\n\nIt's fixed in `0.1.0`\n\n### Workarounds\n\nIf you insist `0.0.1`:\n- Do not use `ForwardHttpProxy` at all.\n- Do not use `ReverseHttpProxy` or `ReverseWebSocketProxy` for any servers that may potentially send a `set-cookie` response.\n\n**However, it's best to upgrade to the latest version.**\n\n### References\n\nfixed in [#10](https://github.com/WSH032/fastapi-proxy-lib/pull/10) \n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "fastapi-proxy-lib"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/WSH032/fastapi-proxy-lib/security/advisories/GHSA-7vwr-g6pm-9hc8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/WSH032/fastapi-proxy-lib/pull/10"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/WSH032/fastapi-proxy-lib"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-01T19:23:49Z",
    "nvd_published_at" : null
  }
}