# GHSA-8X46-P23F-WQR2: Cross-request flag-state leakage in @flags-sdk/flagsmith

- Database: GitHub
- Severity: medium (stated by ghsa, no CVSS score)
- Published: 2026-09-24
- Modified: 2026-09-24

## Affected versions

- @flags-sdk/flagsmith (npm): fixed in 2.0.0

## Description

### Impact

A cross-request flag-state leak affects server-side applications using `@flags-sdk/flagsmith` versions **1.0.0 and 1.0.1** to evaluate user-specific flags.

The adapter shares a mutable Flagsmith SDK client across requests. After evaluating flags for an identified user, subsequent anonymous requests can receive that user’s flag values. Concurrent requests for different users can also interfere with one another.

This can expose user-specific flag values or configuration and cause applications to serve features or behavior intended for another user. The impact depends on how the application uses those values. Applications that exclusively evaluate environment-level flags without user identification are not affected by this cross-user scenario.

### Patches

This issue is fixed in **`@flags-sdk/flagsmith@2.0.0`**.

Versions 1.0.0 and 1.0.1 reused the `flagsmith` package’s mutable singleton across server requests. Version 2.0.0 replaces that integration with `@flagsmith/nodejs`, which accepts identity and traits per evaluation rather than storing a shared current user.

Upgrade to version 2.0.0 and follow the [migration instructions in the release notes](https://github.com/vercel/flags/releases/tag/%40flags-sdk%2Fflagsmith%402.0.0). This is a major release with breaking configuration changes.

### Workarounds

Creating another `createFlagsmithAdapter()` instance alone does **not** isolate the underlying singleton. Returning an empty identity or calling `logout()` on the shared client is also insufficient to protect against concurrent requests.

### References

- [`@flags-sdk/flagsmith` v2 release notes](https://github.com/vercel/flags/releases/tag/%40flags-sdk%2Fflagsmith%402.0.0)
- [Flagsmith documentation: per-request instance isolation for SSR](https://docs.flagsmith.com/integrating-with-flagsmith/sdks/client-side-sdks/nextjs-and-ssr#example-ssr-without-nextjs)

## References

- https://github.com/vercel/flags/security/advisories/GHSA-8x46-p23f-wqr2

Page: https://cve.now/GHSA-8X46-P23F-WQR2

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
