CVE-2026-48038
JSON

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 packageVersionsReported by
hapijs joi< 17.13.4, >= 18.0.0, < 18.2.1CVE List
joi (npm)from 18.0.0 before 18.2.1, before 17.13.4GitHub Advisory Database

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Classification

CWE-248CWE-400

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

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 without try/catch in a request handler would cause an unhandled exception, potentially crashing the process.
  • Lower impact: validateAsync() or validate() inside a try/catch, the validation fails, but the error type is RangeError rather than a structured ValidationError, 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

SourceRecordLicence
CVE ListCVE-2026-48038 changed 2026-07-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-q7cg-457f-vx79 changed 2026-09-10CC-BY-4.0
NVDCVE-2026-48038 changed 2026-10-24Public domain