CVE-2026-48038: joi: Uncaught RangeError on deeply nested input through recursive `link()` schemas

Published Jun 11, 2026
·
Updated

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

Other sources

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.

— MITRE

Affected Software

2 affected componentsFixes available
npm/joi<17.13.4
17.13.4
npm/joi>=18.0.0<18.2.1
18.2.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/joi to a version that resolves this vulnerability.

    Fixed in 17.13.4
  2. Upgrade

    Upgrade npm/joi to a version that resolves this vulnerability.

    Fixed in 18.2.1
  3. Upgrade

    Upgrade joi to a version that resolves this vulnerability.

    Fixed in 17.13.4
  4. Upgrade

    Upgrade joi to a version that resolves this vulnerability.

    Fixed in 18.2.1
  5. Configuration

    Wrap joi validate() calls in a request handler with try/catch to prevent an untrapped RangeError (prior to 17.13.4 and 18.2.1) from potentially crashing the process.

    joi usage in request handlers validate() error handling (try/catch) = Use try/catch around validate()

Event History

Jun 11, 2026
Advisory Published
via GitHub·01:27 PM
Data Sourced
via GitHub·01:27 PM
DescriptionSeverityWeaknessAffected Software
Jul 14, 2026
CVE Published
via MITRE·07:24 PM
Data Sourced
via MITRE·07:24 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is the severity of CVE-2026-48038?

The severity of CVE-2026-48038 is medium with a CVSS score of 5.3.

2

What type of attack does CVE-2026-48038 expose the system to?

CVE-2026-48038 exposes the system to denial of service attacks due to untrapped exceptions in user-supplied JSON validation.

3

How do I fix CVE-2026-48038?

To fix CVE-2026-48038, ensure that all calls to the validate() function are wrapped in a try/catch block.

4

What software is affected by CVE-2026-48038?

CVE-2026-48038 affects the npm package joi.

5

What could happen if CVE-2026-48038 is exploited?

If exploited, CVE-2026-48038 could cause the application to enter a denial of service state, disrupting service availability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203