Lucene search
K

Ruby Random Number Values Information Disclosure Vulnerability

🗓️ 29 Aug 2011 00:00:00Reported by Copyright (c) 2011 SecPodType 
openvas
 openvas
🔗 plugins.openvas.org👁 26 Views

Ruby Random Number Values Information Disclosur

Related
Refs
Code
###############################################################################
# OpenVAS Vulnerability Test
# $Id: secpod_ruby_random_number_values_info_disc_vuln_01.nasl 8196 2017-12-20 12:13:37Z cfischer $
#
# Ruby Random Number Values Information Disclosure Vulnerability
#
# Authors:
# Sooraj KS <[email protected]>
#
# Copyright:
# Copyright (c) 2011 SecPod, http://www.secpod.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# (or any later version), as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
###############################################################################

CPE = "cpe:/a:ruby-lang:ruby";

tag_impact = "Successful exploits may allow attackers to predict random number values.
  Impact Level: Application";
tag_affected = "Ruby versions before 1.8.7-p352 and 1.9.x before 1.9.2-p290";
tag_insight = "The flaw exists because the SecureRandom.random_bytes function in
  lib/securerandom.rb relies on PID values for initialization, which makes it
  easier for context-dependent attackers to predict the result string by
  leveraging knowledge of random strings obtained in an earlier process with
  the same PID.";
tag_solution = "Upgrade to Ruby version 1.8.7-p352, 1.9.2-p290 or later
  For updates refer to http://rubyforge.org/frs/?group_id=167";
tag_summary = "This host is installed with Ruby and is prone to information
  disclosure vulnerability.";

if(description)
{
  script_id(902560);
  script_version("$Revision: 8196 $");
  script_tag(name:"last_modification", value:"$Date: 2017-12-20 13:13:37 +0100 (Wed, 20 Dec 2017) $");
  script_tag(name:"creation_date", value:"2011-08-29 16:22:41 +0200 (Mon, 29 Aug 2011)");
  script_cve_id("CVE-2011-2705");
  script_tag(name:"cvss_base", value:"5.0");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:P/I:N/A:N");
  script_name("Ruby Random Number Values Information Disclosure Vulnerability");
  script_xref(name : "URL" , value : "https://bugzilla.redhat.com/show_bug.cgi?id=722415");
  script_xref(name : "URL" , value : "http://www.ruby-lang.org/en/news/2011/07/02/ruby-1-8-7-p352-released/");
  script_xref(name : "URL" , value : "http://www.ruby-lang.org/en/news/2011/07/15/ruby-1-9-2-p290-is-released/");

  script_tag(name:"qod_type", value:"registry");
  script_copyright("Copyright (c) 2011 SecPod");
  script_category(ACT_GATHER_INFO);
  script_family("General");
  script_dependencies("secpod_ruby_detect_win.nasl");
  script_mandatory_keys("Ruby/Win/Installed");
  script_tag(name : "impact" , value : tag_impact);
  script_tag(name : "affected" , value : tag_affected);
  script_tag(name : "insight" , value : tag_insight);
  script_tag(name : "solution" , value : tag_solution);
  script_tag(name : "summary" , value : tag_summary);
  exit(0);
}

include("host_details.inc");
include("version_func.inc");

infos = get_app_version_and_location( cpe:CPE, exit_no_version:TRUE );
vers = infos['version'];
path = infos['location'];

## Check for Ruby versions before 1.8.7-p352 and 1.9.x before 1.9.2-p290
if( version_in_range( version:vers, test_version:"1.8.7", test_version2:"1.8.7.p351" ) ||
    version_in_range( version:vers, test_version:"1.9", test_version2:"1.9.2.p289" ) ) {
  report = report_fixed_ver( installed_version:vers, fixed_version:"1.8.7-p352 / 1.9.2-p290", install_path:path );
  security_message( port:0, data:report );
  exit( 0 );
}

exit( 99 );

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