7.2high
Deno's Node.js Compatibility Runtime has Cross-Session Data Contamination
- Severity
- 7.2high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.72% (higher than 55% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-wrqv-pf6j-mqjp
Description
Deno is a JavaScript, TypeScript, and WebAssembly runtime. Starting in version 1.35.1 and prior to version 1.36.3, a vulnerability in Deno's Node.js compatibility runtime allows for cross-session data contamination during simultaneous asynchronous reads from Node.js streams sourced from sockets or files. The issue arises from the re-use of a global buffer (BUF) in stream_wrap.ts used as a performance optimization to limit allocations during these asynchronous read operations. This can lead to data intended for one session being received by another session, potentially resulting in data corruption and unexpected behavior. This affects all users of Deno that use the node.js compatibility layer for network communication or other streams, including packages that may require node.js libraries indirectly. Version 1.36.3 contains a patch for this issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| denoland deno | >= 1.35.1, < 1.36.3, from 1.35.1 up to 1.36.3 | CVE List |
| deno (crates.io) | from 1.35.1 before 1.36.3 | GitHub Advisory Database |
| deno deno | from 1.35.1 before 1.36.3 | NVD |
All scores
| GitHub_M | 7.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:L |
| GitHub | 7.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:L |
| NVD | 8.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
Deno is a JavaScript, TypeScript, and WebAssembly runtime. Starting in version 1.35.1 and prior to version 1.36.3, a vulnerability in Deno's Node.js compatibility runtime allows for cross-session data contamination during simultaneous asynchronous reads from Node.js streams sourced from sockets or files. The issue arises from the re-use of a global buffer (BUF) in stream_wrap.ts used as a performance optimization to limit allocations during these asynchronous read operations. This can lead to data intended for one session being received by another session, potentially resulting in data corruption and unexpected behavior. This affects all users of Deno that use the node.js compatibility layer for network communication or other streams, including packages that may require node.js libraries indirectly. Version 1.36.3 contains a patch for this issue.
GitHub Advisory Database
Summary
A vulnerability in Deno's Node.js compatibility runtime allows for cross-session data contamination during simultaneous asynchronous reads from Node.js streams sourced from sockets or files. The issue arises from the re-use of a global buffer (BUF) in stream_wrap.ts used as a performance optimization to limit allocations during these asynchronous read operations. This can lead to data intended for one session being received by another session, potentially resulting in data corruption and unexpected behavior.
Details
A bug in Deno's Node.js compatibility runtime results in data cross-reception during simultaneous asynchronous reads from Node.js network streams. When multiple independent network socket connections are involved, this vulnerability can be triggered. For instance, two separate server sockets that receive data from their respective client sockets and then echo the received data back to the client using Node.js streams may experience an issue where data from one socket may appear on another socket. Due to the improper isolation of the global buffer (BUF), data sent by one socket can end up being incorrectly received by another socket. Consequently, data intended for one session may be exposed to another session, potentially leading to data corruption and unexpected behavior.
This buffer was introduced as a performance optimization to avoid excessive allocations during network read operations.
In cases where the net.Stream is connected to a remote server such as a database or key/value store such as Redis, this may result in a packet received on one connection being presented to another, causing data cross-contamination between multiple users and potentially leaking sensitive information.
It is important to note that this vulnerability does not affect Deno network streams created with the Deno.listen and Deno.connect APIs.
The impact of this issue may extend beyond node.js network streams, however, and may also affect asynchronous reads from non-network node.js Stream such as those created from files.
PoC
https://github.com/denoland/deno/issues/20188
Impact
This affects all users of Deno that use the node.js compatibility layer for network communication or other streams, including packages that may require node.js libraries indirectly.
NVD (es)
Deno es un tiempo de ejecución de JavaScript, TypeScript y WebAssembly. A partir de la versión 1.35.1 y antes de la versión 1.36.3, una vulnerabilidad en el tiempo de ejecución de compatibilidad de Node.js de Deno permite la contaminación de datos entre sesiones durante lecturas asincrónicas simultáneas de flujos de Node.js provenientes de sockets o archivos. El problema surge de la reutilización de un búfer global (BUF) en stream_wrap.ts utilizado como optimización del rendimiento para limitar las asignaciones durante estas operaciones de lectura asincrónicas. Esto puede provocar que los datos destinados a una sesión sean recibidos por otra sesión, lo que podría provocar daños en los datos y comportamientos inesperados. Esto afecta a todos los usuarios de Deno que usan la capa de compatibilidad de node.js para la comunicación de red u otras transmisiones, incluidos los paquetes que pueden requerir librerías de node.js indirectamente. La versión 1.36.3 contiene un parche para este problema.
References
| https://github.com/denoland/deno/security/advisories/GHSA-wrqv-pf6j-mqjp | vendor-advisory, web | |
| https://github.com/denoland/deno/issues/20188 | exploit, issue-tracking, web | |
| https://github.com/denoland/deno/commit/3e9fb8aafd9834ebacd27734cea4310caaf794c6 | patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2024-27935 | advisory | |
| https://github.com/denoland/deno | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-27935 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-wrqv-pf6j-mqjp changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-27935 changed 2026-06-17 | Public domain |