CVE-2026-118772
joi: quadratic-time split in `string().email({ multiple: true })` allows denial of service
joi is a schema description language and data validator for JavaScript. From 17.1.1 until 17.13.9 and 18.3.1, the Joi.string().email({ multiple: true }) rule uses a separator regular expression whose leading whitespace quantifier is retried at every position in a long whitespace run that contains no separator, causing quadratic work during String.prototype.split. The behavior applies to the default separator and every custom separator. Applications that validate attacker-controlled values with the multiple option and no effective prior length limit can have the Node.js event loop blocked for seconds by one request, preventing other work. A .max() rule is not sufficient when abortEarly: false allows the email rule to run after the maximum-length check fails. This vulnerability is fixed in versions 17.13.9 and 18.3.1.
Fixes and workarounds
Fix
joi (npm): OSV reports a fixed version 17.13.9. Check the advisory for supported release branches.
Source: OSV GHSA-4528-x5fx-h6hgFix
joi (npm): OSV reports a fixed version 18.3.1. Check the advisory for supported release branches.
Source: OSV GHSA-4528-x5fx-h6hgAffected products and versions
| Product | Versions | Authority |
|---|---|---|
| joi hapijs |
>= 16.0.0, <= 17.1.1 (affected) >= 18.0.0, < 18.3.1 (affected) |
CNA: GitHub_M |
| joi @hapi |
>= 16.0.0, <= 17.1.1 (affected) | CNA: GitHub_M |
joijoi
npm |
≥ 17.1.1; < 17.13.9 (affected, semver); OSV events: introduced 17.1.1; fixed 17.13.9Source events (semver)
Other versions: unaffected |
OSV GHSA-4528-x5fx-h6hg |
@hapi/joi@hapi/joi
npm |
≥ 16.0.0; ≤ 17.1.1 (affected, semver); OSV events: introduced 16.0.0; last affected 17.1.1Source events (semver)
Other versions: unaffected |
OSV GHSA-4528-x5fx-h6hg |
joijoi
npm |
≥ 18.0.0; < 18.3.1 (affected, semver); OSV events: introduced 18.0.0; fixed 18.3.1Source events (semver)
Other versions: unaffected |
OSV GHSA-4528-x5fx-h6hg |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 3.1 / 7.5 high |
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | CNA: GitHub_M |
Exploit evidence
- https://github.com/hapijs/joi/security/advisories/GHSA-4528-x5fx-h6hg
exploit · ADP: CISA-ADP
References
- https://github.com/hapijs/joi/security/advisories/GHSA-4528-x5fx-h6hgCNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/hapijs/joi/pull/3162CNA: GitHub_M · x_refsource_MISC
- https://github.com/hapijs/joi/pull/3163CNA: GitHub_M · x_refsource_MISC
- https://github.com/hapijs/joi/commit/03dc1d909818503b06240dadc81e9227ed2649cfCNA: GitHub_M · x_refsource_MISC
- https://github.com/hapijs/joi/commit/807858d7480f5075b0610817e3e44230890fb18eCNA: GitHub_M · x_refsource_MISC
- https://github.com/hapijs/joi/releases/tag/v17.13.9CNA: GitHub_M · x_refsource_MISC
- https://github.com/hapijs/joi/releases/tag/v18.3.1CNA: GitHub_M · x_refsource_MISC
- https://github.com/hapijs/joi/security/advisories/GHSA-4528-x5fx-h6hgADP: CISA-ADP · exploit
- https://github.com/advisories/GHSA-4528-x5fx-h6hgOSV / GitHub Security Advisories · advisory
- https://osv.dev/vulnerability/GHSA-4528-x5fx-h6hgOSV / GitHub Security Advisories · osv
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.