GHSA-jcmq-5rrv-j2g4: PowerShell Remote Code Execution Vulnerability

HIGH
CVSS 8.8
Published
Advisory Summary

GHSA-jcmq-5rrv-j2g4 is a HIGH (CVSS 8.8) remote code execution vulnerability (General Security Weakness) affecting PowerShell libraries in the NuGet ecosystem. The issue involves powershell is subject to remote code execution vulnerability. Remediation is available by upgrading affected packages to version 7.0.0.

GHSA-jcmq-5rrv-j2g4 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-jcmq-5rrv-j2g4
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification General Security Weakness
Affected Product PowerShell
Package Ecosystem NuGet
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix GHSA-jcmq-5rrv-j2g4

To remediate this vulnerability, upgrade all affected PowerShell dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

PowerShell fixed: 7.0.0
Upgrade PowerShell to 7.0.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for PowerShell

How to Check if You Are Affected

To determine whether your application is affected by GHSA-jcmq-5rrv-j2g4, inspect your project dependencies for PowerShell:

inspect dependencies for PowerShell

Analyze the terminal output to locate any version of PowerShell in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.0.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In PowerShell, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# Microsoft Security Advisory CVE-2020-0605: .NET Framework Remote Code Execution Vulnerability ## Executive Summary A remote code execution vulnerability exists in .NET software when the software fails to check the source markup of a file. An attacker who successfully exploited the vulnerability could run arbitrary code in the context of the current user. If the current user is logged on with administrative user rights, an attacker could take control of the affected system. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights. Exploitation of the vulnerability requires that a user open a specially crafted file with an affected version of .NET Framework. In an email attack scenario, an attacker could exploit the vulnerability by sending the specially crafted file to the user and convincing the user to open the file. The security update addresses the vulnerability by correcting how .NET Framework checks the source markup of a file. ## Discussion Please [open a support question](https://github.com/PowerShell/PowerShell/issues/new?assignees=&labels=Issue-Question&template=Support_Question.md&title=Support+Question) to discuss the PowerShell aspects of this advisory. Please use https://github.com/dotnet/wpf/issues/2424 for discussion of the .NET WPF aspects of this advisory. ## <a name="affected-software">Affected Software</a> The vulnerability affects PowerShell prior to the following versions: | PowerShell Core Version | Fixed in | |-------------------------|-------------------| | 6.2 | Not Affected | | 7.0 | 7.0.0 | ## Advisory FAQ ### How do I know if I am affected? If all of the following are true: 1. Run `pwsh -v`, then, check the version in the table in [Affected Software](#user-content-affected-software) to see if your version of PowerShell is affected. 1. If you are running a version of PowerShell where the executable is not `pwsh` or `pwsh.exe`, then you are affected. This only existed for preview version of `7.0`. ### How do I update to an unaffected version? Follow the instructions at [Installing PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell?view=powershell-7) to install the latest version of PowerShell. ## Other Information ### Reporting Security Issues If you have found a potential security issue in PowerShell, please email details to secure@microsoft.com. ### Support You can ask questions about this issue on GitHub in the PowerShell organization. This is located at https://github.com/PowerShell/. The Announcements repo (https://github.com/PowerShell/Announcements) will contain this bulletin as an issue and will include a link to a discussion issue where you can ask questions. ### What if the update breaks my script or module? You can uninstall the newer version of PowerShell and install the previous version of PowerShell. This should be treated as a temporary measure. Therefore, the script or module should be updated to work with the patched version of PowerShell. ### Acknowledgments Soroush Dalili ([@irsdl](https://twitter.com/irsdl)) ### External Links [CVE-2020-0605](https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-0605) ### Revisions <!-- TBD: update date --> V1.0 (March 10, 2020): Advisory published. *Version 1.0* *Last Updated 2020-03-10*

GHSA-jcmq-5rrv-j2g4 Affected PowerShell Versions

1 component(s)
Fixed Versions:
7.0.0
Product / Package Ecosystem Affected Versions Fixed Version
PowerShell
NuGet
< 7.0.0
7.0.0

References

Frequently Asked Questions

