Found during a routine audit of main at 0d9d8ce189
Description
Found during a routine audit of main at 0d9d8ce189. Reported privately per SECURITY.md.
Scoped honestly up front: this discloses AGGREGATE COUNTS ONLY, not type contents or record data, so it is an information disclosure across the per-type ACL boundary and not an escalation. It is a code reading, not a run; we did not drive a gRPC client against it.
ArcadeDbGrpcAdminService.getDatabaseInfo reads the schema and counts the records of every type without binding the authenticated principal, which is the shape the sibling handler's own comment forbids
SEVERITY: LOW to MEDIUM (aggregate information disclosure across a per-type ACL boundary)
The neighbouring handler in the same file states the rule and the reason:
// This reproduces the ACCESS-CONTROL half of checkAuthorizationOnDatabase and not its other half, // which binds the authenticated principal onto the database's DatabaseContext so the engine's // per-type ACL layer enforces (GHSA-c23x-pqcj-7hfm). Safe here, and only here, because progress is // answered from the OperationProgressRegistry: no database is opened, no record or type is read, so // there is no per-type decision for a bound principal to inform. DO NOT copy this shape into a gRPC // handler that touches data - that handler needs the binding too, or it reopens that advisory.
grpcw/src/main/java/com/arcadedb/server/grpc/ArcadeDbGrpcAdminService.java:428-441 (getProgress).
getDatabaseInfo, lines 340-396 of the same file (declared at line 340), has exactly that shape and does touch data: it opens the database (line 357, getDatabaseForClient), reads Schema.getTypes() and Schema.getIndexes(), and counts the records of every type through approximateRecordCount/LocalDatabase.countType. Its only gate is user.canAccessToDatabase(name) at line 350. There is no DatabaseUserContext.runAs and no DatabaseContext.setCurrentUser anywhere in the file; a grep for both names across grpcw/src/main returns only ArcadeDbGrpcService:5830 and :6308, both in the data plane service.
Why that matters, in the data plane service's own words (grpcw/src/main/java/com/arcadedb/server/grpc/ArcadeDbGrpcService.java:6282-6296 (lines 6291-6292)): the engine's per-user gates "are deliberate no-ops when no user is bound ... A command-executing thread that never binds therefore runs entirely ungated (GHSA-p29f-345w-4qwf)".
Consequence, scoped honestly: the response carries aggregate numbers only (classes, indexes, records, graph/document), not type names or record contents. So an account granted a database but restricted by a per-type read ACL learns the total record count and type count including the types it may not read. For a TIMESERIES type the gap is explicit, since LocalTimeSeriesType.requireEngine(ACCESS) exists precisely to apply the per-type check that countType would otherwise skip, and nothing here is in a position to apply it. This is an information disclosure across the ACL boundary, not an escalation: no handler in this file writes through the unbound context.
Fix: wrap the body of getDatabaseInfo in DatabaseUserContext.runAs for the authenticated principal, as SchemaInfo and the HTTP handlers do. Note that this alone is not enough, because the four catch(Throwable ignore) blocks documented in the third finding above would then convert each per-type refusal into a silently smaller number. Both have to change together.
Guarantee: the invariant is that no gRPC handler reaches a database without a bound principal. The structural change is to make the binding the only way to get a Database in this service, that is, to replace the openDatabase(name) helper at lines 1478-1480 with one that returns the database only inside a runAs scope, so a handler that wants a database cannot obtain an unbound one. The census test should enumerate the service's RPC methods by reflection over the generated base class and assert that each one that resolves a database does so through that helper, rather than checking a hand-written list of handler names.
Reproduction status: not executed. I read the two handlers, confirmed the absence of any binding call in the module by grep, and read the two advisory comments quoted above. I did not stand up a gRPC server with a restricted account.
Dedup: #7304 gave getDatabaseInfo its canAccessToDatabase gate; GHSA-c23x-pqcj-7hfm and GHSA-p29f-345w-4qwf are the two advisories the comments name. Nothing in alltitles.txt covers the missing binding in this handler.
One note on the fix order
Adding the principal binding alone is not sufficient. The same handler counts behind four catch(Throwable ignore) blocks, which we are reporting separately and publicly as an ordinary diagnosability defect. With the binding added and those catches left in place, every per-type refusal would be converted into a silently smaller number rather than an error, so the two changes belong together.
---
Update, 2026-10-31, re-checked at main 4e6cd888f7
Unchanged at HEAD. A separate audit pass reached this handler independently and added one thing we did not have when we first reported it, which narrows the claim rather than widening it.
The blast radius, checked rather than assumed
We said this discloses aggregate counts only. That is right, and the reason is worth stating because it bears on how you fix it: LocalDatabase.countType applies no per-type check for a regular document type. So today the only concrete disclosure to a caller denied read on a type is a TimeSeries type's sample count, which goes through requireEngine and is the one count that is gated. We did not reproduce that case.
Why that makes it worth fixing rather than closing
The handler's correctness currently rests on the engine happening not to enforce a per-type check on that path, not on anything the handler does. If a future change gives countType a per-type gate, as the TimeSeries path already has, this handler starts disclosing counts across the ACL boundary without anyone editing it. The comment eighty lines below it already says the binding is what stands between this shape and the advisory it names; today that binding is simply absent and nothing has needed it yet.
So the ask is unchanged and the urgency is low: bind the principal here as the sibling handlers do, so the guarantee is a property of the handler rather than of what the engine currently does not check. And, as we noted when first reporting this, adding the binding alone is not sufficient while the catches in the same method convert a refusal into a silently smaller number.
Related advisories
This issue is tracked together with GHSA-vpxw-wqc5-hvvj, which carries the CVE identifier for the group.