module

PyTorch Model Server Registration and Deserialization RCE

Disclosed
2023-10-03
Created
2023-10-12

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 Levcovich
Guy Kaplan
Gal Elbaz
Swapneil Kumar Dash
Spencer 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 exploit(torchserver_cve_2023_43654) > show targets
...targets...
msf exploit(torchserver_cve_2023_43654) > set TARGET < target-id >
msf exploit(torchserver_cve_2023_43654) > show options
...show and set options...
msf exploit(torchserver_cve_2023_43654) > exploit

Title
NEW

Explore Exposure Command

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