llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Maven · com.arcadedb:arcadedb-server

GHSA-JXWP-5GHH-F385

Security file reloads can replace an operator edit with a permissive default, refuse every later token revocation, or hang the server

Parche disponible
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición15 dDesde la divulgación, 4 nov 2026, 4:25 p. m.
Detección13 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 26.11.1
Monitoreo
Detectada +1
4 nov 26
18 nov 26
20 nov 26
4 nov 26
8 nov 26
12 nov 26
16 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-JXWP-5GHH-F385 divulgada
Remediación Parche 26.11.1 com.arcadedb:arcadedb-server · 0 d desde divulgación
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

Three defects in the reload policy for the server's security files. Each one lets a change an operator makes to a security artifact be silently reverted, replaced by a permissive default, or ignored. They share one root: the first-load policy, which may fall back to a default and write it, is reachable on a running server.

Reported together because the fix for one is likely the fix for the others, and because two of the three widen access.

Affected component

`server` security, at main, after the reload policy was unified behind `ReloadableSecurityArtifact`. Findings 1 and 3 predate that unification; finding 2 is a consequence of it.

1. A groups file edit is overwritten by the permissive default, and admin is widened

`ReloadableSecurityArtifact.reload()` opens with:

if (!hasInForce())
  return firstLoad();

so the guarantee that a reload never writes the live file is conditional on something being in force, not on the server running.

`ServerSecurity.startService()` starts the groups watcher while `latestGroupConfiguration` is still null, and nothing reads it until the first `getGroups()`. A watcher tick in that window therefore runs the FIRST-LOAD policy: it preserves the operator's file as `server-groups-error.json` and saves `createDefault()` over the original.

Reproduced end to end through a real `ServerSecurity` lifecycle with a version-less document: the operator's `auditors` group vanished, and `admin` was widened back to `updateSecurity`, `updateSchema`, `updateDatabaseSettings` and full CRUD.

Family: groups is affected. Tokens is clean because `hasInForce()` is unconditionally true, with the reason written down. Users is clean because its watcher starts only after the first publish.

The conformance census cannot see it because every artifact in it publishes before its watcher starts.

2. A users file edit that leaves root without a password hangs the server, and prints passwords

`UsersPolicy.publish()` calls `askForRootPassword()` on every reload, not only at first run.

With `arcadedb.server.rootPassword` set, a reload silently rewrites the operator's file from memory, which is itself a reload that writes.

With it null, and with no tty, `DefaultConsoleReader.readPassword()` returns null at EOF, the confirmation never matches, and the `do/while` loops forever, printing a fresh random root password in plaintext to stdout on each turn. Measured: 16 turns in 8 seconds.

Note that nothing ever writes `arcadedb.server.rootPassword` back: a search for `setValue` on that setting finds no production caller, so any server first configured at the interactive prompt has it null permanently.

Because `reload()` holds the policy lock across `publish()` and `stop()` takes the same lock, `stopService()` then never returns. Stack captured at `ReloadableSecurityArtifact.stop()`. The class javadoc claims the opposite, on the line above the method:

> It cannot stall a shutdown: `Timer#cancel()` discards the queue without waiting for a running task.

That is true of `Timer.cancel()` and false of the `synchronized` in front of it. The old users watcher cancelled its timer without taking a lock, so this is new with the unification.

3. A failed write of a token document the file already holds refuses every later reload

`ApiTokenConfiguration.persist()` sets `diskBehind = true` on any failed write, including the legacy-plaintext migration performed from inside the reload policy, where disk and memory already hold the same token set and nothing is pending.

With a read-only config directory, which is the ordinary shape of a Kubernetes ConfigMap mount, replacing the file to revoke a token is then silently ignored and the revoked token keeps authenticating. The WARNING tells the operator to make the directory writable, which they cannot.

The groups store got this right: `diskBehind` is set only from the replicated apply path, pinned by its own test. Tokens has no equivalent. Nothing lifts the flag outside HA, since the retry only replays keys the replicated paths recorded.

4. An unreadable users or groups file is replaced by the default

`preserveInError` logs that the corrupt file could not be saved as the error copy, and returns normally. `onFirstLoadFailure` then falls back, and the caller writes the default over the original.

