PT-2023-16152 · Pypi +1 · Js2Py +1
Gammac0De
·
Published
2023-01-14
·
Updated
2025-08-12
·
CVE-2023-0297
9.8
Critical
Base vector | Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions:
pyload/pyload versions prior to 0.5.0b3.dev31
Description:
The issue concerns a code injection vulnerability in the pyload/pyload GitHub repository. It allows for pre-authentication remote code execution (RCE) due to the integration of JavaScript in Python using the js2py library. Specifically, the `eval js()` function is vulnerable, as it executes JavaScript code passed through the `jk` parameter. This allows attackers to inject arbitrary commands. An example of exploitation is through a POST request to the `/amogus/test` endpoint with malicious `jk` parameter content, such as `jk=pyimport os;os.system("touch /tmp/pwnd");f=function f2(){};`. The estimated number of potentially affected devices worldwide is not specified. There is no information provided about real-world incidents where this issue was exploited.
Recommendations:
For versions prior to 0.5.0b3.dev31, update to version 0.5.0b3.dev31 or later to resolve the issue.
As a temporary workaround, consider restricting access to the `eval js()` function and the `/amogus/test` endpoint until a patch is applied.
Avoid using the `jk` parameter in the affected API endpoint until the issue is resolved.
Exploit
Fix
Code Injection
Weakness Enumeration
Related Identifiers
Affected Products
References · 19
- 🔥 https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/pyload_js2py_exec.rb⭐ 34302 🔗 14014 · Exploit
- 🔥 https://github.com/bAuh0lz/CVE-2023-0297_Pre-auth_RCE_in_pyLoad⭐ 27 🔗 10 · Exploit
- 🔥 https://github.com/JacobEbben/CVE-2023-0297⭐ 10 🔗 3 · Exploit
- 🔥 https://exploit-db.com/exploits/51532 · Exploit
- 🔥 https://huntr.dev/bounties/3fd606f7-83e1-4265-b083-2e1889a05e65 · Exploit
- https://github.com/pyload/pyload/commit/7d73ba7919e594d783b3411d7ddb87885aea782d⭐ 3348 🔗 713 · Patch
- https://osv.dev/vulnerability/GHSA-pf38-5p22-x6h6 · Vendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2023-0297 · Security Note
- https://osv.dev/vulnerability/CVE-2023-0297 · Vendor Advisory
- https://twitter.com/dailycve/status/1955076781926424715 · Twitter Post
- https://t.me/cvenotify/42004 · Telegram Post
- http://packetstormsecurity.com/files/171096/pyLoad-js2py-Python-Execution.html · Note
- http://packetstormsecurity.com/files/172914/PyLoad-0.5.0-Remote-Code-Execution.html · Note
- https://t.me/poxek/2924 · Telegram Post
- https://t.me/proxy_bar/1299 · Telegram Post