CVE-2024-28397

MEDIUM NUCLEI

pyload-ng js2py - Remote Code Execution

Title source: nuclei
STIX 2.1

Exploitation Summary

EIP tracks 19 public exploits for CVE-2024-28397. PoCs published by alisunbul, Marven11, naclapor, including Metasploit module exploits/linux/http/pyload_js2py_cve_2024_39205. A Nuclei detection template is also available.

AI-analyzed exploit summary This exploit generates a JavaScript payload that escapes the Js2Py sandbox by leveraging Object.getOwnPropertyNames to access Python internals and recursively search for subprocess.Popen, enabling arbitrary command execution.

Description

An issue in the component js2py.disable_pyimport() of js2py up to v0.74 allows attackers to execute arbitrary code via a crafted API call.

Exploits (19)

exploitdb WORKING POC
by alisunbul · pythonwebappsmultiple
https://www.exploit-db.com/exploits/52532

This exploit generates a JavaScript payload that escapes the Js2Py sandbox by leveraging Object.getOwnPropertyNames to access Python internals and recursively search for subprocess.Popen, enabling arbitrary command execution.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Js2Py <= 0.74
No auth needed
Prerequisites: vulnerable Js2Py version · ability to inject JavaScript payload into target application
devstral-2 · analyzed May 13, 2026 Full analysis →
nomisec WORKING POC 71 stars
by Marven11 · poc
https://github.com/Marven11/CVE-2024-28397-js2py-Sandbox-Escape

This PoC demonstrates a sandbox escape vulnerability in js2py (<=0.74) by exploiting improper handling of global variables to gain access to Python objects, enabling arbitrary command execution. The exploit uses JavaScript to traverse Python object hierarchies and spawn a subprocess.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: js2py <=0.74
No auth needed
Prerequisites: Python 3.x (excluding 3.12) · js2py installed · Victim executes malicious JavaScript via js2py
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 13 stars
by naclapor · poc
https://github.com/naclapor/CVE-2024-28397

This repository contains a functional exploit for CVE-2024-28397, a sandbox escape vulnerability in js2py <= 0.74. The exploit leverages Python object introspection via JavaScript to access subprocess.Popen and execute a reverse shell.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: js2py <= 0.74
No auth needed
Prerequisites: Target application using js2py for JavaScript evaluation · Network access to the target · Listener set up for reverse shell
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 5 stars
by GhostOverflow · poc
https://github.com/GhostOverflow/CVE-2024-28397-command-execution-poc

This PoC demonstrates a sandbox escape in js2py via incomplete sandboxing, allowing arbitrary command execution by traversing Python's internal object model to access subprocess.Popen. The exploit leverages JavaScript to bypass import restrictions and execute commands.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: js2py versions up to 0.74
No auth needed
Prerequisites: Application that evaluates user-supplied JavaScript/JSON using js2py with disable_pyimport()
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 2 stars
by xeloxa · poc
https://github.com/xeloxa/CVE-2024-28397-Js2Py-RCE-Exploit

This repository contains a Python-based payload generator for CVE-2024-28397, which exploits a sandbox escape vulnerability in Js2Py <= 0.74. The exploit leverages Object.getOwnPropertyNames to access Python's subprocess.Popen and execute arbitrary commands.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Js2Py <= 0.74
No auth needed
Prerequisites: Vulnerable version of Js2Py (<= 0.74) · Ability to inject JavaScript into a context evaluated by Js2Py
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by releaseown · poc
https://github.com/releaseown/exploit-js2py

This repository contains a PHP-based exploit for CVE-2024-28397, a sandbox escape vulnerability in js2py up to v0.74. The exploit leverages improper restrictions in the `disable_pyimport()` method to execute arbitrary commands via a crafted JavaScript payload, resulting in remote code execution (RCE).

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: js2py <= v0.74
No auth needed
Prerequisites: Target running a vulnerable version of js2py · Network access to the target · PHP environment with GuzzleHttp for exploit execution
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by L1337Xi · poc
https://github.com/L1337Xi/CVE-2024-28397-Exploit-Automation

This repository contains a Python script that automates the exploitation of CVE-2024-28397, a sandbox escape vulnerability in the js2py library. The exploit generates a malicious JavaScript payload to achieve remote code execution via a reverse shell.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: js2py < 0.74
No auth needed
Prerequisites: Vulnerable js2py version · Network access to the target · Listener setup for reverse shell
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by s0m1s0ng · poc
https://github.com/s0m1s0ng/CVE-2024-28397-Reverse-Shell

This repository contains a functional exploit for CVE-2024-28397, targeting js2py <= v0.74. The exploit leverages a JavaScript sandbox escape to achieve remote code execution (RCE) via a reverse shell payload.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: js2py <= v0.74
No auth needed
Prerequisites: Python3 · requests library · Netcat or similar listener · target running js2py with vulnerable endpoint
devstral-2 · analyzed Apr 20, 2026 Full analysis →
nomisec WORKING POC 1 stars
by 0xPadme · poc
https://github.com/0xPadme/CVE-2024-28397-Reverse-Shell

This is a functional exploit for CVE-2024-28397 targeting js2py <= v0.74, leveraging a prototype pollution vulnerability to achieve remote code execution via a reverse shell. The exploit uses a crafted JavaScript payload to bypass restrictions and execute arbitrary commands.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: js2py <= v0.74
No auth needed
Prerequisites: Python3 · requests library · Netcat or similar listener · Target running vulnerable js2py version
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by harutomo-jp · poc
https://github.com/harutomo-jp/CVE-2024-28397-RCE