The copy and the overwrite fail together exactly when the cause is the file rather than its contents: a writable directory holding an unreadable file, which happens after a uid change across restarts or on a reused volume, and ArcadeDB writes both files 0600 itself.

Reproduced: a users file holding `root`, `alice` and `bob` at mode 000 came back as a single `root`, with no error copy left behind.

Users and groups are affected; tokens is clean.

Suggested fix

The common root is that the first-load policy is reachable after startup. Gate it on the server's lifecycle rather than on whether anything has been read yet, so a reload can never take the fallback-and-write path.

Then, specifically:

  • make the groups fallback never write, the way the unparseable path already does not
  • call `askForRootPassword()` only on a genuine first run, and make the prompt give up after a bounded number of attempts on a stream at EOF rather than looping
  • take the policy lock out of `stop()`, or cancel the timer before acquiring it, so the javadoc's claim becomes true
  • set `diskBehind` only where the groups store sets it, from the replicated apply path
  • treat a failure to preserve the original as a reason to refuse the fallback, not to proceed with it

The guarantee: the conformance census should construct an artifact whose watcher ticks before anything has read it, which is the state none of the current cases reach.

Credit

Reported by @ruispereira.

---

Update 2026-10-22: all four survive; one nearby change, and two corrections

The users-watcher work landed in this period is a lost-update race fix on the users map: a begin
marker, a boolean return from publish, a compare-and-set on the map reference, and the local user
mutations rerouted so they replace the map rather than editing it. It closes none of the four
defects reported here. It did split the first-load entry point in two, but `reload()` still opens
with `if (!hasInForce()) return loadFirst();`, so (a) is structurally untouched.

  • (a) survives. The groups watcher still starts while nothing is in force, so a tick taken in
  • (b) survives verbatim. `askForRootPassword()` is still called from the users publish, under
  • (c) survives. The publish gained a return value and nothing else; a failed write still latches
  • (d) survives. The error-copy failure is still swallowed by a catch that only logs, and the
Two corrections to our own wording

We called the groups fallback "permissive". It is more specific than that, and worth stating
precisely: it is a denial of service for every custom group, and full `updateSecurity`,
`updateSchema` and all-types access for anyone in a group named `admin`.

We described (b) as a hang. It is that, and it also writes credentials: each turn of the loop prints
a freshly generated root password in clear text to standard output, which on a container lands in
the pod log.

Two things the nearby change introduces

Neither is exploitable, both are worth a line: the in-force marker is cleared only inside publish,
so an early-returning load pins the previous map until the next load; and a package-private
`afterUsersFileRead(Runnable)` seam was added to a security class purely for tests.

---

Validation update 2026-10-23

Both reported vulnerabilities are fixed. Two small residuals follow.

I re-validated all four reports against the hardening work, each against its own report rather than
the commit message. All four come back COMPLETE, every fix has a test, and I made each test inert
and re-ran it: none was inert, and in each case the failure on the inert tree reproduces the
original report verbatim, including the admin group coming back widened for the groups-file case.

Worth saying explicitly: the rename fix also closes an escape I did not report, detaching a
non-empty bucket from a restricted type. And `stop()` no longer takes the policy lock before
cancelling, so the shutdown stall is gone.

Two residuals remain. Neither is the reported vulnerability and neither needs an embargo in my view,
but both belong in this thread rather than a public issue.

1. A type alias still leaks the sample count of a denied TIMESERIES type

`LocalDatabase.countType` gates on the name the caller passed rather than on `type.getName()`, and
an alias is not a key of the access snapshot, so the default-allow arm fires:

