Exploit database

Vulnerability

CVE-2024-28397

Vulnerability details

Score
5.3
Severity
medium

CVSS 3.1 · CISA-ADP

Vector string

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

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.

CVE Program

Exploit source choices

13 sources
Pyload RCE (CVE-2024-39205) with js2py sandbox escape (CVE-2024-28397)
MSF-linux--http--pyload_js2py_cve_2024_39205MetasploitLinux,Unix / remote

CVE-2024-28397 is sandbox escape in js2py (<=0.74) which is a popular python package that can evaluate javascript code inside a python interpreter. The vulnerability allows for an attacker to obtain a reference to a python object in the js2py environment enabling them to escape the sandbox, bypass pyimport restrictions and execute arbitrary commands on the host. At the time of writing no patch has been released, version 0.74 is the latest version of js2py which was released Nov 6, 2022. CVE-2024-39205 is an remote code execution vulnerability in Pyload (<=0.5.0b3.dev85) which is an open-source download manager designed to automate file downloads from various online sources. Pyload is vulnerable because it exposes the vulnerable js2py functionality mentioned above on the /flash/addcrypted2 API endpoint. This endpoint was designed to only accept connections from localhost but by manipulating the HOST header we can bypass this restriction in order to access the API to achieve unauth RCE.

2024-10-28pyload_js2py_cve_2024_39205.rb
naclapor/cve-2024-28397
GH-d6bbdc13a694f3e80ec4b4a925cffa73GitHubUnofficial GitHub source

This repository contains a python exploit code for CVE-2024-28397 intended for use on the "CodePartTwo" machine on Hack The Box (HTB).

2025-09-093 files · 12 stars
ghostoverflow/cve-2024-28397-command-execution-poc
GH-fff0b00cee7c0439ee1563fe9c398c94GitHubUnofficial GitHub source

This vulnerability arises from incomplete sandboxing in js2py, where crafted JavaScript can traverse Python’s internal object model and access dangerous classes like subprocess.Popen, leading to arbitrary command execution.

2025-08-172 files · 5 stars
l1337xi/cve-2024-28397-exploit-automation
GH-c9c194638079930b8013ec383ec54f69GitHubUnofficial GitHub source

A Python automation script for exploiting the **js2py Sandbox Escape** vulnerability (CVE-2024-28397). This tool automates the payload generation and delivery process to achieve Remote Code Execution (RCE) on vulnerable instances.

2025-12-063 files · 2 stars
xeloxa/cve-2024-28397-js2py-rce-exploit
GH-9a7d6e31d695411629b3ba8879a95248GitHubUnofficial GitHub source

Professional exploit for CVE-2024-28397: Js2Py Sandbox Escape leading to Remote Code Execution (RCE). Includes modular payload generation.

2026-02-034 files · 2 stars
harutomo-jp/cve-2024-28397-rce
GH-32e02cbd9b37b8c494c1b41074f76cf0GitHubUnofficial GitHub source

harutomo-jp/cve-2024-28397-rce source repository

2025-08-182 files · 1 stars
rianjuniorsf/exploit-js2py
GH-28afbdf68f99d3ac8f75494a137fee9dGitHubUnofficial GitHub source

The CVE-2024-28397 vulnerability affects versions of js2py up to v0.74, a Python library that allows JavaScript code to be executed within the Python interpreter.

2025-08-182 files · 1 stars
3z-p0wn/cve-2024-28397-exploit
GH-83f4da8bbec2ad47ae7572450aead2cdGitHubUnofficial GitHub source

js2py <= 0.74 sandbox escape (CVE-2024-28397)

2026-01-114 files · 0 stars