CVE-2023-53158: Gix transport Gix-transport Code Execution Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-rrjw-j4m2-mf34
CVSS 4.1
CWE-78 CWE-88
Published
Advisory Summary

CVE-2023-53158 is a MODERATE (CVSS 4.1) gix-transport code execution vulnerability vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Gix transport libraries in the crates.io ecosystem. The issue involves gix-transport code execution vulnerability. Remediation is available by upgrading affected packages to version 0.36.1.

CVE-2023-53158 at a Glance

CVE Identifier CVE-2023-53158
GHSA Identifier GHSA-rrjw-j4m2-mf34
Severity MODERATE
CVSS v3.1 Base Score 4.1
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Gix transport
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 4.1

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

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

How to Fix CVE-2023-53158

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

gix-transport fixed: 0.36.1
Upgrade gix-transport to 0.36.1
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 gix-transport

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-53158, inspect your project dependencies for Gix transport:

inspect dependencies for gix-transport

Analyze the terminal output to locate any version of Gix transport in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.36.1), 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 Gix transport, 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

The `gix-transport` crate prior to the patched version 0.36.1 would allow attackers to use malicious ssh clone URLs to pass arbitrary arguments to the `ssh` program, leading to arbitrary code execution. PoC: `gix clone 'ssh://-oProxyCommand=open$IFS-aCalculator/foo'` This will launch a calculator on OSX. See https://secure.phabricator.com/T12961 for more details on similar vulnerabilities in `git`. Thanks for [vin01](https://github.com/vin01) for disclosing this issue.

CVE-2023-53158 Affected Gix transport Versions

1 component(s)
Fixed Versions:
0.36.1
Product / Package Ecosystem Affected Versions Fixed Version
gix-transport
crates.io
< 0.36.1
0.36.1

References

Frequently Asked Questions

What is CVE-2023-53158?
CVE-2023-53158 is a security vulnerability in Gix transport involving gix-transport code execution vulnerability under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Gix transport versions are affected?
Affected versions include releases prior to 0.36.1 across affected packages: gix-transport.
What version fixes CVE-2023-53158?
Upgrading to 0.36.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gix-transport affected?
Yes, gix-transport is affected in releases prior to 0.36.1. Upgrade your dependency to 0.36.1 or later.
What is the CVSS score of CVE-2023-53158?
CVE-2023-53158 has a CVSS v3.1 base score of 4.1 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2023-53158?
CVE-2023-53158 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 crates.io dependencies for CVE-2023-53158?
Run the dependency tree command: 'inspect dependencies for gix-transport'. 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-rrjw-j4m2-mf34",
  "modified" : "2025-07-28T15:37:24Z",
  "published" : "2023-09-25T20:21:16Z",
  "aliases" : [ "CVE-2023-53158" ],
  "summary" : "gix-transport code execution vulnerability",
  "details" : "The `gix-transport` crate prior to the patched version 0.36.1 would allow attackers to use malicious ssh clone URLs to pass arbitrary arguments to the `ssh` program, leading to arbitrary code execution.\n\nPoC: `gix clone 'ssh://-oProxyCommand=open$IFS-aCalculator/foo'`\n\nThis will launch a calculator on OSX.\n\nSee https://secure.phabricator.com/T12961 for more details on similar vulnerabilities in `git`.\n\nThanks for [vin01](https://github.com/vin01) for disclosing this issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "gix-transport"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.36.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-53158"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/GitoxideLabs/gitoxide/pull/1032"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/GitoxideLabs/gitoxide"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2023-0064.html"
  }, {
    "type" : "WEB",
    "url" : "https://secure.phabricator.com/T12961"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78", "CWE-88" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-09-25T20:21:16Z",
    "nvd_published_at" : null
  }
}