Vulnerabilities in pkg:pypi/galaxy-importer

PACKAGE
Advisory Identifier: GHSA-55g2-vm3q-7w52
Advisory Summary

CVE-2023-5189 is a MODERATE (CVSS 6.3) path traversal vulnerability (CWE-23: Relative Path Traversal) affecting Galaxy importer libraries in the PyPI ecosystem. The issue involves ansible galaxy-importer path traversal vulnerability. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/galaxy-importer

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/galaxy-importer. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-55g2-vm3q-7w52 CVE-2023-5189 MODERATE Ansible galaxy-importer Path Traversal vulnerability

CVE-2023-5189 at a Glance

CVE Identifier CVE-2023-5189
GHSA Identifier GHSA-55g2-vm3q-7w52
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-23: Relative Path Traversal
Affected Product Galaxy importer
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.3

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

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

How to Fix CVE-2023-5189

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

galaxy-importer fixed: Latest secure release
pip install galaxy-importer>=Latest secure release
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 galaxy-importer

How to Check if You Are Affected

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

pip show galaxy-importer

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In Galaxy importer, 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

A path traversal vulnerability exists in Ansible when extracting tarballs. An attacker could craft a malicious tarball so that when using the galaxy importer of Ansible Automation Hub, a symlink could be dropped on the disk, resulting in files being overwritten.

CVE-2023-5189 Affected Galaxy importer Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
galaxy-importer
PyPI
≤ 0.4.16

References

Frequently Asked Questions

What is CVE-2023-5189?
CVE-2023-5189 is a security vulnerability in Galaxy importer involving Ansible galaxy-importer Path Traversal vulnerability under CWE-23: Relative Path Traversal.
Which Galaxy importer versions are affected?
Affected versions include releases prior to current release patches across affected packages: galaxy-importer.
What version fixes CVE-2023-5189?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is galaxy-importer affected?
Yes, galaxy-importer is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2023-5189?
CVE-2023-5189 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:N.
What CWE is associated with CVE-2023-5189?
CVE-2023-5189 is classified under CWE-23: Relative Path Traversal (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.).
How can I check PyPI dependencies for CVE-2023-5189?
Run the dependency tree command: 'pip show galaxy-importer'. 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-55g2-vm3q-7w52",
  "modified" : "2024-12-06T18:06:33Z",
  "published" : "2023-11-15T00:31:08Z",
  "aliases" : [ "CVE-2023-5189" ],
  "summary" : "Ansible galaxy-importer Path Traversal vulnerability",
  "details" : "A path traversal vulnerability exists in Ansible when extracting tarballs. An attacker could craft a malicious tarball so that when using the galaxy importer of Ansible Automation Hub, a symlink could be dropped on the disk, resulting in files being overwritten.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "galaxy-importer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.4.16"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-5189"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2023:7773"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:1536"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2024:2010"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2023-5189"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2234387"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ansible/galaxy-importer"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ansible/galaxy-importer/blob/2c5c7c05fdfb0835878234b36de32902c703616d/galaxy_importer/collection.py#L160-L165"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-23" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-11-16T20:16:05Z",
    "nvd_published_at" : "2023-11-14T23:15:12Z"
  }
}