What is GHSA-jcmq-5rrv-j2g4?
GHSA-jcmq-5rrv-j2g4 is a security vulnerability in PowerShell involving PowerShell is subject to remote code execution vulnerability under General Security Weakness.
Which PowerShell versions are affected?
Affected versions include releases prior to 7.0.0 across affected packages: PowerShell.
What version fixes GHSA-jcmq-5rrv-j2g4?
Upgrading to 7.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is PowerShell affected?
Yes, PowerShell is affected in releases prior to 7.0.0. Upgrade your dependency to 7.0.0 or later.
What is the CVSS score of GHSA-jcmq-5rrv-j2g4?
GHSA-jcmq-5rrv-j2g4 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with GHSA-jcmq-5rrv-j2g4?
GHSA-jcmq-5rrv-j2g4 is classified under General Security Weakness.
How can I check NuGet dependencies for GHSA-jcmq-5rrv-j2g4?
Run the dependency tree command: 'inspect dependencies for PowerShell'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jcmq-5rrv-j2g4",
  "modified" : "2024-02-02T21:04:47Z",
  "published" : "2024-02-02T21:04:47Z",
  "aliases" : [ ],
  "summary" : "PowerShell is subject to remote code execution vulnerability",
  "details" : "# Microsoft Security Advisory CVE-2020-0605: .NET Framework Remote Code Execution Vulnerability\n\n## Executive Summary\n\nA remote code execution vulnerability exists in .NET software when the software fails to check the source markup of a file.\n\nAn attacker who successfully exploited the vulnerability could run arbitrary code in the context of the current user. If the current user is logged on with administrative user rights, an attacker could take control of the affected system. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights.\n\nExploitation of the vulnerability requires that a user open a specially crafted file with an affected version of .NET Framework. In an email attack scenario, an attacker could exploit the vulnerability by sending the specially crafted file to the user and convincing the user to open the file.\n\nThe security update addresses the vulnerability by correcting how .NET Framework checks the source markup of a file.\n\n## Discussion\n\nPlease [open a support question](https://github.com/PowerShell/PowerShell/issues/new?assignees=&labels=Issue-Question&template=Support_Question.md&title=Support+Question) to discuss the PowerShell aspects of this advisory.\nPlease use https://github.com/dotnet/wpf/issues/2424 for discussion of the .NET WPF aspects of this advisory.\n\n## <a name=\"affected-software\">Affected Software</a>\n\nThe vulnerability affects PowerShell prior to the following versions:\n\n| PowerShell Core Version | Fixed in          |\n|-------------------------|-------------------|\n| 6.2                     | Not Affected              |\n| 7.0                     | 7.0.0              |\n## Advisory FAQ\n\n### How do I know if I am affected?\n\nIf all of the following are true:\n\n1. Run `pwsh -v`, then, check the version in the table in [Affected Software](#user-content-affected-software) to see if your version of PowerShell is affected.\n1. If you are running a version of PowerShell where the executable is not `pwsh` or `pwsh.exe`, then you are affected.  This only existed for preview version of `7.0`.\n\n### How do I update to an unaffected version?\n\nFollow the instructions at [Installing PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell?view=powershell-7) to install the latest version of PowerShell.\n\n## Other Information\n\n### Reporting Security Issues\n\nIf you have found a potential security issue in PowerShell,\nplease email details to secure@microsoft.com.\n\n### Support\n\nYou can ask questions about this issue on GitHub in the PowerShell organization.\nThis is located at https://github.com/PowerShell/.\nThe Announcements repo (https://github.com/PowerShell/Announcements)\nwill contain this bulletin as an issue and will include a link to a discussion issue where you can ask questions.\n\n### What if the update breaks my script or module?\n\nYou can uninstall the newer version of PowerShell and install the previous version of PowerShell.\nThis should be treated as a temporary measure.\nTherefore, the script or module should be updated to work with the patched version of PowerShell.\n\n### Acknowledgments\n\nSoroush Dalili ([@irsdl](https://twitter.com/irsdl))\n\n### External Links\n\n[CVE-2020-0605](https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-0605)\n\n### Revisions\n\n<!-- TBD: update date -->\nV1.0 (March 10, 2020): Advisory published.\n\n*Version 1.0*\n*Last Updated 2020-03-10*",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "PowerShell"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/PowerShell/PowerShell/security/advisories/GHSA-jcmq-5rrv-j2g4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-02T21:04:47Z",
    "nvd_published_at" : null
  }
}