Skip to content

Visual Studio Code Prisma Extension Remote Code Execution Vulnerability

High
Jolg42 published GHSA-4rf9-43m7-x828 Mar 31, 2021

Package

Prisma.prisma (VS Code Extension)

Affected versions

<2.20.0

Patched versions

>2.20.0

Description

Impact

This is a Remote Code Execution Vulnerability that affects all versions of 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.

Patches

Fixed in

Workarounds

Users can

  • edit or delete the .vscode/settings.json file
  • check if the binary is malicious and delete it

References

Similar CVE: Visual Studio Code ESLint Extension Remote Code Execution Vulnerability https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-27081

Pull Request for Prisma VS Code extension closing this vulnerability #750

Acknowledgements

For more information

If you have any questions or comments about this advisory:

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

CVE ID

CVE-2021-21415

Weaknesses

No CWEs

Credits