GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — CVE-2026-118772 - GitHub Advisory Database joi: quadratic-time split in `string().email({ multiple: true })` allows denial of serviceDescriptionSummary
DetailsWhen the const regex = new RegExp(`\\s*[${options.separator ? escapeRegex(options.separator) : ','}]\\s*`); // ... const emails = options.multiple ? value.split(regex) : [value];
The fix lets the leading whitespace match start only at the beginning of a whitespace run, so the split is linear: 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 Every Workarounds for users who cannot upgrade:
Proof of conceptconst 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
Output on the patched version:
Over HTTP, send the whitespace in a field that the route validates with this schema: POST /invite HTTP/1.1 Content-Type: application/json {"emails": "<100000 spaces>"} ImpactThis is a denial of service by CPU exhaustion. It affects each application that validates untrusted input with References
Published by the National Vulnerability Database
Published to the GitHub Advisory Database
Reviewed
Last updated
Severity
High
CVSS v3 base metrics
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS score(41st percentile)
WeaknessesWeakness CWE-1333Inefficient Regular Expression ComplexityThe product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. Learn more on MITRE.CVE ID
CVE-2026-118772
GHSA IDGHSA-4528-x5fx-h6hg
Source codeCredits
Loading
Checking history
Uh oh!
There was an error while loading. Please reload this page.
See something to contribute?
Suggest improvements for this vulnerability.
|
| You are visitor 01402605 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |