7.7high
Race condition when flushing input stream leads to permission prompt bypass
- Severity
- 7.7high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.41% (higher than 27% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
Deno is a JavaScript, TypeScript, and WebAssembly runtime with secure defaults. By using ANSI escape sequences and a race between `libc::tcflush(0, libc::TCIFLUSH)` and reading standard input, it's possible to manipulate the permission prompt and force it to allow an unsafe action regardless of the user input. Some ANSI escape sequences act as a info request to the master terminal emulator and the terminal emulator sends back the reply in the PTY channel. standard streams also use this channel to send and get data. For example the `\033[6n` sequence requests the current cursor position. These sequences allow us to append data to the standard input of Deno. This vulnerability allows an attacker to bypass Deno permission policy. This vulnerability is fixed in 1.42.2.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| denoland deno | < 1.42.2 | CVE List |
| deno deno | 1.42.2, before 1.42.2 | CVE List, NVD |
All scores
| GitHub_M | 7.7high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| NVD | 7.4high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
Classification
What each source says
CVE List
Deno is a JavaScript, TypeScript, and WebAssembly runtime with secure defaults. By using ANSI escape sequences and a race between `libc::tcflush(0, libc::TCIFLUSH)` and reading standard input, it's possible to manipulate the permission prompt and force it to allow an unsafe action regardless of the user input. Some ANSI escape sequences act as a info request to the master terminal emulator and the terminal emulator sends back the reply in the PTY channel. standard streams also use this channel to send and get data. For example the `\033[6n` sequence requests the current cursor position. These sequences allow us to append data to the standard input of Deno. This vulnerability allows an attacker to bypass Deno permission policy. This vulnerability is fixed in 1.42.2.
NVD (es)
Deno es un tiempo de ejecución de JavaScript, TypeScript y WebAssembly con valores predeterminados seguros. Al usar secuencias de escape ANSI y una ejecución entre `libc::tcflush(0, libc::TCIFLUSH)` y leer la entrada estándar, es posible manipular el mensaje de permiso y forzarlo a permitir una acción insegura independientemente de la entrada del usuario. Algunas secuencias de escape ANSI actúan como una solicitud de información al emulador de terminal maestro y el emulador de terminal devuelve la respuesta en el canal PTY. Las transmisiones estándar también utilizan este canal para enviar y recibir datos. Por ejemplo, la secuencia `\033[6n` solicita la posición actual del cursor. Estas secuencias nos permiten agregar datos a la entrada estándar de Deno. Esta vulnerabilidad permite a un atacante eludir la política de permisos de Deno. Esta vulnerabilidad se solucionó en 1.42.2.
References
| https://github.com/denoland/deno/security/advisories/GHSA-95cj-3hr2-7j5j | exploit, vendor-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-32477 changed 2024-08-02 | CVE Terms of Use |
| NVD | CVE-2024-32477 changed 2026-06-17 | Public domain |