GHSA-x563-6hqv-26mr: Ibis framework Ibis PyArrow Dependency Allows Arbitrary Vulnerability

CRITICAL
CWE-502
Published
Advisory Summary

GHSA-x563-6hqv-26mr is a CRITICAL ibis pyarrow dependency allows arbitrary vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Ibis framework libraries in the PyPI ecosystem. The issue involves ibis pyarrow dependency allows arbitrary code execution when loading a malicious data file. Remediation is available by upgrading affected packages to version 7.1.0.

GHSA-x563-6hqv-26mr at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-x563-6hqv-26mr
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Ibis framework
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix GHSA-x563-6hqv-26mr

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

ibis-framework fixed: 7.1.0
pip install ibis-framework>=7.1.0
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 ibis-framework

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-x563-6hqv-26mr, inspect your installed packages using pip:

pip show ibis-framework

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Ibis framework, 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 Deserialization of untrusted data in IPC and Parquet readers in PyArrow versions 0.14.0 to 14.0.0 allows arbitrary code execution. An application is vulnerable if it reads Arrow IPC, Feather or Parquet data from untrusted sources (for example user-supplied input files). This vulnerability only affects PyArrow, not other Apache Arrow implementations or bindings. Note that Ibis itself makes **extremely limited** use of `pyarrow.parquet.read_table`: 1. `read_table` is used in tests, where the input file is entirely controlled by the Ibis developers 2. `read_table` is used in the `ibis/examples/__init__.py` as a fallback for backends that don't support reading Parquet directly. Parquet data used in `ibis.examples` are also managed by the Ibis developers. This Parquet data is generated from CSV files and SQLite databases. 3. The Pandas and Dask backends both use PyArrow to read Parquet files and are therefore affected. Ibis **does not** make use of APIs that directly read from either Arrow IPC files or Feather files. ### Patches Ibis imports the `pyarrow_hotfix` package wherever pyarrow is used, as of version 7.1.0. Upgrading to Arrow 14.0.1 is also a possible solution, starting in Ibis 7.1.0. ### Workarounds Install [`pyarrow_hotfix`](https://pypi.org/project/pyarrow-hotfix/) and run `import pyarrow_hotfix` ahead of any and all `import ibis` statements. For example: ```python import ibis ``` becomes ```python import pyarrow_hotfix import ibis ``` ### References https://www.cve.org/CVERecord?id=CVE-2023-47248 https://nvd.nist.gov/vuln/detail/CVE-2023-47248

GHSA-x563-6hqv-26mr Affected Ibis framework Versions

1 component(s)
Fixed Versions:
7.1.0
Product / Package Ecosystem Affected Versions Fixed Version
ibis-framework
PyPI
< 7.1.0
7.1.0

References

Frequently Asked Questions

What is GHSA-x563-6hqv-26mr?
GHSA-x563-6hqv-26mr is a security vulnerability in Ibis framework involving Ibis PyArrow dependency allows arbitrary code execution when loading a malicious data file under CWE-502: Deserialization of Untrusted Data.
Which Ibis framework versions are affected?
Affected versions include releases prior to 7.1.0 across affected packages: ibis-framework.
What version fixes GHSA-x563-6hqv-26mr?
Upgrading to 7.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ibis-framework affected?
Yes, ibis-framework is affected in releases prior to 7.1.0. Upgrade your dependency to 7.1.0 or later.
What CWE is associated with GHSA-x563-6hqv-26mr?
GHSA-x563-6hqv-26mr is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check PyPI dependencies for GHSA-x563-6hqv-26mr?
Run the dependency tree command: 'pip show ibis-framework'. 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-x563-6hqv-26mr",
  "modified" : "2023-11-17T21:47:11Z",
  "published" : "2023-11-17T21:47:11Z",
  "aliases" : [ ],
  "summary" : "Ibis PyArrow dependency allows arbitrary code execution when loading a malicious data file",
  "details" : "### Impact\n\nDeserialization of untrusted data in IPC and Parquet readers in PyArrow versions 0.14.0 to 14.0.0 allows arbitrary code execution. An application is vulnerable if it reads Arrow IPC, Feather or Parquet data from untrusted sources (for example user-supplied input files). This vulnerability only affects PyArrow, not other Apache Arrow implementations or bindings.\n\nNote that Ibis itself makes **extremely limited** use of `pyarrow.parquet.read_table`:\n\n1. `read_table` is used in tests, where the input file is entirely controlled by the Ibis developers\n2. `read_table` is used in the `ibis/examples/__init__.py` as a fallback for backends that don't support reading Parquet directly. Parquet data used in `ibis.examples` are also managed by the Ibis developers. This Parquet data is generated from CSV files and SQLite databases.\n3. The Pandas and Dask backends both use PyArrow to read Parquet files and are therefore affected.\n\nIbis **does not** make use of APIs that directly read from either Arrow IPC files or Feather files.\n\n### Patches\n\nIbis imports the `pyarrow_hotfix` package wherever pyarrow is used, as of version 7.1.0.\n\nUpgrading to Arrow 14.0.1 is also a possible solution, starting in Ibis 7.1.0.\n\n### Workarounds\n\nInstall [`pyarrow_hotfix`](https://pypi.org/project/pyarrow-hotfix/) and run `import pyarrow_hotfix` ahead of any and all `import ibis` statements.\n\nFor example:\n\n```python\nimport ibis\n```\n\nbecomes\n\n```python\nimport pyarrow_hotfix\nimport ibis\n```\n\n### References\n\nhttps://www.cve.org/CVERecord?id=CVE-2023-47248\nhttps://nvd.nist.gov/vuln/detail/CVE-2023-47248",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "ibis-framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ibis-project/ibis/security/advisories/GHSA-x563-6hqv-26mr"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ibis-project/ibis/commit/0fa1e5dc06783c01e912e8de4d7e10186ca0e364"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ibis-project/ibis"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ibis-project/ibis/releases/tag/7.1.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-11-17T21:47:11Z",
    "nvd_published_at" : null
  }
}