CVE-2021-21415
JSON

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 packageVersionsReported by
prisma language-tools>= 2.1.0, < 2.20.0, < 20.0.27, before 2.20.0CVE List, NVD

All scores

GitHub_M7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD6.8medium CVSS:2.0AV: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.&#xa0;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.&#xa0;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".&#xa0;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.&#xa0;Corregido en las versiones 2.20.0 y 20.0.27.&#xa0;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

SourceRecordLicence
CVE ListCVE-2021-21415 changed 2024-08-03CVE Terms of Use
NVDCVE-2021-21415 changed 2026-06-17Public domain