PyLoad Path Traversal Vulnerability in set_package_data
PyLoad versions 0.5.0b3.dev99 and earlier are vulnerable to a path traversal vulnerability in the `set_package_data` function, allowing attackers to write files to arbitrary directories with the privileges of the PyLoad process.
PyLoad, a free and open-source download manager, is vulnerable to a path traversal vulnerability within its set_package_data API function. Specifically, versions up to and including 0.5.0b3.dev99 fail to properly sanitize the package folder name. This lack of sanitization allows a user with Perms.MODIFY to specify arbitrary directories as download locations for a package. An attacker can leverage this flaw to write files outside the intended download directory, potentially leading to arbitrary code execution if the PyLoad process has sufficient privileges. The vulnerability was disclosed in GHSA-838g-gr43-qqg9 on May 5, 2026.
Attack Chain
- The attacker gains access to the PyLoad API, potentially through leaked credentials or other vulnerabilities.
- The attacker crafts a POST request to the
/api/add_packageendpoint to create a new package with a specified name and download link (e.g.,http://example.com/file.txt). The response includes the assigned package ID. - The attacker crafts a POST request to the
/api/set_package_dataendpoint, targeting the newly created package ID. - Within the JSON payload for
set_package_data, the attacker includes adataobject with the key_folderset to an absolute path containing directory traversal sequences (e.g.,/users/root/). - The PyLoad application, lacking proper sanitization, accepts the attacker-controlled path as the download location.
- The attacker triggers a download associated with the package.
- PyLoad attempts to write downloaded files to the attacker-specified path (e.g.,
/users/root/), potentially overwriting existing files or creating new ones. - The attacker achieves arbitrary file write, leading to potential privilege escalation or code execution if writable locations like system configuration files are targeted.
Impact
Successful exploitation allows an attacker to write files to arbitrary locations on the file system with the privileges of the PyLoad process. This could lead to privilege escalation, arbitrary code execution, or denial of service. Given that PyLoad is often deployed on personal servers or NAS devices, the impact could range from data theft to complete system compromise. Affected versions include all PyLoad versions up to and including 0.5.0b3.dev99.
Recommendation
- Upgrade PyLoad to a version beyond 0.5.0b3.dev99 that includes the patch for CVE-2026-42315.
- Deploy the Sigma rule
Detect PyLoad set_package_data Path Traversalto detect attempts to exploit this vulnerability by monitoring for suspicious folder paths inset_package_datarequests. - Monitor web server logs for POST requests to
/api/set_package_datawith suspicious_foldervalues containing absolute paths and directory traversal sequences. - Review and restrict API access to PyLoad to only trusted sources to mitigate the risk of unauthorized exploitation.
Detection coverage 2
Detect PyLoad set_package_data Path Traversal
highDetects potential path traversal attempts in PyLoad's set_package_data API by monitoring for suspicious folder paths.
Detect PyLoad API Misuse via Request Headers
mediumDetects potential unauthorized access to the PyLoad API by monitoring for suspicious API key usage or missing X-API-Key header.
Detection queries are kept inside the platform. Get full rules →