CVE-2026-48038: Joi Joi Has An Uncaught RangeError Vulnerability
MODERATECVE-2026-48038 is a MODERATE (CVSS 5.3) joi has an uncaught rangeerror vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Joi libraries in the npm ecosystem. The issue involves joi has an uncaught rangeerror on deeply nested input through recursive `link()` schemas. Remediation is available by upgrading affected packages to version 18.2.1, 17.13.4.
CVE-2026-48038 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2026-48038
To remediate this vulnerability, upgrade all affected Joi dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install joi@18.2.1
npm install joi@17.13.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls joi
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-48038, inspect your project dependencies using npm:
npm ls joi
Analyze the terminal output to locate any version of Joi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 18.2.1), your application is affected.
Note: The npm ls joi command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Joi, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-48038 Affected Joi Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2026-48038?
Which Joi versions are affected?
What version fixes CVE-2026-48038?
Is joi affected?
What is the CVSS score of CVE-2026-48038?
What CWE is associated with CVE-2026-48038?
How can I check npm dependencies for CVE-2026-48038?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q7cg-457f-vx79",
"modified" : "2026-06-12T19:28:27Z",
"published" : "2026-06-11T13:27:32Z",
"aliases" : [ "CVE-2026-48038" ],
"summary" : "joi has an uncaught RangeError on deeply nested input through recursive `link()` schemas",
"details" : "### Impact\nDenial of service via untrapped exception in services validating user-supplied JSON / object input with recursive link schemas. \n\nThe blast radius depends on how the application invokes joi:\n- Highest impact: `validate()` called without `try/catch` in a request handler would cause an unhandled exception, potentially crashing the process.\n- 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.\n\n### Patches\nUpgrade to version >= 18.2.1.\n\n### Workarounds\nTry/catch the validation to avoid uncaught exceptions.\n\n### References\n- Pull request: hapijs/joi#3113",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "joi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "18.0.0"
}, {
"fixed" : "18.2.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "joi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "17.13.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/hapijs/joi/security/advisories/GHSA-q7cg-457f-vx79"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/joi/pull/3113"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/joi/commit/2392713d3e9dd91ba752ac0c96e0eaf3d24b9a11"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/hapijs/joi"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-248", "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-11T13:27:32Z",
"nvd_published_at" : null
}
}