Rapid7 Vulnerability & Exploit Database

Plex Unpickle Dict Windows RCE

Back to Search

Plex Unpickle Dict Windows RCE



This module exploits an authenticated Python unsafe pickle.load of a Dict file. An authenticated attacker can create a photo library and add arbitrary files to it. After setting the Windows only Plex variable LocalAppDataPath to the newly created photo library, a file named Dict will be unpickled, which causes an RCE as the user who started Plex. Plex_Token is required, to get it you need to log-in through a web browser, then check the requests to grab the X-Plex-Token header. See info -d for additional details. If an exploit fails, or is cancelled, Dict is left on disk, a new ALBUM_NAME will be required as subsuquent writes will make Dict-1, and not execute.


  • h00die
  • Chris Lyne






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/windows/http/plex_unpickle_dict_rce
msf exploit(plex_unpickle_dict_rce) > show targets
msf exploit(plex_unpickle_dict_rce) > set TARGET < target-id >
msf exploit(plex_unpickle_dict_rce) > show options
    ...show and set options...
msf exploit(plex_unpickle_dict_rce) > 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