Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

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

CVSS 3.1 7.5 HIGHEUVD CVSS 3.1 7.5 CVSS 3.1 · [email protected] · Secondary 7.5 HIGHCVSS_V3 Publisher rating HIGHFixed by joi 17.13.9Fixed by joi 18.3.1KEV status unknown

cve-program · CVE-2026-118772

Published

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.

Read the publisher's advisory

euvd · EUVD-2026-113320

Published

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.

Read the publisher's advisory

nvd · CVE-2026-118772

Published

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.

Read the publisher's advisory

osv · GHSA-4528-x5fx-h6hg

Published

### Summary `Joi.string().email({ multiple: true })` takes quadratic time to split a value that contains a long run of whitespace. One request with 100 KB of spaces blocks the Node.js event loop for several seconds, which causes a denial of service. ### Details When the `multiple` option is set, the `email` rule splits the value into addresses with a regular expression that removes whitespace on each side of the separator: ```js const regex = new RegExp(`\\s*[${options.separator ? escapeRegex(options.separator) : ','}]\\s*`); // ... const emails = options.multiple ? value.split(regex) : [value]; ``` `String.prototype.split` tries a match at each position of the value. At each position inside a whitespace run, the leading `\s*` reads the rest of the run, does not find a separator, and backtracks through all of it. A run of `n` whitespace characters without a separator therefore costs `n²` steps. This applies to the default separator and to all custom `separator` values. The fix lets the leading whitespace match start only at the beginning of a whitespace run, so the split is linear: ```js const regex = new RegExp(`(?:(?<!\\s)\\s+)?[${options.separator ? escapeRegex(options.separator) : ','}]\\s*`); ``` The split results do not change. The regular expression is now built only when `multiple` is set. Every `joi` release from `17.1.1` up to and including `17.13.8`, and from `18.0.0` up to and including `18.3.0`, is affected. Every `@hapi/joi` release from `16.0.0` is affected. Workarounds for users who cannot upgrade: - Add `.max()` before `.email()`, for example `Joi.string().max(1000).email({ multiple: true })`. The `max` rule then rejects long values before the `email` rule runs. - Do not use the `abortEarly: false` option with this schema. With `abortEarly: false`, the `email` rule runs even when the `max` rule fails. - Do not use `.trim()` as a workaround. It removes only the whitespace at the start and at the end of the value. ### Proof of concept ```js const Joi = require('joi'); const schema = Joi.string().email({ multiple: true }); for (const n of [25000, 50000, 100000, 200000]) { const start = Date.now(); schema.validate(' '.repeat(n)); console.log(`${n} spaces: ${Date.now() - start} ms`); } ``` Output on `[email protected]` (Node.js 26): ```text 25000 spaces: 244 ms 50000 spaces: 887 ms 100000 spaces: 3349 ms 200000 spaces: 13579 ms ``` Output on the patched version: ```text 25000 spaces: 0 ms 50000 spaces: 0 ms 100000 spaces: 0 ms 200000 spaces: 1 ms ``` Over HTTP, send the whitespace in a field that the route validates with this schema: ```http POST /invite HTTP/1.1 Content-Type: application/json {"emails": "<100000 spaces>"} ``` ### Impact This is a denial of service by CPU exhaustion. It affects each application that validates untrusted input with `Joi.string().email({ multiple: true })` and that has no length limit before the `email` rule. One request with 100 KB of whitespace blocks the Node.js event loop for several seconds, and the server cannot process other requests during that time. The attacker needs no authentication when the route is public, and a small number of concurrent requests can keep the service unavailable.

Read the publisher's advisory

Affected versions, risk and source history

cve-program · CVE-2026-118772

Published

joi

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "vendor": "hapijs",
                    "product": "joi",
                    "versions": [
                        {
                            "version": ">= 16.0.0, <= 17.1.1",
                            "status": "affected"
                        },
                        {
                            "version": ">= 18.0.0, < 18.3.1",
                            "status": "affected"
                        }
                    ]
                }

joi

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "vendor": "@hapi",
                    "product": "joi",
                    "versions": [
                        {
                            "version": ">= 16.0.0, <= 17.1.1",
                            "status": "affected"
                        }
                    ]
                }

Original source record · Cite this exact observation · Complete original publisher JSON

euvd · EUVD-2026-113320

Published

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: Oct 29, 2026, 6:13:33 PM

dateUpdated: Nov 4, 2026, 1:33:51 AM

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

nvd · CVE-2026-118772

Published

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Awaiting Analysis

Weakness classifications: CWE-1333

Original publisher date fields

published: 2026-10-29T19:17:19.563

lastModified: 2026-11-04T02:17:15.813

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GHSA-4528-x5fx-h6hg

Published

joi

npm

SEMVER · introduced 17.1.1 → fixed 17.13.9

@hapi/joi

npm

SEMVER · introduced 16.0.0 → last_affected 17.1.1

joi

npm

SEMVER · introduced 18.0.0 → fixed 18.3.1

Original source record · Cite this exact observation · Complete original publisher JSON

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 16 Nov 03:41 UTC · 274 of 275 readable · 259 fully read · 11 waiting for GitHub's hourly limit · documentation 469/469 current