CVE-2026-118772

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

Published Oct 29, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The vulnerability occurs when the Joi.string().email({ multiple: true }) rule processes attacker-controlled values. The rule’s separator regular expression contains a leading whitespace quantifier that is retried at each position in a long run of whitespace that contains no separator, causing a quadratic-time split operation. This excessive computational work can block the Node.js event loop for seconds, preventing the application from handling other requests and effectively causing a denial of service. The weakness is an instance of excessive or exponential processing complexity (CWE-1333).

Affected Systems

Affected vendors include @hapi:joi and hapijs:joi. The issue exists in Joi versions from 17.1.1 up to 17.13.8, and in earlier 18.x releases prior to 18.3.1. The vulnerability was fixed in Joi v17.13.9 and v18.3.1 and later releases.

Risk and Exploitability

The CVSS score is 7.5, indicating a high impact. EPSS data is not available, and the vulnerability is not listed in CISA’s KEV catalog. The primary attack vector is through any code path that validates attacker-supplied data using Joi.string().email({ multiple: true }). An attacker can send a specially crafted string with extensive whitespace to force the quadratic operation, leading to a temporary denial of service. The risk is significant for high-traffic services and for applications that rely on Joi for trustable data validation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Joi to version 17.13.9 or later, or to 18.3.1 or later, where the flaw is fixed.
  • Apply a maximum input length check before the email validation rule, ensuring that the Joi.max() constraint runs first and aborts early to prevent the expensive split operation. If possible, set abortEarly to true so that the email rule does not execute after a length check fails.
  • If the application absolutely requires multiple:true email validation, consider disabling that option or refactoring the code to validate each email address separately using a simpler rule set.

Generated by OpenCVE AI on October 29, 2026 at 19:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-4528-x5fx-h6hg joi: quadratic-time split in `string().email({ multiple: true })` allows denial of service
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Hapijs
Hapijs joi
Vendors & Products Hapijs
Hapijs joi
Type Values Removed Values Added
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.
Title joi: quadratic-time split in `string().email({ multiple: true })` allows denial of service
Weaknesses CWE-1333
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 4, 2026, 1:33 AM
Reserved
Oct 28, 2026, 7:20 PM
Status
Awaiting Analysis
Published
Oct 29, 2026, 7:17 PM
Modified
Nov 4, 2026, 2:17 AM
Severity
Important
Public date
Oct 29, 2026, 6:13 PM