GHSA-7R2M-G5WF-PJ9J
Model Export Route joins Raw Name Permitting Authenticated Request Redirection
Texto original en inglés · Ver en español
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-7R2M-G5WF-PJ9J divulgada | |
| Remediación | Parche 4.0.0 | surrealdb · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
### Summary
A credential leakage and Server-Side Request Forgery vulnerability exists in SurrealDB's remote HTTP client router (`surrealdb/surrealdb`). In `surrealdb/src/engine/remote/http/mod.rs`, model names are passed directly to `Url::join()` as URL references.
### Vulnerability Details
- Affected File: `surrealdb/src/engine/remote/http/mod.rs` (`router`, `Command::ExportMl`, `Command::ExportBytesMl`)
- Mechanism: `Url::join` treats absolute URLs as target replacements rather than path segments. When exporting a model with a user-supplied name such as `https://attacker.com/ml`, `Url::join` resets the destination origin to the attacker's server. The HTTP client then issues the request to the attacker's server with the current session's authentication tokens and headers attached.
- Impact: Credential disclosure of SurrealDB session tokens and authenticated destination SSRF.
### Recommended Remediation
URL-encode model names before appending them to the path, or use `url.path_segments_mut()` to ensure they are treated strictly as path segments.
---
Reported by: ARSB
Patches
A patch has been created that pins an ML export request to its intended host, so an authenticated request can no longer be redirected to another host.
- Version 4.0.0 and later are not affected by this issue.
References
- SurrealDB Documentation — Capabilities
https://surrealdb.com/docs/surrealdb/security/capabilities - `fix(sdk): ML export URL lets an authenticated request be redirected to another host` (commit `a44fca7d74`)
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
crates.iosurrealdb |
Corregida | 4.0.0 | 0 d | 4.0.1 no afectada |
4.0.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/surrealdb/surrealdb/security/advisories/GHSA-7r2m-g5wf-pj9jLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
