Executive brief
Graphite, an embedded graph database engine for Python, is vulnerable to a security flaw when loading database files. If a user opens a specially crafted database file from an untrusted source, an attacker could execute malicious code on the user's system. This could lead to a total compromise of the system, including data theft or unauthorized operations.
Technical details
Graphite (graphitedb) versions prior to 0.2 utilize Python's 'pickle' module for database serialization and deserialization. Because 'pickle' is inherently insecure when processing untrusted data, an attacker can craft a malicious .pkl database file containing a payload that executes arbitrary code upon being loaded by the engine. The attack requires local access to provide the file and user interaction to trigger the loading process. The vulnerability was addressed in version 0.2 by migrating the storage format from pickle to JSON and disabling pickle loading.
Affected products
- mkh-user graphitedb < 0.2
Timeline
- 2026-05-11: disclosed: Initial disclosure by developer
- 2026-05-18: advisory: GitHub Advisory published
- 2026-05-11: patched: Version 0.2 released with JSON migration