VAITP Dataset

← Back to the dataset

CVE-2026-53759

Predictable /tmp SQLite DB path allows symlink attack to overwrite files

  • CVSS 2.0
  • CWE-377
  • Configuration Issues
  • Local

linuxfabrik-lib provides Python modules for database access, caching, shell execution, and API integrations. Prior to version 4.2.0, db_sqlite.py created SQLite databases at predictable paths in the shared /tmp directory and followed attacker-created symbolic links at those paths. An attacker who controls a local monitoring account can create a symlink such as /tmp/linuxfabrik-monitoring-plugins-docker-stats.db and then trigger a sudo-authorized plugin, causing the root process to create or modify the symlink target. The primitive can overwrite arbitrary paths, cause denial of service, or manipulate an existing SQLite database through a crafted rollback journal or write-ahead log. The Monitoring Plugins integration also moved plugin caches through lib.db_sqlite.get_db_path() so they use the secured per-user directory. This issue is fixed in version 4.2.0.

CVSS base score
2.0
Published
2026-08-18
OWASP
A08 Software and Data Integrity Failures
Orthogonal defect classification
Assignment
Code defect classification
Missing Check
Category
Configuration Issues
Subcategory
Local File Inclusion (LFI)
Accessibility scope
Local
Impact
Privilege Escalation
Affected component
linuxfabrik-lib
Fixed by upgrading
Yes

Solution

Upgrade linuxfabrik-lib to version 4.2.0 or later.

Vulnerable code sample

import os
import sqlite3
from typing import Optional

def get_db_path(db_name: str) -> str:
    # VULNERABLE: uses predictable /tmp path allowing symlink attack
    return os.path.join("/tmp", f"linuxfabrik-monitoring-plugins-{db_name}.db")

def open_database(db_name: str) -> Optional[sqlite3.Connection]:
    db_path = get_db_path(db_name)
    try:
        os.makedirs(os.path.dirname(db_path), exist_ok=True)
        conn = sqlite3.connect(db_path)
        return conn
    except Exception:
        return None

Patched code sample

import os
import sqlite3
from pathlib import Path
from typing import Optional

def get_db_path(db_name: str) -> str:
    # FIX: use per-user cache directory to prevent symlink abuse
    cache_dir = Path.home() / ".cache" / "linuxfabrik-monitoring-plugins"
    cache_dir.mkdir(parents=True, exist_ok=True)
    return str(cache_dir / f"{db_name}.db")

def open_database(db_name: str) -> Optional[sqlite3.Connection]:
    db_path = get_db_path(db_name)
    try:
        conn = sqlite3.connect(db_path)
        return conn
    except Exception:
        return None

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

Cite this entry

@misc{vaitp:cve202653759,
  title        = {{Predictable /tmp SQLite DB path allows symlink attack to overwrite files}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-53759},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-53759/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.