# CVE-2026-48038: hapijs joi denial of service via recursive link schemas

Source: https://junglewise.ai/threats/cve-2026-48038-hapijs-joi-denial-of-service-via-recursive-link-schemas  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-14. Updated: 2026-07-14  
License: CC BY 4.0 with a link back

CVE-2026-48038 · Severity: medium · CVSS 5.3 · Published 2026-07-14

Joi is a popular data validation library for JavaScript used to ensure that information sent to a web service follows a specific format. A vulnerability in how it handles complex, recursive data structures allows an attacker to send specially crafted, deeply nested input that can crash the application. This results in a denial of service, making the affected website or service unavailable to legitimate users.

Technologies: [joi (npm)](https://junglewise.ai/threats/technologies/joi). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-48038 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-48038 being exploited in the wild.

**How severe is CVE-2026-48038?** Medium severity, with a CVSS score of 5.3, published 14 July 2026.

**Which products and versions are affected?** joi (npm) < 18.2.1, SEMVER:introduced=18.0.0,fixed=18.2.1.

**Is there a fix for CVE-2026-48038?** Yes. joi (npm): upgrade to 18.2.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-48038 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-48038?** Check whether you run joi (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- joi (npm): upgrade to 18.2.1 or later

  ```sh
  npm install joi@18.2.1
  ```


## Technical details

A denial of service vulnerability exists in Joi due to an uncaught RangeError when processing deeply nested input against recursive link() schemas. The root cause is a failure to protect link recursion from exceeding the maximum call stack size. An unauthenticated remote attacker can exploit this by submitting a crafted JSON payload or object. If the application calls the synchronous validate() method without a try/catch block, the resulting unhandled exception can crash the Node.js process. In cases where validateAsync() or try/catch is used, the library returns a RangeError instead of a standard ValidationError, which may still disrupt expected error-handling logic. The issue is fixed in versions 17.13.4 and 18.2.1.

## Affected products

- hapijs joi < 17.13.4, >= 18.0.0 < 18.2.1

## Identifiers

- CVE-2026-48038
- GHSA-q7cg-457f-vx79

## Timeline

- 2026-05-04: patched: Fix merged into master branch
- 2026-05-20: advisory: GitHub Security Advisory published
- 2026-07-14: disclosed: CVE published to NVD

## References

- [https://github.com/hapijs/joi/commit/97bd51de94d595a2d8949eb3bec0dbdd2f8a7a74](https://github.com/hapijs/joi/commit/97bd51de94d595a2d8949eb3bec0dbdd2f8a7a74)
- [https://github.com/hapijs/joi/commit/fc146a628ab9cc250854407722d9f8738c9548e7](https://github.com/hapijs/joi/commit/fc146a628ab9cc250854407722d9f8738c9548e7)
- [https://github.com/hapijs/joi/pull/3113](https://github.com/hapijs/joi/pull/3113)
- [https://github.com/hapijs/joi/security/advisories/GHSA-q7cg-457f-vx79](https://github.com/hapijs/joi/security/advisories/GHSA-q7cg-457f-vx79)

## Related threats

- [Joi email validation ReDoS in multi-address mode](https://junglewise.ai/threats/cve-2026-118772-joi-is-a-schema-description-language-and-data-validator-for)
- [joi regular expression denial of service in isoDate validation](https://junglewise.ai/threats/duplicate-advisory-joi-quadratic-regular-expression-backtracking-in-joi-0593de22)
- [joi regular expression denial of service in isoDate validation](https://junglewise.ai/threats/cve-2026-92599-joi-regular-expression-denial-of-service-in-isodate-validation)
- [joi prototype pollution in messages compilation](https://junglewise.ai/threats/cve-2026-90771-joi-prototype-pollution-in-messages-compilation)
- [Joi prototype pollution via __proto__ in custom messages](https://junglewise.ai/threats/cve-2026-84368-joi-prototype-pollution-via-proto-in-custom-messages)
