Rapid7 Vulnerability & Exploit Database

Ruby on Rails ActionPack Inline ERB Code Execution

Back to Search

Ruby on Rails ActionPack Inline ERB Code Execution

Disclosed
03/01/2016
Created
05/30/2018

Description

This module exploits a remote code execution vulnerability in the inline request processor of the Ruby on Rails ActionPack component. This vulnerability allows an attacker to process ERB to the inline JSON processor, which is then rendered, permitting full RCE within the runtime, without logging an error condition.

Author(s)

  • RageLtMan <rageltman@sempervictus>

Platform

Ruby

Architectures

ruby

Development

References

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

;