Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS03dndyLWc2cG0tOWhjOM4AA3e0
Cookie leakage between different users in fastapi-proxy-lib
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
orReverseWebSocketProxy
for any servers that may potentially send aset-cookie
response.
However, it's best to upgrade to the latest version.
References
fixed in #10
Permalink: https://github.com/advisories/GHSA-7vwr-g6pm-9hc8JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS03dndyLWc2cG0tOWhjOM4AA3e0
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: about 1 year ago
Updated: about 1 year ago
CVSS Score: 7.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Identifiers: GHSA-7vwr-g6pm-9hc8
References:
- https://github.com/WSH032/fastapi-proxy-lib/security/advisories/GHSA-7vwr-g6pm-9hc8
- https://github.com/WSH032/fastapi-proxy-lib/pull/10
- https://github.com/advisories/GHSA-7vwr-g6pm-9hc8
Blast Radius: 1.0
Affected Packages
pypi:fastapi-proxy-lib
Dependent packages: 0Dependent repositories: 0
Downloads: 1,279 last month
Affected Version Ranges: < 0.1.0
Fixed in: 0.1.0
All affected versions:
All unaffected versions: 0.1.0