CVE-2026-73974
Path traversal via –test argument leads to arbitrary file read.
- CVSS 5.5
- CWE-22
- Information Leakage
- Remote
linuxfabrik-lib provides Python modules for database access, caching, shell execution, and API integrations, and Linuxfabrik Monitoring Plugins uses its shared testing helper across check plugins. Prior to linuxfabrik-lib 6.1.0 and Linuxfabrik Monitoring Plugins 7.0.0, lib.lftest.test() treated the first or second element of a –test CSV argument as a filesystem path and returned the file contents as simulated standard output or standard error without path confinement. The hidden but production-accessible –test argument was accepted by sudo-authorized plugins, so an attacker controlling the nagios or icinga account could use check-plugins/deb-updates/deb-updates with its default QUERY=1 to disclose every line of a root-readable file. Approximately 22 other plugins exposed filtered content or a root file existence and readability oracle through the same helper, while check-plugins/network-bonding/network-bonding and check-plugins/openstack-swift-stat/openstack-swift-stat had direct read paths that bypassed the helper. The library fix confines fixture reads to the invoking plugin's unit-test directory and refuses unsafe anchors, and the plugin fix routes the two bypasses through that helper. These issues are fixed in linuxfabrik-lib 6.1.0 and Linuxfabrik Monitoring Plugins 7.0.0.
- CWE
- CWE-22
- CVSS base score
- 5.5
- Published
- 2026-08-18
- OWASP
- A01 Broken Access Control
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Information Leakage
- Subcategory
- Information Disclosure
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Affected component
- linuxfabrik-lib, Linuxfabrik Monitoring Plugins
- Fixed by upgrading
- Yes
Solution
Upgrade to linuxfabrik‑lib ≥ 6.1.0 and Linuxfabrik Monitoring Plugins ≥ 7.0.0.
Vulnerable code sample
import os
import sys
import csv
def run():
# Simple argument parser for demonstration
args = sys.argv[1:]
test_arg = None
for i, a in enumerate(args):
if a == '--test' and i + 1 < len(args):
test_arg = args[i + 1]
break
if test_arg:
# VULNERABLE: reads arbitrary file path from CSV argument
_, path = next(csv.reader([test_arg]))
with open(path, 'r') as f:
simulated_output = f.read()
# The plugin would later return simulated_output as stdout
return simulated_output
return NonePatched code sample
import os
import sys
import csv
def run():
# Simple argument parser for demonstration
args = sys.argv[1:]
test_arg = None
for i, a in enumerate(args):
if a == '--test' and i + 1 < len(args):
test_arg = args[i + 1]
break
if test_arg:
# FIX: confine file reads to the plugin's test fixtures directory
_, path = next(csv.reader([test_arg]))
base_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'tests', 'fixtures'))
target_path = os.path.abspath(path)
if not target_path.startswith(base_dir):
raise ValueError("Unsafe test fixture path")
with open(target_path, 'r') as f:
simulated_output = f.read()
return simulated_output
return NonePublished 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.
- fix: confine –test fixture reads and reject unsafe db filenames (GHSA-rh9c-rqvg-f7pr) (Linuxfabrik/lib)
db_sqlite.py · get_db_path,lftest.py,lftest.py · test
Cite this entry
@misc{vaitp:cve202673974,
title = {{Path traversal via --test argument leads to arbitrary file read.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-73974},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-73974/}}
}
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 ::
