{"id":"CVE-2025-22150","published":"2025-01-21T17:46:58Z","modified":"2025-02-12T20:41:22Z","title":"Undici Uses Insufficiently Random Values","vendor":"nodejs","product":"undici","tier":"tail","description":{"text":"Undici is an HTTP/1.1 client. Starting in version 4.5.0 and prior to versions 5.28.5, 6.21.1, and 7.2.3, undici uses `Math.random()` to choose the boundary for a multipart/form-data request. It is known that the output of `Math.random()` can be predicted if several of its generated values are known. If there is a mechanism in an app that sends multipart requests to an attacker-controlled website, they can use this to leak the necessary values. Therefore, an attacker can tamper with the requests going to the backend APIs if certain conditions are met. This is fixed in versions 5.28.5, 6.21.1, and 7.2.3. As a workaround, do not issue multipart requests to attacker controlled servers.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00763,"percentile":0.56281,"provenance":"source"},"cwes":[{"id":"CWE-330","name":"Use of Insufficiently Random Values"}],"references":[{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-c76h-2ccp-4975","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/nodejs/undici/commit/711e20772764c29f6622ddc937c63b6eefdf07d0","tags":["x_refsource_MISC"]},{"url":"https://github.com/nodejs/undici/commit/c2d78cd19fe4f4c621424491e26ce299e65e934a","tags":["x_refsource_MISC"]},{"url":"https://github.com/nodejs/undici/commit/c3acc6050b781b827d80c86cbbab34f14458d385","tags":["x_refsource_MISC"]},{"url":"https://hackerone.com/reports/2913312","tags":["x_refsource_MISC"]},{"url":"https://blog.securityevaluators.com/hacking-the-javascript-lottery-80cc437e3b7f","tags":["x_refsource_MISC"]},{"url":"https://github.com/nodejs/undici/blob/8b06b8250907d92fead664b3368f1d2aa27c1f35/lib/web/fetch/body.js#L113","tags":["x_refsource_MISC"]}],"priority":{"score":16.0,"factors":[{"name":"EPSS percentile","points":11.26},{"name":"CVSS severity","points":4.76}]},"vendorSlug":"nodejs","affectedVersions":[{"vendor":"nodejs","product":"undici","versions":[">= 4.5.0, < 5.28.5",">= 6.0.0, < 6.21.1",">= 7.0.0, < 7.2.3"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-01-21T18:34:22.789606Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"undici","vulnerableRanges":[">=4.5.0, <5.28.5",">=6.0.0, <6.21.1",">=7.0.0, <7.2.3"],"patched":["5.28.5","6.21.1","7.2.3"],"from":["GHSA-c76h-2ccp-4975"],"provenance":"source"}],"summary":{"text":"The Undici HTTP/1.1 client for Node.js (nodejs/undici) selects the multipart/form-data boundary using Math.random(), a predictable source of randomness, in versions from 4.5.0 up to but not including 5.28.5, 6.21.1, and 7.2.3. An attacker who controls a website that the application sends multipart requests to, and who can observe enough values, can predict the boundary and tamper with requests bound for backend APIs, which requires user interaction to direct the application's multipart requests to the attacker-controlled server.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:26:41Z"},"euvd":{"id":"EUVD-2025-0154","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-nodejs-undici-cve-2024-30261","parents":[{"from":"CVE-2024-38372","to":"CVE-2025-22150","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:undici","fromFixed":"6.19.2","toFixed":"6.21.1","daysApart":197},{"kind":"same-code","provenance":"machine","files":["lib/web/fetch/body.js"],"commits":["https://github.com/nodejs/undici/commit/f979ec3204ca489abf30e7d20e9fee9ea7711d36","https://github.com/nodejs/undici/commit/711e20772764c29f6622ddc937c63b6eefdf07d0","https://github.com/nodejs/undici/commit/c2d78cd19fe4f4c621424491e26ce299e65e934a"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2024-30260","published":"2024-04-04","fixed":"6.11.1","kev":false,"link":{"from":"CVE-2024-30260","to":"CVE-2025-22150","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:undici","fromFixed":"5.28.4","toFixed":"5.28.5","daysApart":292}]}},{"cve":"CVE-2024-30261","published":"2024-04-04","fixed":"6.11.1","kev":false},{"cve":"CVE-2024-38372","published":"2024-07-08","fixed":"6.19.2","kev":false},{"cve":"CVE-2025-22150","published":"2025-01-21","fixed":"7.2.3","kev":false},{"cve":"CVE-2025-47279","published":"2025-05-15","fixed":"7.5.0","kev":false,"link":{"from":"CVE-2025-22150","to":"CVE-2025-47279","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:undici","fromFixed":"5.28.5","toFixed":"5.29.0","daysApart":114},{"kind":"version-step","provenance":"source","package":"npm:undici","fromFixed":"6.21.1","toFixed":"6.21.2","daysApart":114}]}},{"cve":"CVE-2026-22036","published":"2026-01-14","fixed":"7.18.2","kev":false},{"cve":"CVE-2026-1525","published":"2026-03-12","fixed":"7.24.0","kev":false}],"package":"npm:undici"}}