CVE-2026-48038: joi has an uncaught RangeError on deeply nested input through recursive `link()` schemas
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.
Published Jun 11, 2026 · Updated Jun 12, 2026
Affected packages
joi
- Ecosystem
- npm
- Affected
- >= 18.0.0, < 18.2.1
- Fixed in
- 18.2.1
- Check
npm ls joi
joi
- Ecosystem
- npm
- Affected
- < 17.13.4
- Fixed in
- 17.13.4
- Check
npm ls joi
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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
Credited to kexwin.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-118772
joi: quadratic-time split in `string().email({ multiple: true })` allows denial of service
high7.5No fixOct 30, 2026CVE-2026-92599
joi: Quadratic regular-expression backtracking in `Joi.string().isoDate()`
high7.5Sep 29, 2026CVE-2026-90771
joi messages compilation allows prototype replacement through __proto__ error codes
medium3.7Sep 13, 2026CVE-2026-84367
joi: object().rename() with a template target can set the validated object's prototype
low3.7Sep 8, 2026CVE-2026-84368
joi: Prototype pollution via a `__proto__` language key in custom messages
low3.7No fixSep 8, 2026
