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.
Published: 2026-07-14
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability originates from an untrapped exception when joi's validate() processes deeply nested JSON using recursive link() schemas. Prior to versions 17.13.4 and 18.2.1, calling validate() without surrounding it in a try/catch inside a request handler causes a RangeError that propagates unhandled, potentially crashing the Node.js process. Lower‑impact paths that use validateAsync() or wrap validate() in try/catch still raise a RangeError but return it as part of a ValidationError, preventing a crash. This failure to handle abnormal input gracefully (CWE‑248) leads to a denial‑of‑service, with no impact on confidentiality or integrity. The flaw is mitigated in the newer releases.

Affected Systems

Applications that depend on hapijs joi prior to release 17.13.4 and 18.2.1 are affected. Any component that passes user-supplied JSON or object payloads to joi.validate() without proper error handling may be vulnerable.

Risk and Exploitability

The CVSS score of 5.3 indicates moderate severity. The EPSS score of <1% implies a low probability of exploitation at present, and the vulnerability is not listed in the CISA KEV catalog. Attackers can trigger the crash by sending a deeply nested payload to any endpoint that uses joi.validate() directly; using validateAsync() or proper try/catch still raises a RangeError but does not crash the process, reducing practical impact.

Generated by OpenCVE AI on July 31, 2026 at 05:32 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade joi to version 17.13.4 or later (or 18.2.1) to receive the fix.
  • Wrap all joi.validate() calls in a try/catch block or replace them with validateAsync() to prevent unhandled exceptions from propagating.
  • Enforce a maximum schema depth or input size when defining joi schemas to limit recursion and protect against denial of service.

Generated by OpenCVE AI on July 31, 2026 at 05:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-q7cg-457f-vx79 joi has an uncaught RangeError on deeply nested input through recursive `link()` schemas
History

Mon, 27 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
First Time appeared Hapijs
Hapijs joi
Vendors & Products Hapijs
Hapijs joi

Wed, 15 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 14 Jul 2026 19:45:00 +0000

Type Values Removed Values Added
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.
Title joi: Uncaught RangeError on deeply nested input through recursive `link()` schemas
Weaknesses CWE-248
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-15T13:27:13.334Z

Reserved: 2026-05-20T18:15:53.577Z

Link: CVE-2026-48038

cve-icon Vulnrichment

Updated: 2026-07-15T13:23:17.465Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T05:45:03Z

Weaknesses