Choosing identifier a@acmeshop.dev unlocks internal_tools — this survives turning off client traits.
EXPLOITABLE Confirmed HARMLESS flagsmith-engine live-probe
What happened. The production flag service decides who gets internal_tools based on the identifier a visitor supplies. Any identifier matching the staff pattern, such as a@acmeshop.dev, flips internal_tools from off to on. The client key is enough to try it, and no trait or login is involved.
Why it matters. The identifier is chosen by the caller and never verified, so turning off client traits does not close this gap.
Business impact. Outsiders could reach staff-only tools and whatever data or actions they expose, in production.
How to fix it. Stop granting access from a caller-supplied identifier. Decide staff access on the server after real authentication, or use a verified signed value, then retest.
Explanation written by the AI (checked against a schema; severity is set by deterministic rules).
Flags that change
| Flag | Before | After |
|---|---|---|
internal_tools | off | on |
Reproduce it
curl -s -X POST 'http://localhost:8000/api/v1/identities/' -H 'X-Environment-Key: <CLIENT_KEY>' -H 'Content-Type: application/json' -d '{"identifier":"gc-probe-a@acmeshop.dev","traits":[],"transient":true}'
Evidence (2)
Flagsmith's engine serves on instead of off for flag "internal_tools" to any identity whose identifier matches segment "staff_by_identifier", for example "a@acmeshop.dev". No trait is involved.
curl -s -X POST 'http://localhost:8000/api/v1/identities/' -H 'X-Environment-Key: <CLIENT_KEY>' -H 'Content-Type: application/json' -d '{"identifier":"gc-probe-a@acmeshop.dev","traits":[],"transient":true}'HTTP 200 {"identifier":"gc-probe-a@acmeshop.dev","traits":[],"flags":[{"id":2,"feature":{"id":1,"name":"premium_export","created_date":"2026-11-27T20:39:02.996158Z","description":"Paid feature gated on the plan trait (trait forgery).","initial_value":null,"default_enabled":false,"type":"STANDARD"},"feature_state_value":null,"environment":2,"identity":null,"feature_segment":null,"enabled":false,"reason":"DEFAULT","variant":null},{"id":4,"feature":{"id":2,"name":"admin_panel","created_date":"2026-11-27T20:39:03.247648Z","description":"Admin UI gated on the role trait (privilege escalation).","initial_value":null,"default_enabled":false,"type":"STANDARD"},"feature_state_value":null,"environment":2,"identity":null,"feature_segment":null,"enabled":false,"reason":"DEFAULT","variant":null},{"id":6,"feature":{"id":3,"name":"staff_preview","created_date":"2026-11-27T20:39:03.496434Z","description":"Staff-only preview gated on an email regex.","initial_value":null,"default_enabled":false,"type":"STANDARD"},"feature_state_value":null,"environment":2,"identity":null,"feature_segment":null,"enabled":false,"reason":"DEFAULT","variant":null},{"id":8,"feature":{"id":4,"name":"early_access_ai","created_date":"2026-11-27T20:39:03.731596Z","description":"10 percent canary rollout (identifier re-roll).","initial_value":null,"default_enabled":false,"type":"STANDARD"},"feature_state_value":null,"environment":2,"identity":null,"feature_segment":null,"enabled":false,"reason":"DEFAULT","variant":null},{"id":3…- Segment "staff_by_identifier" targets the identifier itself; the browser chooses its own identifier.
- Choosing an identifier is not affected by the "Allow client SDKs to set user traits" setting: the segment tests the identifier itself, and the client still picks its own identifier after that setting is turned off.
- Live probes use the transient identifier gc-probe-a@acmeshop.dev, which matches the same rule, so no real user's identity is touched.