Miggo Logo

CVE-2024-39205: pyload-ng vulnerable to RCE with js2py sandbox escape

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.9816%
Published
9/9/2024
Updated
10/28/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
pyload-ngpip<= 0.5.0b3.dev85

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the /flash/addcrypted2 endpoint's use of js2py to evaluate JavaScript from the 'jk' parameter. Despite js2py's intended sandboxing (via disable_pyimport()), the CVE-2024-28397 sandbox escape allows accessing Python's subprocess.Popen through prototype pollution. The endpoint's insufficient network access controls (relying on Host header validation) and direct exposure of js2py execution to user input make this function the attack surface. The PoC demonstrates direct exploitation through this endpoint, confirming its role in the vulnerability chain.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry *ny pylo**-n* runnin* un**r pyt*on*.** or **low *r* vuln*r**l* un**r R**. *tt**k*r **n s*n* * r*qu*st *ont*inin* *ny s**ll *omm*n* *n* t** vi*tim s*rv*r will *x**ut* it imm**i*t*ly. ### **t*ils js*py **s * vuln*r**ility o* s*n**ox *s**p*

Reasoning

T** vuln*r**ility st*ms *rom t** `/*l*s*/****rypt***` *n*point's us* o* `js*py` to *v*lu*t* J*v*S*ript *rom t** 'jk' p*r*m*t*r. **spit* `js*py`'s int*n*** s*n**oxin* (vi* `*is**l*_pyimport()`), t** *V*-****-***** s*n**ox *s**p* *llows ****ssin* Pyt*o