Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@flags-sdk/flagsmith

Latest version: v2.0.0

Overview

Last scanned
24 Sep 2026
Published
24 Sep 2026
npm package Publisher: vercel-release-bot
623 Stars
87 Forks
1 Versions
1.8K Downloads
TypeScript Repo language

Scan summary

@flags-sdk/flagsmith was last scanned on 24 Sep 2026 at version 2.0.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 24 Sep 2026.
  • Findings: No rules fired in version 2.0.0.
  • Downloads: 1,773 downloads.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
2.0.0 LATEST 24 Sep 2026 No rules fired

No rules fired in 2.0.0

Findings

Findings for v2.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 2.0.0; other versions have their own rules, not their own score.

Known vulnerabilities

1 CVE · last 24 Sep 2026

0 CRITICAL 0 HIGH 1 MEDIUM 0 LOW

Versions

  • ≥ 2.0.0
  • < 2.0.0 1 MEDIUM

Vulnerabilities

  • GHSA-8X46-P23F-WQR2 Medium 24 Sep 2026 Cross-request flag-state leakage in @flags-sdk/flagsmith Fixed in 2.0.0

README

The publisher’s own README, as collected from the registry.

Flags SDK - Flagsmith Provider

The Flagsmith provider for the Flags SDK contains support for Flagsmith's Feature Flags and Remote Configuration.

Setup

The Flagsmith provider is available in the @flags-sdk/flagsmith module. You can install it with

npm i @flags-sdk/flagsmith

Set the required environment variable:

export FLAGSMITH_ENVIRONMENT_KEY="your-server-side-environment-key"

Usage

The Flagsmith adapter provides a getValue() method with optional type coercion:

import { flag } from "flags/next";
import { flagsmithAdapter } from "@flags-sdk/flagsmith";

// No coercion - returns the raw value from Flagsmith
export const rawFlag = flag({
  key: "raw-value",
  defaultValue: "default",
  adapter: flagsmithAdapter.getValue(),
});

// Coerce to string type
export const buttonColor = flag<string>({
  key: "button-color",
  defaultValue: "blue",
  adapter: flagsmithAdapter.getValue({ coerce: "string" }),
});

// Coerce to number type
export const maxItems = flag<number>({
  key: "max-items",
  defaultValue: 10,
  adapter: flagsmithAdapter.getValue({ coerce: "number" }),
});

// Coerce to boolean type
export const showBanner = flag<boolean>({
  key: "show-banner",
  defaultValue: false,
  adapter: flagsmithAdapter.getValue({ coerce: "boolean" }),
});
Type Coercion Behavior
  • Without coerce: Returns the raw value from Flagsmith (empty/null/undefined values return default)
  • coerce: "string": Converts any value to string (returns default for null/undefined/NaN)
  • coerce: "number": Converts strings to numbers (returns default if result is NaN or invalid)
  • coerce: "boolean":
    • Converts "true"/"false" strings (case-insensitive) to boolean
    • Converts 0 to false and 1 to true
    • Falls back to the flag's enabled state for other values
    • Returns default when flag is disabled

Custom Adapter

Create a custom adapter by using the createFlagsmithAdapter function:

import { createFlagsmithAdapter, EntitiesType } from "@flags-sdk/flagsmith";

const identify: Identify<EntitiesType> = dedupe(async () => {
  return {
    targetingKey: "user",
    traits: {
      id: "e23cc9a8-0287-40aa-8500-6802df91e56a",
      name: "John Doe",
      email: "johndoe@flagsmith.com",
    },
  };
});

const adapter = createFlagsmithAdapter({
  environmentKey: "your-server-side-environment-key",
  // Additional @flagsmith/nodejs configuration options
});

export const showBanner = flag<boolean, EntitiesType>({
  key: "show-banner",
  identify,
  adapter: adapter.getValue({ coerce: "boolean" }),
});

Flags Discovery Endpoint

To enable the Flags Explorer, create a discovery endpoint at app/.well-known/vercel/flags/route.ts:

import { createFlagsDiscoveryEndpoint } from "flags/next";
import { getProviderData } from "@flags-sdk/flagsmith";

export const GET = createFlagsDiscoveryEndpoint(async () => {
  return getProviderData({
    environmentKey: process.env.FLAGSMITH_ENVIRONMENT_KEY,
    projectId: process.env.FLAGSMITH_PROJECT_ID,
  });
});

This endpoint fetches flag definitions directly from Flagsmith's API and returns them to the Flags Explorer.

Environment Variables

  • FLAGSMITH_ENVIRONMENT_KEY (required): Your Flagsmith server-side environment key
  • FLAGSMITH_PROJECT_ID (optional): Required for the Flags Discovery Endpoint

Documentation

Please check out the Flagsmith provider documentation for more information.

License

MIT

Server-side evaluation

The adapter uses @flagsmith/nodejs and requires a Node.js runtime. Remote evaluation is the default, suitable for serverless deployments: it fetches evaluated flags from Flagsmith without downloading an environment document or starting background polling. Set FLAGSMITH_ENVIRONMENT_KEY to your Flagsmith environment key and keep it on the server.

One client is shared per adapter. Use evaluate([flagA, flagB]) from flags/next to batch flags: the Flags SDK groups flags by adapter and identify function, and the adapter fetches all values once per batch. Different coercion modes form separate batches to preserve their value types. Individual flag calls use decide() and do not share an adapter-level result cache. User identities are passed to getIdentityFlags rather than stored as the client's current user. Remote identity evaluation persists supplied traits in Flagsmith.

For a long-running server, opt into local evaluation with one option:

const adapter = createFlagsmithAdapter({
  environmentKey: process.env.FLAGSMITH_ENVIRONMENT_KEY,
  enableLocalEvaluation: true,
});

Local evaluation requires a server-side environment key (starting with ser.). It downloads the environment document and polls for updates every 60 seconds. Each new client must initialize this document, so prefer remote evaluation for short-lived serverless instances. Set environmentRefreshIntervalSeconds to change the refresh interval and call await adapter.close() on shutdown to stop polling. The default flagsmithAdapter also exposes close().

Local evaluation does not persist supplied traits to the Flagsmith API. However, @flagsmith/nodejs 9.0.3 may retain previously supplied traits for identities with overrides, even when later evaluations of the same identity omit those traits. For example, evaluating an identity with { tier: "gold" } and then with {} may still use tier: "gold" on the second evaluation.

Migration from the JavaScript SDK adapter
  • Replace client-side environment keys with server-side keys for local evaluation.
  • Use environmentKey instead of environmentID in custom configuration. environmentID is no longer supported.
  • Use server SDK options such as apiUrl instead of api. Browser SDK options such as cacheFlags, state, and onChange are no longer supported.
  • Pass user identity and traits through the flag's identify function.
  • Remote evaluation remains the default. Set enableLocalEvaluation: true to opt into local evaluation on a long-running server.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @flags-sdk/flagsmith

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229