GHSA-GC3F-VMQJ-J7HW
Administrator onboarding regression leaves system schema download anonymously executable
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-GC3F-VMQJ-J7HW divulgada · CVSS 7.5 (GitHub) | |
| Remediación | Parche v0.13.45 | github.com/daptin/daptin · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
A regression in first-administrator onboarding leaves bootstrap-open actions with a permission granting anonymous execution. On an affected fresh installation, an unauthenticated caller can invoke `POST /action/world/download_system_schema` and receive `schema.json` after administrator onboarding and the requested server restart, without an administrator explicitly making that action public.
This is an onboarding permission-transition bug. The shared authorization handler enforces the resulting persisted policy; it does not skip the action permission check. A `GuestExecute` permission intentionally grants anonymous execution and is not itself a missing authentication check.
Confirmed impact
The schema download returns the serialized runtime `CmsConfig`, including schema and action definitions and any configuration included in that object. A fresh isolated local instance returned 1,291,993 bytes of valid JSON to an anonymous caller after completed onboarding and restart. The demonstrated impact is schema/configuration disclosure; credential disclosure and other action side effects have not been established by this reproduction.
Root cause and regression
The regression was introduced in 905bed49 https://github.com/daptin/daptin/commit/905bed49, first tagged as `v0.12.28`. That change preserved explicitly configured action permissions by restricting the action lockdown update to rows still carrying `DEFAULT_PERMISSION_WHEN_NO_ADMIN` (`2097151`).
However, `BecomeAdmin` first invoked the generic ownership transition on resource rows, including actions. That step changed bootstrap action permissions from `2097151` to `DEFAULT_PERMISSION` (`561441`), which includes `GuestExecute` (`32`). The later action-specific lockdown searched for the original `2097151`, so it skipped the already-converted actions.
The final `download_system_schema` action permission was confirmed as `561441`. Removing its `GuestExecute` bit through the administrator resource API immediately changed anonymous invocation from HTTP 200 to HTTP 403. The later explicit signup lockdown explains why public signup can be denied while schema download remains accessible.
The regression's original unit test called the action-lockdown helper directly, without the preceding ownership transition. It therefore did not exercise the failing composition.
Reproduction
- Start a fresh affected Daptin instance.
- Sign up and sign in as the first user, invoke `become_an_administrator`, and perform the requested restart.
- Without an Authorization header, request:
curl -i -X POST http://127.0.0.1:6336/action/world/download_system_schema \
-H 'Content-Type: application/json' -d '{}'Before the fix, the response is HTTP 200 with a `client.file.download` response containing base64-encoded `schema.json`. No explicit grant of anonymous schema-download permission is needed. Properly restricted action policies deny the request.
Fix
dec3fee4 https://github.com/daptin/daptin/commit/dec3fee4 moves the existing action-lockdown call ahead of the generic ownership loop. The action transition now sees the original bootstrap permissions and restricts them before ownership assignment. Explicit public and private action policies, public signin, closed signup, and administrator ownership are preserved.
The fix changes sequencing in the existing onboarding path. It does not add a second authorization path, change `GuestExecute` semantics, or indiscriminately overwrite explicit application policies. The fix is released in v0.13.45 https://github.com/daptin/daptin/releases/tag/v0.13.45. The affected range starts at `v0.12.28`; installations must also have undergone the affected onboarding transition for this particular regression to leave these persisted grants.
Existing installations and mitigation
Upgrading alone does not rerun administrator onboarding and does not repair already-persisted action permissions. Administrators should use Daptin's permissioned JSON:API `action` resource to remove unintended anonymous execution grants from administrative actions, including `world/download_system_schema`. Clear `GuestExecute` from the current action permission while preserving other intentional permission bits, and verify that an anonymous request returns HTTP 403. Review explicit action-to-group grants separately where applicable.
Do not blanket-rewrite every action with permission `561441`: that value can also represent an intentionally public application action. Preserve deliberately public actions and do not rerun first-administrator onboarding as an upgrade migration. See Permissions https://github.com/daptin/daptin/blob/master/wiki/Permissions.md#after-admin-setup.
Validation
`TestActionLockdownAfterOnboardingRealE2E` starts real local Daptin processes from current source with a fresh SQLite database and checks both immediately after onboarding and after restart:
- Anonymous and ordinary authenticated schema downloads return HTTP 403.
- Administrator schema download returns HTTP 200 with valid JSON.
- Bootstrap-open actions become restricted.
- Explicitly public actions remain executable; explicitly private actions deny ordinary users and guests.
- Persisted action permissions and administrator ownership match the expected policy.
- Public signup is denied; signin remains functional.
The composition unit test now runs action lockdown followed by ownership assignment. Resource and permission unit suites, existing access-group and account-privacy HTTP E2E tests, resource `go vet`, and `git diff --check` passed.
Existing installations require the mitigation above even after upgrading to v0.13.45 or later; the release prevents the onboarding regression but does not rewrite existing persisted grants.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/daptin/daptin |
Corregida | v0.13.45 | 0 d | v0.13.57 no afectada |
0.13.45v0.13.45Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/daptin/daptin/security/advisories/GHSA-gc3f-vmqj-j7hwLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
