{"vuln_id":"CVE-2024-32880","aliases":["GHSA-3f7w-p8vr-4v5f"],"description":"pyLoad allows upload to arbitrary folder lead to RCE","published_at":"2024-04-24T21:16:59Z","modified_at":"2026-11-16T16:02:08Z","first_seen_at":"2026-11-21T19:15:20.271102Z","severity":"critical","severity_source":"ghsa","cvss_score":9.1,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","cwe":["CWE-434"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.01354,"epss_percentile":0.72175,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-32880"},"matched_alias":null,"items":[{"id":2514,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-3f7w-p8vr-4v5f / CVE-2024-32880: pyLoad allows upload to arbitrary folder lead to RCE","summary":"pyLoad allows upload to arbitrary folder lead to RCE\n\n### Summary\nAn authenticated user can change the download folder and upload a crafted template to the specified folder lead to remote code execution\n\n### Details\nexample version: 0.5\nfile:src/pyload/webui/app/blueprints/app_blueprint.py\n```python\n@bp.route(\"/render/\n\", endpoint=\"render\")\ndef render(filename):\nmimetype = mimetypes.guess_type(filename)[0] or \"text/html\"\ndata = render_template(filename)\nreturn flask.Response(data, mimetype=mimetype)\n```\nSo, if we can control file in the path \"pyload/webui/app/templates\" in latest version and path in \"module/web/media/js\"(the difference is the older version0.4.20 only renders file with extension name \".js\"), the render_template func will works like SSTI(server-side template injection) when render the evil file we control.\n\nin /settings page and the choose option general/general, where we can change the download folder.\n![image](https://github.com/pyload/pyload/assets/48705773/0b239138-9aaa-45c4-bf84-c1c3103c452a)\n\nAlso, we can find the pyLoad install folder in /info page\n![image](https://github.com/pyload/pyload/assets/48705773/6e9d363a-f0e0-4d25-92b3-b1587188a235)\nSo, we can change the value of Download folder to the template path. Then through /json/add_package we can upload a crafted template file to RCE.\n```python\n@bp.route(\"/json/add_package\", methods=[\"POST\"], endpoint=\"add_package\")\n# @apiver_check\n@login_required(\"ADD\")\ndef add_package():\napi = flask.current_app.config[\"PYLOAD_API\"]\n\npackage_name = flask.request.form.get(\"add_name\", \"New Package\").strip()\nqueue = int(flask.request.form[\"add_dest\"])\nlinks = [l.strip() for l in flask.request.form[\"add_links\"].splitlines()]\npw = flask.request.form.get(\"add_password\", \"\").strip(\"\\n\\r\")\n\ntry:\nfile = flask.request.files[\"add_file\"]\n\nif file.filename:\nif not package_name or package_name == \"New Package\":\npackage_name = file.filename\n\nfile_path = os.path.join(\napi.get_config_value(\"general\", \"storage_folder\"), \"tmp_\" + file.filename\n)\nfile.save(file_path)\nlinks.insert(0, file_path)\n\nexcept Exception:\npass\n\nurls = [url for url in links if url.strip()]\npack = api.add_package(package_name, urls, queue)\nif pw:\ndata = {\"password\": pw}\napi.set_package_data(pack, data)\n\nreturn jsonify(True)\n```\n### PoC\nFirst login into the admin page, then visit the info page to get the path of pyload installation folder.\nSecond, change the download folder to PYLOAD_INSTALL_DIR/ webui/app/templates/\nThird, upload crafted template file through /json/add_package through parameter add_file\nthe content of crafted template file and its filename is \"341.html\":\n```\n{{x.__init__.__globals__['__builtins__']['eval'](\"__import__('os').popen('whoami').read()\")}}\n```\n![image](https://github.com/pyload/pyload/assets/48705773/a933a95b-bb18-4e2e-a442-973585e7d1fc)\nLast, visit http://TARGE\n\nAffected packages: pip:pyload-ng","url":"https://github.com/advisories/GHSA-3f7w-p8vr-4v5f","published_at":"2024-04-24T21:16:59Z","updated_at":"2026-11-16T16:02:08Z","fetched_at":"2026-11-21T19:15:18.416897Z","severity":"critical","cvss_score":9.1,"epss":0.01354,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"pyload-ng","vuln_id":"CVE-2024-32880","vuln_ids":["CVE-2024-32880","GHSA-3F7W-P8VR-4V5F"],"tags":["ghsa","pip","CWE-434"],"cluster_id":2472,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2514","html":"https://vulnwatch.ve1ve2.com/item/2514"}}]}