module

PyTorch Model Server Registration and Deserialization RCE

Disclosed
10/03/2023
Created
10/12/2023

Description

The PyTorch model server contains multiple vulnerabilities that can be chained together to permit an
unauthenticated remote attacker arbitrary Java code execution. The first vulnerability is that the management
interface is bound to all IP addresses and not just the loop back interface as the documentation suggests. The
second vulnerability (CVE-2023-43654) allows attackers with access to the management interface to register MAR
model files from arbitrary servers. The third vulnerability is that when an MAR file is loaded, it can contain a
YAML configuration file that when deserialized by snakeyaml, can lead to loading an arbitrary Java class.

Authors

Idan LevcovichGuy KaplanGal ElbazSwapneil Kumar DashSpencer McIntyre

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/multi/http/torchserver_cve_2023_43654
    msf /(4) > show actions
        ...actions...
    msf /(4) > set ACTION < action-name >
    msf /(4) > show options
        ...show and set options...
    msf /(4) > run
  
Title
NEW

Explore Exposure Command

Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.