CVE-2023-45143
Undici's cookie header not cleared on cross-origin redirect in fetch
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
Undici is an HTTP/1.1 client written from scratch for Node.js. Prior to version 5.26.2, Undici already cleared Authorization headers on cross-origin redirects, but did not clear `Cookie` headers. By design, `cookie` headers are forbidden request headers, disallowing them to be set in RequestInit.headers in browser environments. Since undici handles headers more liberally than the spec, there was a disconnect from the assumptions the spec made, and undici's implementation of fetch. As such this may lead to accidental leakage of cookie to a third-party site or a malicious attacker who can control the redirection target (ie. an open redirector) to leak the cookie to the third party site. This was patched in version 5.26.2. There are no known workarounds.
Undici es un cliente HTTP/1.1 escrito desde cero para Node.js. Antes de la versión 5.26.2, Undici ya borraba los encabezados de Autorización en redireccionamientos entre orígenes, pero no borraba los encabezados de "Cookie". Por diseño, los encabezados de "cookie" son encabezados de solicitud prohibidos, lo que no permite que se establezcan en RequestInit.headers en entornos de navegador. Dado que undici maneja los encabezados de manera más liberal que la especificación, hubo una desconexión con las suposiciones que hizo la especificación y la implementación de fetch por parte de undici. Como tal, esto puede provocar una fuga accidental de cookies a un sitio de terceros o que un atacante malicioso que pueda controlar el objetivo de la redirección (es decir, un redirector abierto) filtre la cookie al sitio de terceros. Esto fue parcheado en la versión 5.26.2. No se conocen workarounds.
A flaw was found in the Undici node package due to the occurrence of Cross-origin requests, possibly leading to a cookie header leakage. By default, cookie headers are forbidden request headers, and they must be enabled. This flaw allows a malicious user to access this leaked cookie if they have control of the redirection.
CVSS Scores
SSVC
- Decision:Track
Timeline
- 2023-10-04 CVE Reserved
- 2023-10-12 CVE Published
- 2024-09-17 CVE Updated
- 2024-10-18 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
CAPEC
References (12)
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://github.com/nodejs/undici/commit/e041de359221ebeae04c469e8aff4145764e6d76 | 2024-02-16 |
URL | Date | SRC |
---|---|---|
https://github.com/nodejs/undici/security/advisories/GHSA-wqq4-5wpv-mx2g | 2024-02-16 | |
https://access.redhat.com/security/cve/CVE-2023-45143 | 2023-11-14 | |
https://bugzilla.redhat.com/show_bug.cgi?id=2244104 | 2023-11-14 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Nodejs Search vendor "Nodejs" | Undici Search vendor "Nodejs" for product "Undici" | < 5.26.2 Search vendor "Nodejs" for product "Undici" and version " < 5.26.2" | node.js |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 37 Search vendor "Fedoraproject" for product "Fedora" and version "37" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 38 Search vendor "Fedoraproject" for product "Fedora" and version "38" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 39 Search vendor "Fedoraproject" for product "Fedora" and version "39" | - |
Affected
|