This is a functional exploit for CVE-2024-28397, targeting js2py <= v0.74. It leverages a JavaScript payload to achieve remote code execution (RCE) by abusing Python object manipulation to spawn a subprocess.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: js2py <= v0.74
No auth needed
Prerequisites: Network access to target endpoint · Python 3.x with requests library
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by y0naldez · poc
https://github.com/y0naldez/CVE-2024-28397-Js2Py-RCE

This repository contains a functional exploit PoC for CVE-2024-28397, which leverages a sandbox escape in Js2Py to achieve remote code execution. The Python script generates a JavaScript payload that exploits exposed Python internals through object wrappers to execute arbitrary commands.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Js2Py (specific version not specified)
No auth needed
Prerequisites: Vulnerable Js2Py environment with exposed Python internals
devstral-2 · analyzed May 13, 2026 Full analysis →
nomisec WORKING POC
by 3z-p0wn · poc
https://github.com/3z-p0wn/CVE-2024-28397-exploit

This is a functional exploit for CVE-2024-28397, targeting a sandbox escape vulnerability in js2py <= 0.74. It generates a JavaScript payload that escapes the sandbox and executes a reverse shell via subprocess.Popen.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: js2py <= 0.74
No auth needed
Prerequisites: Access to a vulnerable endpoint that evaluates JavaScript using js2py · Network connectivity to the target
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by D3ltaFormation · poc
https://github.com/D3ltaFormation/CVE-2024-28397-Js2Py-RCE

This is a functional Python-based PoC for CVE-2024-28397, exploiting a sandbox escape in Js2Py to achieve RCE via a reverse shell. The exploit leverages Python object traversal to access subprocess.Popen and execute arbitrary commands.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Js2Py (JavaScript interpreter for Python)
No auth needed
Prerequisites: Vulnerable Js2Py implementation exposed via HTTP · Network access to the target · Python 3.x and requests module
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by vitaciminIPI · poc
https://github.com/vitaciminIPI/CVE-2024-28397-RCE

This exploit leverages a JavaScript-to-Python (JS2PY) vulnerability (CVE-2024-28397) to achieve remote code execution by manipulating object prototypes and subclass traversal to access and execute subprocess.Popen. The payload is injected via a JSON POST request to a vulnerable endpoint.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: JS2PY (specific version not specified)
Auth required
Prerequisites: Network access to the target · Valid session cookie · Vulnerable JS2PY endpoint
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by 0xDTC · poc
https://github.com/0xDTC/js2py-Sandbox-Escape-CVE-2024-28397-RCE

This repository contains a working exploit for CVE-2024-28397, a sandbox escape vulnerability in js2py that allows arbitrary code execution via Python object introspection. The exploit uses JavaScript to access Python's internal objects and execute system commands through subprocess.Popen.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: js2py (JavaScript to Python translator)
No auth needed
Prerequisites: Vulnerable js2py installation · Network access to the target
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by ExtremeUday · poc
https://github.com/ExtremeUday/Remote-Code-Execution-CVE-2024-28397-pyload-ng-js2py-

This PoC exploits CVE-2024-28397, a Remote Code Execution vulnerability in pyload-ng due to insecure usage of js2py. The exploit leverages a malicious JavaScript payload to escape the js2py sandbox and execute arbitrary system commands, resulting in a reverse shell.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: pyload-ng (with js2py)
Auth required
Prerequisites: Access to a vulnerable pyload-ng instance with the /run_code endpoint exposed · Valid credentials for registration and login · Network connectivity to the target and listener
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by Naved124 · poc
https://github.com/Naved124/CVE-2024-28397-js2py-Sandbox-Escape

This PoC demonstrates a sandbox escape in js2py by exploiting a vulnerability to execute arbitrary commands via subprocess.Popen. The exploit leverages Python object manipulation within the JavaScript environment to bypass restrictions.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: js2py (Python library)
No auth needed
Prerequisites: js2py library installed · Python environment
devstral-2 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by CYBER-WARRIOR-SEC · poc
https://github.com/CYBER-WARRIOR-SEC/CVE-2024-28397-js2py-Sandbox-Escape

This PoC demonstrates a sandbox escape vulnerability in js2py (<=0.74) by exploiting improper handling of global variables to execute arbitrary commands on the host system. The payload uses JavaScript to access Python objects and spawn a subprocess, bypassing `disable_pyimport()` restrictions.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: js2py <=0.74
No auth needed
Prerequisites: Python 3.x (excluding 3.12) · js2py installed · Victim executes malicious JavaScript via js2py
devstral-2 · analyzed Feb 16, 2026 Full analysis →
metasploit WORKING POC EXCELLENT
by Marven11, Spencer McIntyre, jheysel-r7 · rubypoclinux
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/pyload_js2py_cve_2024_39205.rb

This Metasploit module exploits CVE-2024-39205 (Pyload RCE) by leveraging CVE-2024-28397 (js2py sandbox escape) to execute arbitrary commands via the /flash/addcrypted2 endpoint. It bypasses localhost restrictions using the Host header and achieves unauthenticated RCE.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Pyload <=0.5.0b3.dev85
No auth needed
Prerequisites: Network access to Pyload instance · js2py <=0.74 installed
devstral-2 · analyzed Feb 19, 2026 Full analysis →

Nuclei Templates (1)

pyload-ng js2py - Remote Code Execution
MEDIUMVERIFIEDby iamnoooob,rootxharsh,pdresearch
Shodan: http.html:"pyload"
FOFA: body="pyload"

References (2)

Core 2

Scores

CVSS v3 5.3
EPSS 0.0455
EPSS Percentile 90.4%
Attack Vector LOCAL
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

CISA SSVC

Vulnrichment
Exploitation poc
Automatable no
Technical Impact partial

Details

CWE
CWE-94
Status published
Products (1)
pypi/js2py 0PyPI
Published Jun 20, 2024
Tracked Since Feb 18, 2026