{"id":"CVE-2025-22150","aliases":["CVE-2025-22150","GHSA-c76h-2ccp-4975"],"related":[],"kind":"vulnerability","state":"published","title":"Undici Uses Insufficiently Random Values","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\n[Undici `fetch()` uses Math.random()](https://github.com/nodejs/undici/blob/8b06b8250907d92fead664b3368f1d2aa27c1f35/lib/web/fetch/body.js#L113) 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.\n\nIf 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.\n\n### Patches\n\nThis is fixed in 5.28.5; 6.21.1; 7.2.3.\n\n### Workarounds\n\nDo not issue multipart requests to attacker controlled servers.\n\n### References\n\n* https://hackerone.com/reports/2913312\n* https://blog.securityevaluators.com/hacking-the-javascript-lottery-80cc437e3b7f","format":"markdown","source":"ghsa"},{"lang":"es","text":"Undici es un cliente HTTP/1.1. A partir de la versión 4.5.0 y antes de las versiones 5.28.5, 6.21.1 y 7.2.3, undici usa `Math.random()` para elegir el límite de una solicitud multiparte/form-data. Se sabe que la salida de `Math.random()` se puede predecir si se conocen varios de sus valores generados. Si hay un mecanismo en una aplicación que envía solicitudes multiparte a un sitio web controlado por un atacante, este puede usarlo para filtrar los valores necesarios. Por lo tanto, un atacante puede manipular las solicitudes que van a las API de backend si se cumplen ciertas condiciones. Esto se solucionó en las versiones 5.28.5, 6.21.1 y 7.2.3. Como workaround, no envíe solicitudes multiparte a servidores controlados por un atacante.","source":"nvd"}],"published":"2025-01-21T17:46:58.872Z","modified":"2026-09-10T03:50:56.329Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","score":6.8,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","score":6.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-330"],"affected":[{"ranges":[{"version":">= 4.5.0, < 5.28.5","status":"affected"},{"version":">= 6.0.0, < 6.21.1","status":"affected"},{"version":">= 7.0.0, < 7.2.3","status":"affected"}],"vendor":"nodejs","product":"undici","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.5.0","status":"affected","fixed":"5.28.5"}],"ecosystem":"npm","package":"undici","purl":"pkg:npm/undici","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"6.0.0","status":"affected","fixed":"6.21.1"}],"ecosystem":"npm","package":"undici","purl":"pkg:npm/undici","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"7.0.0","status":"affected","fixed":"7.2.3"}],"ecosystem":"npm","package":"undici","purl":"pkg:npm/undici","source":"ghsa"}],"references":[{"url":"https://github.com/nodejs/undici/security/advisories/GHSA-c76h-2ccp-4975","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nodejs/undici/commit/711e20772764c29f6622ddc937c63b6eefdf07d0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nodejs/undici/commit/c2d78cd19fe4f4c621424491e26ce299e65e934a","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nodejs/undici/commit/c3acc6050b781b827d80c86cbbab34f14458d385","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://hackerone.com/reports/2913312","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://blog.securityevaluators.com/hacking-the-javascript-lottery-80cc437e3b7f","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nodejs/undici/blob/8b06b8250907d92fead664b3368f1d2aa27c1f35/lib/web/fetch/body.js#L113","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-22150","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nodejs/undici","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-01-21T18:34:22.789Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-22150","url":"https://www.cve.org/CVERecord?id=CVE-2025-22150","licence":"CVE Terms of Use","modified":"2025-02-12T20:41:22.041Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-c76h-2ccp-4975","url":"https://github.com/advisories/GHSA-c76h-2ccp-4975","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:56.329Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-22150","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-22150","licence":"Public domain","modified":"2026-06-17T08:45:21.600Z"}],"updatedAt":"2026-11-25T22:58:53.464Z","epss":{"score":0.00778,"percentile":0.57062,"date":"2026-12-01T12:00:22.000Z"}}