Rapid7 Vulnerability & Exploit Database

pyLoad js2py Python Execution

Back to Search

pyLoad js2py Python Execution

Disclosed
01/13/2023
Created
02/22/2023

Description

pyLoad versions prior to 0.5.0b3.dev31 are vulnerable to Python code injection due to the pyimport functionality exposed through the js2py library. An unauthenticated attacker can issue a crafted POST request to the flash/addcrypted2 endpoint to leverage this for code execution. pyLoad by default runs two services, the primary of which is on port 8000 and can not be used by external hosts. A secondary "Click 'N' Load" service runs on port 9666 and can be used remotely without authentication.

Author(s)

  • Spencer McIntyre
  • bAu

Platform

Linux,Python,Unix

Architectures

cmd, x86, x64, python

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/http/pyload_js2py_exec
msf exploit(pyload_js2py_exec) > show targets
    ...targets...
msf exploit(pyload_js2py_exec) > set TARGET < target-id >
msf exploit(pyload_js2py_exec) > show options
    ...show and set options...
msf exploit(pyload_js2py_exec) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;