7.8high
Visual Studio Code Prisma Extension Remote Code Execution Vulnerability
- Severity
- 7.8high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 2.33% (higher than 83% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
Prisma VS Code a VSCode extension for Prisma schema files. This is a Remote Code Execution Vulnerability that affects all versions of the Prisma VS Code extension older than 2.20.0. If a custom binary path for the Prisma format binary is set in VS Code Settings, for example by downloading a project that has a .vscode/settings.json file that sets a value for "prismaFmtBinPath". That custom binary is executed when auto-formatting is triggered by VS Code or when validation checks are triggered after each keypress on a *.prisma file. Fixed in versions 2.20.0 and 20.0.27. As a workaround users can either edit or delete the `.vscode/settings.json` file or check if the binary is malicious and delete it.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| prisma language-tools | >= 2.1.0, < 2.20.0, < 20.0.27, before 2.20.0 | CVE List, NVD |
All scores
| GitHub_M | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 6.8medium CVSS:2.0 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
Classification
What each source says
CVE List
Prisma VS Code a VSCode extension for Prisma schema files. This is a Remote Code Execution Vulnerability that affects all versions of the Prisma VS Code extension older than 2.20.0. If a custom binary path for the Prisma format binary is set in VS Code Settings, for example by downloading a project that has a .vscode/settings.json file that sets a value for "prismaFmtBinPath". That custom binary is executed when auto-formatting is triggered by VS Code or when validation checks are triggered after each keypress on a *.prisma file. Fixed in versions 2.20.0 and 20.0.27. As a workaround users can either edit or delete the `.vscode/settings.json` file or check if the binary is malicious and delete it.
NVD (es)
Prisma VS Code una extensión de VSCode para archivos de esquema Prisma. Esta es una vulnerabilidad de Ejecución de Código Remota que afecta a todas las versiones de la extensión Prisma VS Code anteriores a 2.20.0. Si una ruta binaria personalizada para el formato binario de Prisma en VS Code Settings es establecida, por ejemplo, al cargar un proyecto que tiene un archivo .vscode/settings.json que establece un valor para "prismaFmtBinPath". Ese binario personalizado se ejecuta cuando el formato automático se activa mediante VS Code o cuando se activan las validaciones de comprobación después de cada pulsación de tecla en un archivo *.prisma. Corregido en las versiones 2.20.0 y 20.0.27. Como solución alternativa, los usuarios pueden editar o eliminar el archivo "vscode/settings.json" o comprobar si el binario es malicioso y eliminarlo
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-21415 changed 2024-08-03 | CVE Terms of Use |
| NVD | CVE-2021-21415 changed 2026-06-17 | Public domain |