Rapid7 Vulnerability & Exploit Database

Mozilla Firefox "nsTreeRange" Dangling Pointer Vulnerability

Back to Search

Mozilla Firefox "nsTreeRange" Dangling Pointer Vulnerability



This module exploits a code execution vulnerability in Mozilla Firefox 3.6.x <= 3.6.16 and 3.5.x <= 3.5.17 found in nsTreeSelection. By overwriting a subfunction of invalidateSelection it is possible to free the nsTreeRange object that the function currently operates on. Any further operations on the freed object can result in remote code execution. Utilizing the call setup the function provides it's possible to bypass DEP without the need for a ROP. Sadly this exploit is still either dependent on Java or bound by ASLR because Firefox doesn't employ any ASLR-free modules anymore.


  • regenrecht
  • xero




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