GHSA-9CXW-HP3C-637X
DQL Injection via unsanitized search term meta-field name in SearchHelper
Texto original en inglés · Ver en español
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-9CXW-HP3C-637X divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The `SearchHelper` class in Kimai interpolates user-controlled meta-field names from search terms directly into DQL (Doctrine Query Language) queries without sanitization. When a search term is formatted as `FIELDNAME:VALUE`, the `FIELDNAME` portion is parsed by `SearchTermPart` and used as-is to construct DQL subquery aliases via string concatenation in `sprintf()`.
Details
Affected file: `src/Repository/Search/SearchHelper.php`
The vulnerable code constructs a DQL subquery using unsanitized user input:
`$metaName` is obtained from `SearchTermPart::getField()` which returns raw user input (everything before the `:` in a search term, split by spaces). No validation ensures the value is a valid DQL identifier.
PoC
_A PoC was provided, but removed for security reasons._
Impact
- Denial of Service — Any authenticated user can cause errors (log entires) in all search API endpoints by injecting special characters (`.`, `,`, `(`, `)`, `'`, `-`, etc.) into meta-field search terms
- DQL manipulation — User-controlled input is interpolated directly into DQL query strings without parameterization
- Error-based information disclosure — In development mode, error responses may leak DQL structure, entity class names, and database schema details
Solution
- The DQL identifier is now generated, no user input will be used
See https://www.kimai.org/en/security/ghsa-9cxw-hp3c-637x https://www.kimai.org/en/security/ghsa-9cxw-hp3c-637x for more information.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistkimai/kimai |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/kimai/kimai/security/advisories/GHSA-9cxw-hp3c-637xLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
