Rapid7 Vulnerability & Exploit Database

Foxit PDF Reader 4.2 Javascript File Write

Back to Search

Foxit PDF Reader 4.2 Javascript File Write



This module exploits an unsafe Javascript API implemented in Foxit PDF Reader version 4.2. The createDataObject() Javascript API function allows for writing arbitrary files to the file system. This issue was fixed in version Note: This exploit uses the All Users directory currently, which required administrator privileges to write to. This means an administrative user has to open the file to be successful. Kind of lame but thats how it goes sometimes in the world of file write bugs.


  • bannedit <bannedit@metasploit.com>
  • Chris Evans




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