GHSA-P623-WGX3-WXP8
Directus applies side effects in service overrides before permission checks, allowing unauthorized data modification
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 12.1.0 | directus · -35 d desde divulgación | |
| Divulgación | Publicada | GHSA-P623-WGX3-WXP8 divulgada · CVSS 6.5 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Description
Summary
Several Directus service classes override the base `ItemsService` mutation methods to perform cleanup work (nullifying
foreign keys, clearing caches) before delegating to the superclass. The caller's `delete` or `update` permission check
runs inside the superclass method, so those side effects were applied before authorization was evaluated. When the
superclass subsequently rejected the request with `403 Forbidden`, the side effects had already been committed.
The most impactful instance is `FlowsService.deleteMany` (`api/src/services/flows.ts`), which nullified `resolve` and
`reject` on every row in `directus_operations` belonging to the target flow. Because Directus does not require a token
to reach a service (the `authenticate` middleware assigns accountability but does not reject anonymous requests), and
the flows controller adds no pre-service authorization layer, an unauthenticated caller issuing `DELETE /flows/:pk`
received `403 Forbidden` while the operation graph of that flow was permanently disconnected. The flow row and its
operation rows survive, so the Admin App still lists the flow as active, but execution halts after the first step and
the original link targets are not recoverable without manual reconstruction by an administrator.
Two sibling services shared the same ordering defect and are covered by the same patch:
- `UsersService.deleteMany` (`api/src/services/users.ts`) nullified `directus_comments.user_updated`,
- `SharesService.updateMany` and `SharesService.deleteMany` (`api/src/services/shares.ts`) invoked the global
The same patch also reordered non-externally-reachable side effects in `SettingsService.setOwner` and
`DeploymentService.deleteByProvider`, and stopped the user-invite controller from surfacing a rejected invite as an
error.
Impact
- Availability of automation. An unauthorized or unauthenticated caller who knows a flow's UUID can permanently
- Integrity of attribution data. Authorship and sender columns on comments, notifications, and content versions
- Performance and resource consumption. Repeated unauthenticated requests against the shares endpoints kept the
No path in this class reads or exfiltrates content, alters flow or user configuration, or grants elevated privileges.
The impact is confined to availability, cached state, and the specific audit columns listed above.
Patches
Fixed in Directus 12.1.0 (`@directus/api` 37.0.0). The affected overrides now evaluate access before performing any
side effect, or defer the side effect until after the authorized mutation succeeds.
Workarounds
None within the application. Restricting the affected endpoints (`/flows`, `/users`, `/shares`) to authenticated
administrative traffic at a reverse proxy or WAF mitigates the unauthenticated paths until the upgrade is applied.
References
- Patch: directus/directus#27800
Credits
Reported by @tr4ce-ju
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npmdirectus |
Corregida | 12.1.0 | -35 d | 12.6.1 no afectada |
12.1.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/directus/directus/security/advisories/GHSA-p623-wgx3-wxp8Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
