CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2025-59384
8.10.07%

QNAP Qfiling: Organizing Your Files... And Your Secrets

Amit Schendel
Amit Schendel
Senior Security Researcher

Feb 27, 2026·7 min read·10 visits

PoC Available

Executive Summary (TL;DR)

QNAP Qfiling versions <= 3.13.0 contain a critical path traversal flaw (CWE-22). Unauthenticated attackers can manipulate file paths to read (and potentially write) files outside the intended directories. This affects Confidentiality, Integrity, and Availability. The fix is to update to version 3.13.1 immediately.

A high-severity path traversal vulnerability in QNAP Qfiling allows remote, unauthenticated attackers to access sensitive system files. While Qfiling is designed to automate file organization, this flaw enables threat actors to 'organize' your /etc/shadow file right into their hands, potentially leading to full system compromise via arbitrary file read and write operations.

The Hook: When Organization Becomes Exfiltration

QNAP's Qfiling is marketed as a digital Marie Kondo for your NAS. It automates the tedious task of organizing files, transcoding videos, and archiving data. It runs on the NAS itself, which means it operates with enough privilege to shuffle files across the filesystem. In the world of storage appliances, 'convenience' is often a synonym for 'security hole,' and Qfiling is no exception.

Imagine a butler you've hired to organize your library. You hand him a stack of books and say, 'Put these in the West Wing.' A diligent butler does just that. A vulnerable butler, however, accepts a note that says, 'Put these in ../../../the_safe/,' and blindly complies. This is exactly what CVE-2025-59384 represents: a failure to check where the butler is actually going.

This isn't just about reading a stray text file. QNAP devices are often the heart of a small business or a home lab, storing backups, credentials, and proprietary data. When a utility designed to move and modify files has a path traversal flaw, we aren't just looking at a leak; we are looking at a potential mechanism to overwrite configuration files or extract the shadow file. It turns your organization tool into a chaotic weapon.

The Flaw: A Tale of Missing Guardrails

At its core, this is a classic CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as Path Traversal. The vulnerability stems from how the Qfiling application processes user-supplied input when defining file paths for its tasks. Whether it's previewing a file, moving it, or checking its properties, the application takes a string from the user and passes it to the underlying filesystem APIs.

In a secure application, this input is treated like radioactive waste. It is sanitized, normalized (resolving all . and ..), and checked against an allowlist of permitted directories (a chroot jail or logical sandbox). In Qfiling 3.13.0 and earlier, this sanitization was either missing or implemented with a regex so weak it might as well have been a polite suggestion.

The specific failure here is the lack of canonicalization. The application likely concatenates a base directory (e.g., /share/Public/) with the user input. If the user inputs ../../etc/shadow, the application resolves this to /share/Public/../../etc/shadow, which the operating system simplifies to /etc/shadow. Because the application didn't verify that the final resolved path still started with /share/Public/, it happily serves up the requested file.

The Code: Anatomy of a Traversal

While QNAP's source code is closed, the behavior of CVE-2025-59384 allows us to reconstruct the vulnerable logic with high confidence. This pattern is endemic in CGI and PHP-based appliance interfaces. Here is what the vulnerable logic typically looks like:

// RECONSTRUCTED VULNERABLE LOGIC
char* user_input = get_param("filepath");
char full_path[1024];
 
// The developer assumes user_input is just a filename
sprintf(full_path, "/share/CACHEDEV1_DATA/.qfiling/%s", user_input);
 
// FATAL FLAW: No validation of '..' sequences before opening
FILE* f = fopen(full_path, "r");
if (f) {
    // Stream data back to the user
    send_file_to_browser(f);
}

When the input is ../../../../etc/config/u_ma.conf (a common target on QNAP to retrieve admin hashes), the fopen call succeeds because the OS handles the traversal. The application never realizes it has left the .qfiling sandbox.

The patch in version 3.13.1 introduces a crucial validation step. It forces the path to be absolute and canonical before acting on it. It looks something like this:

// SECURE IMPLEMENTATION PATTERN
char* user_input = get_param("filepath");
char raw_path[1024];
char real_path[PATH_MAX];
const char* base_dir = "/share/CACHEDEV1_DATA/.qfiling/";
 
sprintf(raw_path, "%s%s", base_dir, user_input);
 
// Resolve symlinks and .. sequences
if (realpath(raw_path, real_path) == NULL) {
    return ERROR_INVALID_PATH;
}
 
