GHSA-875C-3V5J-4WH2
Full-text BM25 statistics ignore bucket access control: hidden subtype documents are countable through EXPLAIN/PROFILE, and restricted users fail their first search
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-875C-3V5J-4WH2 divulgada | |
| Remediación | Parche 26.11.1 | com.arcadedb:arcadedb-engine · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Full-text BM25 corpus statistics ignore record-level access control. A user who cannot read a subtype's buckets can learn how many documents of that hidden subtype exist, and how many of them contain any term the user chooses, through the `totalDocs` and per-term `df` values that EXPLAIN/PROFILE of a full-text query report. The same root cause also makes the first full-text search after open fail with `SecurityException` for such a user.
Details
`LSMTreeFullTextIndex` keeps type-wide corpus counters (document count N, average document length, per-term document frequency df) for BM25 scoring. They are computed over every bucket of the indexed type including its subtypes, regardless of the querying user's permissions.
- Information disclosure (main issue). `FullTextSearch` builds the scoring context from those type-wide counters and EXPLAIN/PROFILE print them (`engine/src/main/java/com/arcadedb/index/fulltext/FullTextSearch.java`, the `.put("totalDocs", ...)` and `.put("df", df)` lines near 354 and 371 on `main`). A user whose group grants access to `Asset` but no access to its subtype `Image` sees `totalDocs` and `df` computed over `Asset` and `Image` documents. By issuing a full-text query for a chosen term and reading `df`, the user can count the hidden `Image` documents that contain that term, which reveals the existence and approximate content of records the user is not allowed to read. The relevance scores of the documents the user can read are also influenced by the hidden documents.
- Denial of service for restricted users. Once per session the index validates its persisted counters with a live document count: `LSMTreeFullTextIndex` sums `bucket.count()` over every corpus bucket (near line 923 on `main`). `LocalBucket.count()` checks `READ_RECORD` on the bucket (`database.checkPermissionsOnFile(fileId, READ_RECORD)`), so when the first full-text search after open is issued by a user who cannot read one of the subtype buckets, the query fails with `SecurityException`. The once-per-session check is claimed before the exception, so with cold counters every search by that user keeps failing until a user with full access searches.
Proof of concept
- Create `Asset` and `Image EXTENDS Asset`, a `title STRING` property on `Asset`, and a FULL_TEXT index on `Asset.title`.
- Insert documents into both types, some `Image` titles containing a rare word, e.g. `confidential`.
- Create a group with `"*"` access and no access (`[]`) to `Image`, and a user in that group.
- Restart the database. As the restricted user, run `SELECT FROM Asset WHERE search_fields(['title'], 'x')`: it throws `SecurityException` (effect 2).
- Let a user with full access run any full-text query once, then as the restricted user run `PROFILE SELECT FROM Asset WHERE search_fields(['title'], 'confidential')`: the reported `df` for `confidential` counts the hidden `Image` documents, and `totalDocs` includes all `Image` documents (effect 1).
Impact
Low to moderate. An authenticated user with read access to a supertype but not to one of its subtypes can infer the number of hidden documents and probe them term by term. No record content is returned directly. Deployments that use per-type bucket permissions to hide subtypes from some users are affected.
Suggested fix
- Compute the live-count validation without the per-user permission check (an internal count of the corpus, as the counters themselves are an internal statistic), so the counters no longer fail for restricted users.
- Do not expose corpus-wide `totalDocs`/`df` in EXPLAIN/PROFILE to a user who cannot read every bucket of the corpus (omit them, or report them only for readable buckets), and consider scoring restricted users against statistics of the buckets they can read.
Found during internal work on a new feature; not yet reported elsewhere.
Related advisories
This issue is tracked together with GHSA-vpxw-wqc5-hvvj https://github.com/ArcadeData/arcadedb/security/advisories/GHSA-vpxw-wqc5-hvvj, which carries the CVE identifier for the group.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
mavencom.arcadedb:arcadedb-engine |
Corregida | 26.11.1 | 0 d | 26.11.1 no afectada |
26.11.1Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/ArcadeData/arcadedb/security/advisories/GHSA-875c-3v5j-4wh2Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
