CVE-2023-35174: Livebook Livebook Desktop's Protocol Handler Can Vulnerability

HIGH
Advisory Identifier: GHSA-564w-97r7-c6p9
CVSS 8.6
CWE-78
Published
Advisory Summary

CVE-2023-35174 is a HIGH (CVSS 8.6) livebook desktop's protocol handler can vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Livebook libraries in the Hex ecosystem. The issue involves livebook desktop's protocol handler can be exploited to execute arbitrary command on windows. Remediation is available by upgrading affected packages to version 0.8.2, 0.9.3.

CVE-2023-35174 at a Glance

CVE Identifier CVE-2023-35174
GHSA Identifier GHSA-564w-97r7-c6p9
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Livebook
Package Ecosystem Hex
Published Date
Last Updated

Security Impact

CVSS: 8.6

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:N/S:U/C:L/I:H/A:L).

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

How to Fix CVE-2023-35174

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

livebook fixed: 0.8.2
Upgrade livebook to 0.8.2
livebook fixed: 0.9.3
Upgrade livebook to 0.9.3
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 livebook

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-35174, inspect your project dependencies for Livebook:

inspect dependencies for livebook

Analyze the terminal output to locate any version of Livebook in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.2), 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 CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Livebook, 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

On Windows, it is possible to open a `livebook://` link from a browser which opens Livebook Desktop and triggers arbitrary code execution on victim's machine. Any user using Livebook Desktop on Windows is potentially vulnerable to arbitrary code execution when they expect Livebook to be opened from browser.

CVE-2023-35174 Affected Livebook Versions

2 component(s)
Fixed Versions:
0.8.20.9.3
Product / Package Ecosystem Affected Versions Fixed Version
livebook
Hex
≥ 0.8.0
< 0.8.2
0.8.2
livebook
Hex
≥ 0.9.0
< 0.9.3
0.9.3

References

Frequently Asked Questions

What is CVE-2023-35174?
CVE-2023-35174 is a security vulnerability in Livebook involving Livebook Desktop's protocol handler can be exploited to execute arbitrary command on Windows under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Livebook versions are affected?
Affected versions include releases prior to 0.8.2, 0.9.3 across affected packages: livebook.
What version fixes CVE-2023-35174?
Upgrading to 0.8.2, 0.9.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is livebook affected?
Yes, livebook is affected in releases prior to 0.8.2, 0.9.3. Upgrade your dependency to 0.8.2, 0.9.3 or later.
What is the CVSS score of CVE-2023-35174?
CVE-2023-35174 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L.
What CWE is associated with CVE-2023-35174?
CVE-2023-35174 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check Hex dependencies for CVE-2023-35174?
Run the dependency tree command: 'inspect dependencies for livebook'. 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-564w-97r7-c6p9",
  "modified" : "2023-06-22T17:26:28Z",
  "published" : "2023-06-21T22:07:37Z",
  "aliases" : [ "CVE-2023-35174" ],
  "summary" : "Livebook Desktop's protocol handler can be exploited to execute arbitrary command on Windows",
  "details" : "On Windows, it is possible to open a `livebook://` link from a browser which opens Livebook Desktop and triggers arbitrary code execution on victim's machine.\n\nAny user using Livebook Desktop on Windows is potentially vulnerable to arbitrary code execution when they expect Livebook to be opened from browser.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "livebook"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.8.0"
      }, {
        "fixed" : "0.8.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Hex",
      "name" : "livebook"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.9.0"
      }, {
        "fixed" : "0.9.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/livebook-dev/livebook/security/advisories/GHSA-564w-97r7-c6p9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-35174"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/livebook-dev/livebook/commit/2e11b59f677c6ed3b6aa82dad412a8b3406ffdf1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/livebook-dev/livebook/commit/beb10daaadcc765f0380e436bd7cd5f74cf086c8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/livebook-dev/livebook"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/livebook-dev/livebook/releases/tag/v0.8.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/livebook-dev/livebook/releases/tag/v0.9.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-21T22:07:37Z",
    "nvd_published_at" : "2023-06-22T14:15:09Z"
  }
}