Vulnerabilities in pkg:pypi/sqlite-vec

PACKAGE
Advisory Identifier: GHSA-vrcx-gx3g-j3h8
Advisory Summary

CVE-2024-46488 is a HIGH (CVSS 9.1) heap-based buffer overflow vulnerability (CWE-122: Heap-based Buffer Overflow) affecting Sqlite vec libraries in the PyPI ecosystem. The issue involves heap-based buffer overflow in sqlite-vec. Remediation is available by upgrading affected packages to version 0.1.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/sqlite-vec

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-vrcx-gx3g-j3h8 CVE-2024-46488 HIGH Heap-based Buffer Overflow in sqlite-vec

CVE-2024-46488 at a Glance

CVE Identifier CVE-2024-46488
GHSA Identifier GHSA-vrcx-gx3g-j3h8
Severity HIGH
CVSS v3.1 Base Score 9.1
CWE Classification CWE-122: Heap-based Buffer Overflow
Affected Product Sqlite vec
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.1

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

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 High (C:H)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2024-46488

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

sqlite-vec fixed: 0.1.3
pip install sqlite-vec>=0.1.3
sqlite-vec fixed: 0.1.3
npm install sqlite-vec@0.1.3
sqlite-vec fixed: 0.1.3
Upgrade sqlite-vec to 0.1.3
sqlite-vec fixed: 0.1.3
Upgrade sqlite-vec to 0.1.3
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 sqlite-vec

How to Check if You Are Affected

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

pip show sqlite-vec

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-122: Heap-based Buffer Overflow, where a heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc(). In Sqlite vec, 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

sqlite-vec v0.1.1 was discovered to contain a heap buffer overflow via the npy_token_next function. This vulnerability allows attackers to cause a Denial of Service (DoS) via a crafted file.

CVE-2024-46488 Affected Sqlite vec Versions

4 component(s)
Fixed Versions:
0.1.3
Product / Package Ecosystem Affected Versions Fixed Version
sqlite-vec
PyPI
< 0.1.3
0.1.3
sqlite-vec
npm
< 0.1.3
0.1.3
sqlite-vec
RubyGems
< 0.1.3
0.1.3
sqlite-vec
crates.io
< 0.1.3
0.1.3

References

Frequently Asked Questions

What is CVE-2024-46488?
CVE-2024-46488 is a security vulnerability in Sqlite vec involving Heap-based Buffer Overflow in sqlite-vec under CWE-122: Heap-based Buffer Overflow.
Which Sqlite vec versions are affected?
Affected versions include releases prior to 0.1.3 across affected packages: sqlite-vec.
What version fixes CVE-2024-46488?
Upgrading to 0.1.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sqlite-vec affected?
Yes, sqlite-vec is affected in releases prior to 0.1.3. Upgrade your dependency to 0.1.3 or later.
What is the CVSS score of CVE-2024-46488?
CVE-2024-46488 has a CVSS v3.1 base score of 9.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H.
What CWE is associated with CVE-2024-46488?
CVE-2024-46488 is classified under CWE-122: Heap-based Buffer Overflow (A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().).
How can I check PyPI dependencies for CVE-2024-46488?
Run the dependency tree command: 'pip show sqlite-vec'. 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-vrcx-gx3g-j3h8",
  "modified" : "2024-10-02T21:16:02Z",
  "published" : "2024-09-25T18:31:21Z",
  "aliases" : [ "CVE-2024-46488" ],
  "summary" : "Heap-based Buffer Overflow in sqlite-vec",
  "details" : "sqlite-vec v0.1.1 was discovered to contain a heap buffer overflow via the npy_token_next function. This vulnerability allows attackers to cause a Denial of Service (DoS) via a crafted file.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "sqlite-vec"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "sqlite-vec"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sqlite-vec"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "sqlite-vec"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-46488"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/VulnSphere/LLMVulnSphere/blob/main/VectorDB/sqlite-vec/OOBR_2.md"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-vrcx-gx3g-j3h8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/asg017/sqlite-vec"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/asg017/sqlite-vec/releases/tag/v0.1.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sqlite-vec/CVE-2024-46488.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-122", "CWE-787" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-25T22:13:19Z",
    "nvd_published_at" : "2024-09-25T18:15:05Z"
  }
}