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

> Attackers can crash applications using the joi library by sending deeply nested input to recursive link schemas, causing an unhandled RangeError.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Jul 2026
- **Updated:** 15 Jul 2026
- **Also known as:** ECHO-0d17-e81d-14c0, GHSA-q7cg-457f-vx79, MINI-5v8g-7jgc-6cwp, MINI-63r3-m83j-4c6p, MINI-6chw-qq4v-2hfc, MINI-7ggx-hfcg-9v2g, MINI-7m8w-gvrv-xcmg, MINI-9274-6j5f-675v, MINI-92r9-989p-wfc9, MINI-9fg7-xwvx-vjc8, MINI-9g4w-65h2-jfqg, MINI-h6m2-6qpf-87j2, MINI-h7j2-g5ph-948j, MINI-j3vj-2qcx-944h, MINI-pvc9-x9v4-q993, MINI-vm7w-c5vx-78cg, MINI-w75r-r9w9-wqx3, MINI-wqqc-fxj4-7ff3, MINI-xxq4-53qr-pcpc, ROOT-APP-NPM-CVE-2026-48038

## What is CVE-2026-48038?

CVE-2026-48038 is a medium-severity denial of service vulnerability in hapijs joi, published on 14 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-248 (Uncaught Exception)

## Which versions are affected by CVE-2026-48038?

4 open source packages ship an affected version, including joi.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `joi` | npm | All versions | 17.13.4 |
| `joi` | npm | All versions | 17.13.4 |
| `joi` | npm | From 18.0.0 | 18.2.1 |
| `joi` | npm | From 18.0.0 | 18.2.1 |

## How do I fix CVE-2026-48038?

Upgrade joi to a fixed version for your release line: 17.13.4 or 18.2.1.

## Is CVE-2026-48038 being exploited?

There is no known exploitation of CVE-2026-48038 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-48038 and fix it if it is affected.

What it is: CVE-2026-48038 is a medium-severity denial of service vulnerability in hapijs joi, published on 14 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-48038 in the wild and no public exploit code.

Affected packages and fixed versions:
- joi (npm): affected all versions; fixed in 17.13.4
- joi (npm): affected all versions; fixed in 17.13.4
- joi (npm): affected from 18.0.0; fixed in 18.2.1
- joi (npm): affected from 18.0.0; fixed in 18.2.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-48038/ (Markdown: https://insights.sbomify.com/CVE-2026-48038/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-48038
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-48038
- OSV: https://osv.dev/vulnerability/CVE-2026-48038

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-48038/
Summaries are generated and may contain mistakes; the official description above is the record.
