CVE-2026-134167 in devpi-web
Summary
by MITRE • 11/21/2026
devpi-web before 5.2.0 contains an unauthenticated path traversal vulnerability in the +doc documentation route because docs_file_exists and docs_file_path in doczip.py never confine relpath to the documentation directory. Attackers can request a relpath with a leading // or percent-encoded .. segments to read server files, including the keyfs sqlite database holding password hashes.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/21/2026
The vulnerability identified in devpi-web versions prior to 5.2.0 represents a critical unauthenticated path traversal flaw located within the +doc documentation route. This security defect stems from an insufficient validation of user-supplied input when constructing file paths for serving static content. Specifically, the functions docs_file_exists and docs_file_path within the doczip.py module fail to properly confine relative paths to their intended directory scope. In a secure implementation, any path resolution logic must ensure that the final resolved absolute path remains strictly within the designated base directory of the documentation files. However, in this vulnerable version, the application does not enforce such boundary checks, allowing an attacker to manipulate the file path parameter to escape the web root and access arbitrary locations on the server's filesystem.
The technical mechanism exploited by attackers involves the use of relative path traversal sequences combined with encoding techniques designed to bypass naive string matching or basic sanitization rules. By injecting a leading double slash // followed by percent-encoded dot-dot segments such as %2e%2e, an attacker can effectively neutralize directory separators and traverse upward through the file system hierarchy. This technique leverages how web servers and underlying operating systems interpret path components during resolution. Because the application does not normalize or validate these paths against a strict allowlist of permitted directories, it proceeds to serve files located outside the documentation folder. This lack of input validation is particularly dangerous because it occurs in an unauthenticated context, meaning that any remote user with network access to the devpi instance can exploit this flaw without needing valid credentials.
The operational impact of this vulnerability is severe due to the sensitivity of data accessible through path traversal. An attacker can read arbitrary files from the server's file system, including configuration files, source code, and critically, the keyfs SQLite database. This database stores password hashes for all users associated with the devpi instance. The exposure of these password hashes allows an adversary to perform offline brute-force or dictionary attacks against them. Given that many organizations reuse passwords across multiple services, compromising these hashes can lead to a broader compromise of internal systems and user accounts. Furthermore, depending on server configuration, this vulnerability could potentially be chained with other flaws to achieve remote code execution if sensitive files containing executable scripts or configurations are read and manipulated.
To mitigate this risk, immediate action is required by upgrading devpi-web to version 5.2.0 or later, where the path traversal issue has been addressed through proper input validation and directory confinement logic. In addition to patching, administrators should implement defense-in-depth strategies such as restricting file system permissions so that the web process runs with minimal privileges and cannot access sensitive directories like those containing database files unless absolutely necessary. Network-level controls, including Web Application Firewalls (WAFs), can also help detect and block requests containing suspicious path traversal patterns before they reach the application layer. Regular security audits and static code analysis should be employed to identify similar input validation weaknesses in other parts of the application logic.
From a classification perspective, this vulnerability aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory, which describes flaws where software does not properly restrict pathnames or file names to ensure that files are confined within expected directories. Additionally, it maps to MITRE ATT&CK technique T1083: File and Directory Discovery, as the attacker uses this flaw to enumerate and access sensitive system resources for further exploitation. The unauthenticated nature of the attack also relates to CWE-287: Improper Authentication, although in this case, the primary failure is authorization-related regarding file access rather than user identity verification. Addressing these issues requires a holistic approach that combines software updates with robust security configurations and continuous monitoring for anomalous request patterns indicative of path traversal attempts.