CVE-2022-39286: Jupyter core Execution With Unnecessary Privileges Vulnerability

HIGH
Advisory Identifier: GHSA-m678-f26j-3hrp
CVSS 8.8
CWE-269 CWE-427 CWE-250
Published
Advisory Summary

CVE-2022-39286 is a HIGH (CVSS 8.8) execution with unnecessary privileges vulnerability (CWE-269: Improper Privilege Management) affecting Jupyter core libraries in the PyPI ecosystem. The issue involves execution with unnecessary privileges in jupyterapp. Remediation is available by upgrading affected packages to version 4.11.2.

CVE-2022-39286 at a Glance

CVE Identifier CVE-2022-39286
GHSA Identifier GHSA-m678-f26j-3hrp
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-269: Improper Privilege Management
Affected Product Jupyter core
Package Ecosystem PyPI
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:L/UI:N/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2022-39286

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

jupyter-core fixed: 4.11.2
pip install jupyter-core>=4.11.2
Verify Direct and Transitive Dependencies

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

pip show jupyter-core

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2022-39286, inspect your installed packages using pip:

pip show jupyter-core

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

Note: The pip show jupyter-core command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Jupyter core, 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

### Impact _What kind of vulnerability is it? Who is impacted?_ We’d like to disclose an arbitrary code execution vulnerability in `jupyter_core` that stems from `jupyter_core` executing untrusted files in the current working directory. This vulnerability allows one user to run code as another. ### Patches _Has the problem been patched? What versions should users upgrade to?_ Users should upgrade to `jupyter_core>=4.11.2`. ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ No ### References _Are there any links users can visit to find out more?_ Similar advisory in [IPython](https://github.com/advisories/GHSA-pq7m-3gw7-gq5x)

CVE-2022-39286 Affected Jupyter core Versions

1 component(s)
Fixed Versions:
4.11.2
Product / Package Ecosystem Affected Versions Fixed Version
jupyter-core
PyPI
< 4.11.2
4.11.2

References

Frequently Asked Questions

What is CVE-2022-39286?
CVE-2022-39286 is a security vulnerability in Jupyter core involving Execution with Unnecessary Privileges in JupyterApp under CWE-269: Improper Privilege Management.
Which Jupyter core versions are affected?
Affected versions include releases prior to 4.11.2 across affected packages: jupyter-core.
What version fixes CVE-2022-39286?
Upgrading to 4.11.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jupyter-core affected?
Yes, jupyter-core is affected in releases prior to 4.11.2. Upgrade your dependency to 4.11.2 or later.
What is the CVSS score of CVE-2022-39286?
CVE-2022-39286 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-39286?
CVE-2022-39286 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check PyPI dependencies for CVE-2022-39286?
Run the dependency tree command: 'pip show jupyter-core'. 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-m678-f26j-3hrp",
  "modified" : "2024-09-24T20:39:29Z",
  "published" : "2022-10-26T22:07:00Z",
  "aliases" : [ "CVE-2022-39286" ],
  "summary" : "Execution with Unnecessary Privileges in JupyterApp",
  "details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\nWe’d like to disclose an arbitrary code execution vulnerability in `jupyter_core` that stems from `jupyter_core` executing untrusted files in the current working directory. This vulnerability allows one user to run code as another.\n\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\nUsers should upgrade to `jupyter_core>=4.11.2`.\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\nNo\n\n### References\n_Are there any links users can visit to find out more?_\nSimilar advisory in [IPython](https://github.com/advisories/GHSA-pq7m-3gw7-gq5x)\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "jupyter-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.11.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jupyter/jupyter_core/security/advisories/GHSA-m678-f26j-3hrp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39286"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyter/jupyter_core/commit/1118c8ce01800cb689d51f655f5ccef19516e283"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jupyter/jupyter_core"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/jupyter-core/PYSEC-2022-42974.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2022/11/msg00022.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KKMP5OXXIX2QAUNVNJZ5UEQFKDYYJVBA"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YIDN7JMLK6AOMBQI4QPSW4MBQGWQ5NIN"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202301-04"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2023/dsa-5422"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-250", "CWE-269", "CWE-427" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-10-26T22:07:00Z",
    "nvd_published_at" : "2022-10-26T20:15:00Z"
  }
}