In short
- CVE-2026-48038 is a MEDIUM (CVSS 5.3) vulnerability affecting joi.
- Chance of exploitation in the next 30 days (EPSS): 0.52%, higher than 44.4% of all vulnerabilities.
- Fix: update to 18.2.1, 17.13.4 or later.
| Package | Affected versions | Patched versions |
|---|
| joi npm | ≥ 18.0.0, < 18.2.1< 17.13.4
| 18.2.117.13.4
|
Description
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 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.
Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free