Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Unauthenticated network RPC call with low complexity (PR:N/UI:N/AC:L) discloses sensitive key metadata (C:H) with no integrity or availability impact and no scope change.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
3DescriptionCVE.org
Capgo before 12.128.2 contains an information disclosure vulnerability in the find_apikey_by_value PostgreSQL function marked SECURITY DEFINER and executable by the anon role. Unauthenticated attackers can call this function via the /rest/v1/rpc/find_apikey_by_value endpoint to retrieve sensitive API key metadata including user_id, mode, org scoping, and expiration details when supplied a valid key value.
AnalysisAI
Unauthenticated API key metadata disclosure in Capgo before 12.128.2 stems from the find_apikey_by_value PostgreSQL function being marked SECURITY DEFINER and granted to the anon role, allowing anyone to call it through the PostgREST endpoint /rest/v1/rpc/find_apikey_by_value. When supplied a valid key value, an attacker retrieves sensitive metadata about that key - user_id, mode, organization scoping, and expiration details - bypassing normal row-level security. Reported by VulnCheck with CVSS 4.0 8.7 (High); no public exploit identified at time of analysis and it is not listed in CISA KEV.
Technical ContextAI
Capgo is a live/over-the-air update service for Capacitor mobile apps that uses a Supabase/PostgREST backend, exposing PostgreSQL functions as REST RPC endpoints. In this architecture, functions declared SECURITY DEFINER execute with the privileges of the function owner rather than the caller, deliberately bypassing Row-Level Security; when such a function is also GRANTed EXECUTE to the anon (unauthenticated) role, any internet client can invoke privileged database logic. Here find_apikey_by_value performs a lookup against the api_keys table and returns key metadata, so the SECURITY DEFINER context leaks data that RLS would otherwise protect. This maps to CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor): the root cause is an over-privileged, over-exposed database function, not memory corruption or injection.
RemediationAI
Vendor-released patch: 12.128.2 - upgrade Capgo to 12.128.2 or later, which corrects the exposure of the find_apikey_by_value RPC. As a compensating control before or instead of upgrading, revoke EXECUTE on find_apikey_by_value from the anon (and where appropriate authenticated) role in PostgreSQL, or drop the SECURITY DEFINER attribute so the function runs with caller privileges and RLS applies; the trade-off is that any application flow legitimately relying on anonymous key lookups will break until refactored to a server-side authenticated path. Additionally, restrict network access to the PostgREST /rest/v1/rpc/ endpoint at the gateway/reverse proxy and rotate any API keys whose metadata may have been queried. Follow the remediation guidance in GHSA-2xjq-h43m-592f (https://github.com/Cap-go/capgo/security/advisories/GHSA-2xjq-h43m-592f) and the VulnCheck advisory (https://www.vulncheck.com/advisories/capgo-unauthenticated-api-key-metadata-disclosure-via-security-definer-rpc-function).
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
A vulnerability in the FinanceChatLlamaPack of the run-llama/llama_index repository, versions up to v0.12.3, allows for
Same weakness CWE-200 – Information Exposure
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-43171
GHSA-25wv-52pf-rghh