Summary
neotoma has tenant isolation gap in relationship query endpoints
The /list_relationships and /retrieve_graph_neighborhood endpoints call getAuthenticatedUserId (confirming a valid session exists) but do not pass the resolved user ID into the Supabase query as an .eq("user_id", userId) filter. As a result, queries return rows from all users rather than scoping to the authenticated caller's data.
Affected code
/list_relationships (src/actions.ts):
- Calls
getAuthenticatedUserIdbut does not apply.eq("user_id", userId)to the relationships query - Uses
.or()string interpolation for entity ID matching without input validation
/retrieve_graph_neighborhood (src/actions.ts):
- Same pattern: auth resolved, user ID not applied to query filter
Affected versions
v0.13.0
Prerequisites
- A valid authentication token for the Neotoma instance (attacker must have a legitimate account on the same instance)
- A known entity ID belonging to another user (~96 bits of entropy, brute-force not practical)
An unauthenticated caller is rejected at the auth middleware layer. The gap requires a second user account on the instance.
Severity
Low under current conditions, no multi-tenant deployments exist. Escalates to Medium the moment two or more user accounts share an instance.
Impact
An authenticated user with a known cross-user entity ID can retrieve relationship edges and graph neighborhood data belonging to another user. No write capability is exposed.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
- Add
.eq("user_id", userId)to all Supabase queries in both handlers - Validate entity ID inputs with
isNeotomaEntityIdbefore query construction - Replace
.or()string interpolation with separate scoped.eq()calls
Fix tracked in #365 (list_relationships) and #366 (retrieve_graph_neighborhood). Gate gap tracked in #372.
Frequently Asked Questions
- What is GHSA-WRR4-782V-JHWH? GHSA-WRR4-782V-JHWH is a low-severity security vulnerability in neotoma (npm), affecting versions >= 0.13.0, < 0.14.0. It is fixed in 0.14.0.
- Which versions of neotoma are affected by GHSA-WRR4-782V-JHWH? neotoma (npm) versions >= 0.13.0, < 0.14.0 is affected.
- Is there a fix for GHSA-WRR4-782V-JHWH? Yes. GHSA-WRR4-782V-JHWH is fixed in 0.14.0. Upgrade to this version or later.
- Is GHSA-WRR4-782V-JHWH exploitable, and should I be worried? Whether GHSA-WRR4-782V-JHWH is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-WRR4-782V-JHWH is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-WRR4-782V-JHWH? Upgrade
neotomato 0.14.0 or later.