5.3medium
joi: Uncaught RangeError on deeply nested input through recursive `link()` schemas
- Severity
- 5.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.30% (higher than 24% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-q7cg-457f-vx79
Description
joi is a schema description language and data validator for JavaScript. Prior to 17.13.4 and 18.2.1, denial of service is possible via an untrapped exception in services validating user-supplied JSON or object input with recursive link() schemas. When validate() is called without try/catch in a request handler, deeply nested input can trigger an unhandled RangeError and potentially crash the process; lower-impact paths using validateAsync() or try/catch produce a RangeError instead of a structured ValidationError. This issue is fixed in versions 17.13.4 and 18.2.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| hapijs joi | < 17.13.4, >= 18.0.0, < 18.2.1 | CVE List |
| joi (npm) | from 18.0.0 before 18.2.1, before 17.13.4 | GitHub Advisory Database |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
Classification
What each source says
CVE List
joi is a schema description language and data validator for JavaScript. Prior to 17.13.4 and 18.2.1, denial of service is possible via an untrapped exception in services validating user-supplied JSON or object input with recursive link() schemas. When validate() is called without try/catch in a request handler, deeply nested input can trigger an unhandled RangeError and potentially crash the process; lower-impact paths using validateAsync() or try/catch produce a RangeError instead of a structured ValidationError. This issue is fixed in versions 17.13.4 and 18.2.1.
GitHub Advisory Database
Impact
Denial of service via untrapped exception in services validating user-supplied JSON / object input with recursive link schemas.
The blast radius depends on how the application invokes joi:
- Highest impact:
validate()called withouttry/catchin a request handler would cause an unhandled exception, potentially crashing the process. - Lower impact:
validateAsync()orvalidate()inside atry/catch, the validation fails, but the error type isRangeErrorrather than a structuredValidationError, complicating error handling.
Patches
Upgrade to version >= 18.2.1.
Workarounds
Try/catch the validation to avoid uncaught exceptions.
References
- Pull request: hapijs/joi#3113
NVD (es)
joi es un lenguaje de descripción de esquemas y un validador de datos para JavaScript. Antes de las versiones 17.13.4 y 18.2.1, es posible la denegación de servicio a través de una excepción no capturada en servicios que validan entradas JSON u objetos proporcionados por el usuario con esquemas link() recursivos. Cuando se llama a validate() sin try/catch en un gestor de solicitudes, una entrada profundamente anidada puede desencadenar un RangeError no manejado y potencialmente bloquear el proceso; las rutas de menor impacto que usan validateAsync() o try/catch producen un RangeError en lugar de un ValidationError estructurado. Este problema está solucionado en las versiones 17.13.4 y 18.2.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-48038 changed 2026-07-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-q7cg-457f-vx79 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-48038 changed 2026-10-24 | Public domain |