pyload-ng RCE via js2py sandbox escape

Severity: info · CVSS 9.8 · Published 2024-10-28

pyload-ng is a download manager application that accepts HTTP requests to process encrypted packages. A vulnerability in the underlying js2py JavaScript sandbox library allows unauthenticated attackers to bypass access controls and execute arbitrary shell commands on the server. An attacker can send a crafted HTTP request to trigger remote code execution with full system privileges.

Technologies: pyload-ng (PyPI). Vendors: PyPI.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Informational severity, with a CVSS score of 9.8, published 28 October 2024.
Which products and versions are affected?
pyload-ng (PyPI) ECOSYSTEM:introduced=0,last_affected=0.5.0b3.dev85.
Is there a fix for This vulnerability?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is This vulnerability attacked?
It is attacked over the network, in a software library.
Am I affected?
Check whether you run pyload-ng (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability exploits CVE-2024-28397, a sandbox escape in the js2py library used by the /flash/addcrypted2 API endpoint. Although the endpoint is designed to accept only localhost connections, attackers can bypass this restriction using HTTP headers (Host header spoofing). An attacker can inject malicious JavaScript code that escapes the js2py sandbox by accessing Python's object model through getattr operations, eventually reaching the subprocess.Popen class to execute arbitrary system commands. The attack requires no authentication or user interaction and works on all Python versions up to 3.11; Python 3.12+ is unaffected because pyload-ng no longer uses js2py in those versions.

Affected products

  • pyload pyload-ng <=0.5.0b3.dev85

Timeline

  • 2024-09-07: disclosed
  • 2024-10-28: other: Duplicate advisory published and then withdrawn

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.