GHSA-H84H-G58V-XG2H
Quadratic regex backtracking in the decimal validation rule can cause denial of service
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-H84H-G58V-XG2H divulgada · CVSS 5.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Impact
The `decimal` validation rule counts decimal places with a regular expression that backtracks quadratically on certain input. A very long run of digits followed by an exponent (for example, a value ending in `e5`) passes the rule's `is_numeric()` check and then forces excessive regex backtracking before the match fails. Any application that validates a request field with the `decimal` rule is affected, with no non-default configuration. A single large request can consume several seconds of worker CPU, so a low rate of such requests can exhaust the PHP worker pool and cause denial of service.
Patches
The fix makes the regular expression's quantifiers possessive, which removes the backtracking without changing validation results. Fixes have been proposed for the 13.x and 12.x branches in https://github.com/laravel/framework/pull/62420 and https://github.com/laravel/framework/pull/62421.
Workarounds
Use the `bail` rule and order a size-limiting rule such as `max` or `digits_between` before `decimal`, so oversized values are rejected before the `decimal` rule runs.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistlaravel/framework |
Corregida | 12.73.0, 13.43.0 | — | — |
12.73.013.43.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/laravel/framework/security/advisories/GHSA-h84h-g58v-xg2hLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