public long countType(final String typeName, final boolean polymorphic) {
  ...
  final DocumentType type = schema.getType(typeName);
  ...
  checkPermissionsOnType(typeName, SecurityDatabaseUser.ACCESS.READ_RECORD);

`SELECT count(*)` through the alias answers, while reads and writes through the same alias are
still refused. Record-backed types are unaffected. Gating on `type.getName()` is a one line change.

This is the same shape as the rename escape: a permission keyed by a name, consulted with a name
the caller chose. The narrower patch closes the rename route; the alias route is the other way to
present a second name for the same type.

2. "A reload never writes the live file" is still conditional

With a root password configured, a reload that needs it is applied rather than refused, and
`server-users.jsonl` is rewritten from memory. No loop, no stall, no widening, so this is a much
smaller thing than what was reported. I mention it only because the guarantee as stated in the class
is unconditional and this is the one case where it does not hold.

One observation, not a finding

On the MongoDB side an empty or `$`-prefixed database name still takes the admin branch, so a
command there is authenticated but not checked against `canAccessToDatabase` and runs with no
principal bound. That is unchanged from before the fix and I could not reach it by any supported
route that creates such a database, so I am noting it rather than reporting it.

---

Update, 2026-10-25, re-validated at main d9faba8ca3

All four of the original findings are fixed, and this is the one of our four reports whose fix sits
at the authority rather than at a call site: the `ReloadableSecurityArtifact` watcher calls
`reload(false)` in the base class, so every artifact inherits it. It is the one we do not expect to
have to revisit.

The residual we disclosed last time is still live, and we have now reproduced it with a control.

The condition on "a reload never writes the live file"

The class javadoc at `ReloadableSecurityArtifact.java:40-43` enumerates the writes a reload permits:
a first load's fallback, and a format migration. There is a third it does not list.

`UsersPolicy.publish` at `ServerSecurity.java:388-437`: when the reloaded file leaves root without a
password, the refusal arm fires only if no root password is configured. With one configured the
edit is published, and `askForRootPassword()` at `ServerSecurity:2622` takes its else branch
("Creating root user with the provided password") ending at `updateUser(updated)` at :2732, which
saves `server-users.jsonl` from memory, over the operator's edit.

Two runs of the same probe, differing only in whether `SERVER_ROOT_PASSWORD` is set at reload time.
Real `ServerSecurity` lifecycle, the real watcher at `SERVER_SECURITY_RELOAD_EVERY=50`.

Configured:

arcadedb.server.rootPassword configured at reload time: true
INFO [ServerSecurity] User file changed, reloading it...
INFO [ServerSecurity] Creating root user with the provided password
VERDICT: the reload WROTE the live file

Not configured (control):

arcadedb.server.rootPassword configured at reload time: false
INFO [ServerSecurity] User file changed, reloading it...
SEVER [ServerSecurity] File 'server-users.jsonl' leaves the 'root' user without a password, and none is configured to give it: not applied, keeping the 2 users in force.
VERDICT: the reload did NOT write the live file
Severity, honestly

Small, as we said before. The operator's edit is applied, the other user survives, nothing loops,
nothing stalls, no password is printed. What happens is that an operator who deliberately removes
root's password gets it silently reinstated from the configured value and the file rewritten under
them, reordered.

The reason to keep it on the thread is that the class states the guarantee without the condition,
and the new regression test pins only the arm where it holds:
`SecurityFileReloadHardeningTest.aReloadThatLeavesRootWithoutAPasswordIsRefusedWithoutPrompting`
sets `SERVER_ROOT_PASSWORD` to null at line 133.

The guarantee to ask for

Invariant: a reload of a security artifact on a running server never writes the live file, with the
two exceptions the class enumerates.

Input that breaks it: an edit of `server-users.jsonl` leaving root without a password, on a server
where `arcadedb.server.rootPassword` or `rootPasswordPath` is set.

What makes it unbreakable: call `askForRootPassword()` only on a genuine first run. The `firstLoad`
boolean is already computed six lines above, so the second `if (rootHasNoPassword(newUsers))` at the
end of `publish` only has to become `if (firstLoad && rootHasNoPassword(newUsers))`. Pin it by
extending the existing test with the configured arm, asserting the file is byte for byte the
operator's edit.

One note on the regression tests

Two of the four regression tests for this series, `SchemaChangePerTypeAclIT` and
`UngatedHandlerPerTypeAclIT`, are `*IT` classes. Root `pom.xml` sets `skipITs` true, surefire
excludes `**/*IT.java`, and failsafe is tied to the same flag, so only the `full` and `integration`
profiles run them. A default `mvn test` runs neither. We are raising that separately as an ordinary
public issue about where security regression coverage belongs, without describing what either test
covers.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida Última
com.arcadedb:arcadedb-server≤ 26.10.2
26.10.2
26.11.1
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
mavencom.arcadedb:arcadedb-server
Corregida 26.11.1 0 d 26.11.1 no afectada
Versiones corregidas26.11.1
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/ArcadeData/arcadedb/security/advisories/GHSA-jxwp-5ghh-f385

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.