# GHSA-7vwr-g6pm-9hc8: Cookie leakage between different users in fastapi-proxy-lib

- Severity: High 7.5 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2023-12-01T19:23:49.000Z
- Modified: 2024-12-06T05:38:58.654Z

## Description

### 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)

(As written by GitHub Advisory Database.)

## Affected

- fastapi-proxy-lib (PyPI): before 0.1.0

## References

- <https://github.com/WSH032/fastapi-proxy-lib/security/advisories/GHSA-7vwr-g6pm-9hc8> (web)
- <https://github.com/WSH032/fastapi-proxy-lib/pull/10> (web)
- <https://github.com/WSH032/fastapi-proxy-lib> (package)

## Sources

- GitHub Advisory Database: [GHSA-7vwr-g6pm-9hc8](https://github.com/advisories/GHSA-7vwr-g6pm-9hc8), CC-BY-4.0, modified 2024-12-06

---

Page: https://cve.day/GHSA-7vwr-g6pm-9hc8 · Whole record: https://cve.day/GHSA-7vwr-g6pm-9hc8.json · Rebuilt by cve.day 2026-11-25T22:56:34.519Z
