GitHub Advisoryadvisory · npm

GHSA-q7cg-457f-vx79 joi has an uncaught RangeError on deeply nested input through recursive `link()` schemas

MEDIUM Published 2026-06-11 Modified 2026-06-12 Official page ↗
Aliases
CVE-2026-48038
Ecosystem
npm
Packages
joi
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weaknesses
CWE-248, CWE-400
Reviewed
2026-06-11

Affected packages

• npm joi: >= 18.0.0, < 18.2.1 → fixed in 18.2.1 • npm joi: < 17.13.4 → fixed in 17.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

Related

Alias · CVE (1)

  • CVE-2026-48038 joi is a schema description language and data validator for JavaScript. vulnerability

Weakness · CWE (2)

  • CWE-248 Uncaught Exception weakness
  • CWE-400 Uncontrolled Resource Consumption weakness

References