// The check that was missing: Does the result still start with the base?
if (strncmp(real_path, base_dir, strlen(base_dir)) != 0) {
    log_security_event("Traversal attempt detected");
    return ERROR_ACCESS_DENIED;
}
 
FILE* f = fopen(real_path, "r");

This realpath + strncmp combo is the industry standard defense. It ensures that no matter how many ../ or %2e%2e%2f tricks an attacker uses, the final path is inspected after the OS resolves it.

The Exploit: Extracting the Crown Jewels

Exploiting this vulnerability does not require a PhD in cryptography. It requires a web browser (or curl) and a basic understanding of Linux filesystem hierarchy. Since the vulnerability is classified as 'Low Complexity' and 'No Privileges Required', the barrier to entry is effectively zero.

Phase 1: Reconnaissance First, the attacker identifies a QNAP device exposing the Qfiling service. This is often on the standard QTS ports (8080 or 443). The attacker looks for endpoints related to file operations, such as preview generation or file indexing logs.

Phase 2: The Traversal The attacker crafts a GET request. The goal is to reach /etc/shadow (for password hashes) or /etc/config/u_ma.conf (QNAP's specific user config). The payload uses standard traversal sequences. If the server filters ../, the attacker might try URL encoding (%2e%2e%2f) or double encoding.

GET /cgi-bin/qfiling/api.cgi?cmd=preview&file=../../../../../../etc/shadow HTTP/1.1
Host: target-qnap:8080
User-Agent: Mozilla/5.0
Accept: */*

Phase 3: Escalation Once the attacker retrieves the shadow file, they can crack the admin hash offline. Alternatively, because the CVSS v4.0 score indicates high Integrity impact (VI:H), there is a strong possibility that this endpoint allows writing or moving files. An attacker could potentially use the 'Organize' feature of Qfiling to move a malicious shell script into a cron directory or the webroot, achieving Remote Code Execution (RCE).

The Impact: Why CVSS 8.1 Matters

You might look at a 'File Read' vulnerability and think, 'So what? They can read my grocery list.' You would be wrong. On a NAS appliance, the filesystem is the database. Configuration, authentication, and application logic are all stored in flat files. Reading /etc/shadow is game over. Reading /etc/config/qpkg.conf reveals installed apps and paths.

However, the CVSS v4.0 assessment from QNAP is particularly alarming. It lists Confidentiality (High), Integrity (High), and Availability (High). This 'High Integrity' rating is the smoking gun. It implies that the path traversal isn't just for reading—it's likely effectively a 'Path Manipulation' issue where an attacker can delete or overwrite files.

If I can overwrite /etc/resolv.conf, I can redirect your DNS. If I can delete /sbin/init, I can brick your device (Availability impact). If I can write to /root/.ssh/authorized_keys, I own the box. This is why this CVE carries an 8.1 score. It is not just a leak; it is a potential backdoor into the entire network storage infrastructure.

The Fix: Closing the Window

The mitigation here is binary: patch or perish. QNAP has released version 3.13.1 of Qfiling, which implements the necessary path canonicalization checks. There is no configuration tweak or registry hack that fixes bad code logic.

Remediation Steps:

  1. Log into QTS/QuTS hero as Admin.
  2. Open the App Center.
  3. Locate Qfiling and click Update.
  4. Verify the installed version is 3.13.1 or higher.

Defense in Depth: If you cannot patch immediately (why?), you must ensure your NAS is not exposed to the WAN. QNAP devices are frequent targets for ransomware groups like DeadBolt and Qlocker. This vulnerability is a perfect entry point for them. Place your NAS behind a VPN (Tailscale, WireGuard) and block all direct inbound connections from the internet. If your NAS is currently sitting on a public IP with port 8080 open, you are already living on borrowed time.

Official Patches

QNAPQNAP Security Advisory QSA-25-54

Technical Appendix

CVSS Score
8.1/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
EPSS Probability
0.07%

Affected Systems

QNAP Qfiling <= 3.13.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
QNAP Qfiling
QNAP
<= 3.13.03.13.1
AttributeDetail
CWE IDCWE-22
Attack VectorNetwork (Remote)
CVSS v4.08.1 (High)
CVSS v3.17.5 (High)
ImpactConfidentiality, Integrity, Availability
Exploit StatusPoC / Low Complexity
EPSS Score0.07%

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Path Traversal

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Vulnerability Timeline

Vulnerability published in NVD
2026-01-02
QNAP releases Security Advisory QSA-25-54
2026-01-03
CISA includes in weekly summary SB26-005
2026-01-05

References & Sources

  • [1]Official QNAP Advisory
  • [2]NVD Entry