{"id":"GHSA-7vwr-g6pm-9hc8","aliases":[],"status":"published","title":"Cookie leakage between different users in fastapi-proxy-lib","description":"### 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)","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2023-12-01T19:23:49Z","modified":"2024-12-06T05:38:58Z","fixes":[{"ecosystem":"PyPI","package":"fastapi-proxy-lib","fixed_in":["0.1.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"fastapi-proxy-lib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.0"}]}]},{"source":"osv","ecosystem":"PyPI","package":"fastapi-proxy-lib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.1.0"}]}],"versions":["0.0.1b0"]}],"references":[{"url":"https://github.com/WSH032/fastapi-proxy-lib/security/advisories/GHSA-7vwr-g6pm-9hc8","tags":["web"]},{"url":"https://github.com/WSH032/fastapi-proxy-lib/pull/10","tags":["web"]},{"url":"https://github.com/advisories/GHSA-7vwr-g6pm-9hc8"},{"url":"https://github.com/WSH032/fastapi-proxy-lib","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-7vwr-g6pm-9hc8","title":"Cookie leakage between different users in fastapi-proxy-lib","description":"### 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","status":"published","published":"2023-12-01T19:23:49Z","modified":"2023-12-01T19:23:50Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T14:37:23.843848Z"}],"osv":[{"id":"GHSA-7vwr-g6pm-9hc8","title":"Cookie leakage between different users in fastapi-proxy-lib","description":"### 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","status":"published","published":"2023-12-01T19:23:49Z","modified":"2024-12-06T05:38:58.654295Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T15:46:41.349637Z"}]}}
