Vulnerabilities > CVE-2012-4481 - Permissions, Privileges, and Access Controls vulnerability in Ruby-Lang Ruby 1.8.7

047910
CVSS 0.0 - NONE
Attack vector
UNKNOWN
Attack complexity
UNKNOWN
Privileges required
UNKNOWN
Confidentiality impact
UNKNOWN
Integrity impact
UNKNOWN
Availability impact
UNKNOWN

Summary

The safe-level feature in Ruby 1.8.7 allows context-dependent attackers to modify strings via the NameError#to_s method when operating on Ruby objects. NOTE: this issue is due to an incomplete fix for CVE-2011-1005.

Vulnerable Configurations

Part Description Count
Application
Ruby-Lang
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Blue Boxing
    This type of attack against older telephone switches and trunks has been around for decades. A tone is sent by an adversary to impersonate a supervisor signal which has the effect of rerouting or usurping command of the line. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded Telco infrastructure and so are vulnerable to Blue boxing. Blue boxing is a result of failure on the part of the system to enforce strong authorization for administrative functions. While the infrastructure is different than standard current applications like web applications, there are historical lessons to be learned to upgrade the access control for administrative functions.
  • Restful Privilege Elevation
    Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
  • Target Programs with Elevated Privileges
    This attack targets programs running with elevated privileges. The attacker would try to leverage a bug in the running program and get arbitrary code to execute with elevated privileges. For instance an attacker would look for programs that write to the system directories or registry keys (such as HKLM, which stores a number of critical Windows environment variables). These programs are typically running with elevated privileges and have usually not been designed with security in mind. Such programs are excellent exploit targets because they yield lots of power when they break. The malicious user try to execute its code at the same level as a privileged system call.

Nessus

  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2013-0129.NASL
    descriptionUpdated ruby packages that fix two security issues and one bug are now available for Red Hat Enterprise Linux 5. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. Ruby is an extensible, interpreted, object-oriented, scripting language. It has features to process text files and to do system management tasks. It was found that certain methods did not sanitize file names before passing them to lower layer routines in Ruby. If a Ruby application created files with names based on untrusted input, it could result in the creation of files with different names than expected. (CVE-2012-4522) It was found that the RHSA-2011:0909 update did not correctly fix the CVE-2011-1005 issue, a flaw in the method for translating an exception message into a string in the Exception class. A remote attacker could use this flaw to bypass safe level 4 restrictions, allowing untrusted (tainted) code to modify arbitrary, trusted (untainted) strings, which safe level 4 restrictions would otherwise prevent. (CVE-2012-4481) The CVE-2012-4481 issue was discovered by Vit Ondruch of Red Hat. This update also fixes the following bug : * Prior to this update, the
    last seen2020-06-01
    modified2020-06-02
    plugin id63410
    published2013-01-08
    reporterThis script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/63410
    titleRHEL 5 : ruby (RHSA-2013:0129)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2013:0129. The text 
    # itself is copyright (C) Red Hat, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(63410);
      script_version ("1.16");
      script_cvs_date("Date: 2019/10/24 15:35:36");
    
      script_cve_id("CVE-2012-4481", "CVE-2012-4522");
      script_bugtraq_id(55813, 56115);
      script_xref(name:"RHSA", value:"2013:0129");
    
      script_name(english:"RHEL 5 : ruby (RHSA-2013:0129)");
      script_summary(english:"Checks the rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Red Hat host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated ruby packages that fix two security issues and one bug are now
    available for Red Hat Enterprise Linux 5.
    
    The Red Hat Security Response Team has rated this update as having
    moderate security impact. Common Vulnerability Scoring System (CVSS)
    base scores, which give detailed severity ratings, are available for
    each vulnerability from the CVE links in the References section.
    
    Ruby is an extensible, interpreted, object-oriented, scripting
    language. It has features to process text files and to do system
    management tasks.
    
    It was found that certain methods did not sanitize file names before
    passing them to lower layer routines in Ruby. If a Ruby application
    created files with names based on untrusted input, it could result in
    the creation of files with different names than expected.
    (CVE-2012-4522)
    
    It was found that the RHSA-2011:0909 update did not correctly fix the
    CVE-2011-1005 issue, a flaw in the method for translating an exception
    message into a string in the Exception class. A remote attacker could
    use this flaw to bypass safe level 4 restrictions, allowing untrusted
    (tainted) code to modify arbitrary, trusted (untainted) strings, which
    safe level 4 restrictions would otherwise prevent. (CVE-2012-4481)
    
    The CVE-2012-4481 issue was discovered by Vit Ondruch of Red Hat.
    
    This update also fixes the following bug :
    
    * Prior to this update, the 'rb_syck_mktime' option could, under
    certain circumstances, terminate with a segmentation fault when
    installing libraries with certain gems. This update modifies the
    underlying code so that Ruby gems can be installed as expected.
    (BZ#834381)
    
    All users of Ruby are advised to upgrade to these updated packages,
    which contain backported patches to resolve these issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://rhn.redhat.com/errata/RHSA-2011-0909.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/errata/RHSA-2013:0129"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2012-4481"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2012-4522"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:N");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ruby");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ruby-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ruby-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ruby-docs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ruby-irb");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ruby-libs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ruby-mode");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ruby-rdoc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ruby-ri");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ruby-tcltk");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:5");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2013/01/08");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/01/08");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Red Hat Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list", "Host/cpu");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || "Red Hat" >!< release) audit(AUDIT_OS_NOT, "Red Hat");
    os_ver = eregmatch(pattern: "Red Hat Enterprise Linux.*release ([0-9]+(\.[0-9]+)?)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Red Hat");
    os_ver = os_ver[1];
    if (! ereg(pattern:"^5([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 5.x", "Red Hat " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$" && "s390" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Red Hat", cpu);
    
    yum_updateinfo = get_kb_item("Host/RedHat/yum-updateinfo");
    if (!empty_or_null(yum_updateinfo)) 
    {
      rhsa = "RHSA-2013:0129";
      yum_report = redhat_generate_yum_updateinfo_report(rhsa:rhsa);
      if (!empty_or_null(yum_report))
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_WARNING,
          extra      : yum_report 
        );
        exit(0);
      }
      else
      {
        audit_message = "affected by Red Hat security advisory " + rhsa;
        audit(AUDIT_OS_NOT, audit_message);
      }
    }
    else
    {
      flag = 0;
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"ruby-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"ruby-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"ruby-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", reference:"ruby-debuginfo-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", reference:"ruby-devel-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"ruby-docs-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"ruby-docs-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"ruby-docs-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"ruby-irb-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"ruby-irb-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"ruby-irb-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", reference:"ruby-libs-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"ruby-mode-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"ruby-mode-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"ruby-mode-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"ruby-rdoc-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"ruby-rdoc-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"ruby-rdoc-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"ruby-ri-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"ruby-ri-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"ruby-ri-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"i386", reference:"ruby-tcltk-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"s390x", reference:"ruby-tcltk-1.8.5-27.el5")) flag++;
      if (rpm_check(release:"RHEL5", cpu:"x86_64", reference:"ruby-tcltk-1.8.5-27.el5")) flag++;
    
      if (flag)
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_WARNING,
          extra      : rpm_report_get() + redhat_report_package_caveat()
        );
        exit(0);
      }
      else
      {
        tested = pkg_tests_get();
        if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
        else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ruby / ruby-debuginfo / ruby-devel / ruby-docs / ruby-irb / etc");
      }
    }
    
  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2013-0129.NASL
    descriptionUpdated ruby packages that fix two security issues and one bug are now available for Red Hat Enterprise Linux 5. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. Ruby is an extensible, interpreted, object-oriented, scripting language. It has features to process text files and to do system management tasks. It was found that certain methods did not sanitize file names before passing them to lower layer routines in Ruby. If a Ruby application created files with names based on untrusted input, it could result in the creation of files with different names than expected. (CVE-2012-4522) It was found that the RHSA-2011:0909 update did not correctly fix the CVE-2011-1005 issue, a flaw in the method for translating an exception message into a string in the Exception class. A remote attacker could use this flaw to bypass safe level 4 restrictions, allowing untrusted (tainted) code to modify arbitrary, trusted (untainted) strings, which safe level 4 restrictions would otherwise prevent. (CVE-2012-4481) The CVE-2012-4481 issue was discovered by Vit Ondruch of Red Hat. This update also fixes the following bug : * Prior to this update, the
    last seen2020-06-01
    modified2020-06-02
    plugin id63574
    published2013-01-17
    reporterThis script is Copyright (C) 2013-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/63574
    titleCentOS 5 : ruby (CESA-2013:0129)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2013:0129 and 
    # CentOS Errata and Security Advisory 2013:0129 respectively.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(63574);
      script_version("1.9");
      script_cvs_date("Date: 2020/01/06");
    
      script_cve_id("CVE-2012-4481", "CVE-2012-4522");
      script_bugtraq_id(55813, 56115);
      script_xref(name:"RHSA", value:"2013:0129");
    
      script_name(english:"CentOS 5 : ruby (CESA-2013:0129)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote CentOS host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated ruby packages that fix two security issues and one bug are now
    available for Red Hat Enterprise Linux 5.
    
    The Red Hat Security Response Team has rated this update as having
    moderate security impact. Common Vulnerability Scoring System (CVSS)
    base scores, which give detailed severity ratings, are available for
    each vulnerability from the CVE links in the References section.
    
    Ruby is an extensible, interpreted, object-oriented, scripting
    language. It has features to process text files and to do system
    management tasks.
    
    It was found that certain methods did not sanitize file names before
    passing them to lower layer routines in Ruby. If a Ruby application
    created files with names based on untrusted input, it could result in
    the creation of files with different names than expected.
    (CVE-2012-4522)
    
    It was found that the RHSA-2011:0909 update did not correctly fix the
    CVE-2011-1005 issue, a flaw in the method for translating an exception
    message into a string in the Exception class. A remote attacker could
    use this flaw to bypass safe level 4 restrictions, allowing untrusted
    (tainted) code to modify arbitrary, trusted (untainted) strings, which
    safe level 4 restrictions would otherwise prevent. (CVE-2012-4481)
    
    The CVE-2012-4481 issue was discovered by Vit Ondruch of Red Hat.
    
    This update also fixes the following bug :
    
    * Prior to this update, the 'rb_syck_mktime' option could, under
    certain circumstances, terminate with a segmentation fault when
    installing libraries with certain gems. This update modifies the
    underlying code so that Ruby gems can be installed as expected.
    (BZ#834381)
    
    All users of Ruby are advised to upgrade to these updated packages,
    which contain backported patches to resolve these issues."
      );
      # https://lists.centos.org/pipermail/centos-announce/2013-January/019162.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?af85705e"
      );
      # https://lists.centos.org/pipermail/centos-cr-announce/2013-January/000429.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?7ccfebae"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected ruby packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:N");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2012-4522");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ruby");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ruby-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ruby-docs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ruby-irb");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ruby-libs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ruby-mode");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ruby-rdoc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ruby-ri");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ruby-tcltk");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:centos:centos:5");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/11/24");
      script_set_attribute(attribute:"patch_publication_date", value:"2013/01/09");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/01/17");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2013-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"CentOS Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/CentOS/release", "Host/CentOS/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/CentOS/release");
    if (isnull(release) || "CentOS" >!< release) audit(AUDIT_OS_NOT, "CentOS");
    os_ver = pregmatch(pattern: "CentOS(?: Linux)? release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "CentOS");
    os_ver = os_ver[1];
    if (! preg(pattern:"^5([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "CentOS 5.x", "CentOS " + os_ver);
    
    if (!get_kb_item("Host/CentOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "CentOS", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"CentOS-5", reference:"ruby-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-devel-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-docs-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-irb-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-libs-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-mode-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-rdoc-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-ri-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-tcltk-1.8.5-27.el5")) flag++;
    
    
    if (flag)
    {
      cr_plugin_caveat = '\n' +
        'NOTE: The security advisory associated with this vulnerability has a\n' +
        'fixed package version that may only be available in the continuous\n' +
        'release (CR) repository for CentOS, until it is present in the next\n' +
        'point release of CentOS.\n\n' +
    
        'If an equal or higher package level does not exist in the baseline\n' +
        'repository for your major version of CentOS, then updates from the CR\n' +
        'repository will need to be applied in order to address the\n' +
        'vulnerability.\n';
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : rpm_report_get() + cr_plugin_caveat
      );
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ruby / ruby-devel / ruby-docs / ruby-irb / ruby-libs / ruby-mode / etc");
    }
    
  • NASL familyOracle Linux Local Security Checks
    NASL idORACLELINUX_ELSA-2013-0129.NASL
    descriptionFrom Red Hat Security Advisory 2013:0129 : Updated ruby packages that fix two security issues and one bug are now available for Red Hat Enterprise Linux 5. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. Ruby is an extensible, interpreted, object-oriented, scripting language. It has features to process text files and to do system management tasks. It was found that certain methods did not sanitize file names before passing them to lower layer routines in Ruby. If a Ruby application created files with names based on untrusted input, it could result in the creation of files with different names than expected. (CVE-2012-4522) It was found that the RHSA-2011:0909 update did not correctly fix the CVE-2011-1005 issue, a flaw in the method for translating an exception message into a string in the Exception class. A remote attacker could use this flaw to bypass safe level 4 restrictions, allowing untrusted (tainted) code to modify arbitrary, trusted (untainted) strings, which safe level 4 restrictions would otherwise prevent. (CVE-2012-4481) The CVE-2012-4481 issue was discovered by Vit Ondruch of Red Hat. This update also fixes the following bug : * Prior to this update, the
    last seen2020-06-01
    modified2020-06-02
    plugin id68700
    published2013-07-12
    reporterThis script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/68700
    titleOracle Linux 5 : ruby (ELSA-2013-0129)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Red Hat Security Advisory RHSA-2013:0129 and 
    # Oracle Linux Security Advisory ELSA-2013-0129 respectively.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(68700);
      script_version("1.6");
      script_cvs_date("Date: 2019/09/30 10:58:18");
    
      script_cve_id("CVE-2012-4481", "CVE-2012-4522");
      script_bugtraq_id(55813, 56115);
      script_xref(name:"RHSA", value:"2013:0129");
    
      script_name(english:"Oracle Linux 5 : ruby (ELSA-2013-0129)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Oracle Linux host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "From Red Hat Security Advisory 2013:0129 :
    
    Updated ruby packages that fix two security issues and one bug are now
    available for Red Hat Enterprise Linux 5.
    
    The Red Hat Security Response Team has rated this update as having
    moderate security impact. Common Vulnerability Scoring System (CVSS)
    base scores, which give detailed severity ratings, are available for
    each vulnerability from the CVE links in the References section.
    
    Ruby is an extensible, interpreted, object-oriented, scripting
    language. It has features to process text files and to do system
    management tasks.
    
    It was found that certain methods did not sanitize file names before
    passing them to lower layer routines in Ruby. If a Ruby application
    created files with names based on untrusted input, it could result in
    the creation of files with different names than expected.
    (CVE-2012-4522)
    
    It was found that the RHSA-2011:0909 update did not correctly fix the
    CVE-2011-1005 issue, a flaw in the method for translating an exception
    message into a string in the Exception class. A remote attacker could
    use this flaw to bypass safe level 4 restrictions, allowing untrusted
    (tainted) code to modify arbitrary, trusted (untainted) strings, which
    safe level 4 restrictions would otherwise prevent. (CVE-2012-4481)
    
    The CVE-2012-4481 issue was discovered by Vit Ondruch of Red Hat.
    
    This update also fixes the following bug :
    
    * Prior to this update, the 'rb_syck_mktime' option could, under
    certain circumstances, terminate with a segmentation fault when
    installing libraries with certain gems. This update modifies the
    underlying code so that Ruby gems can be installed as expected.
    (BZ#834381)
    
    All users of Ruby are advised to upgrade to these updated packages,
    which contain backported patches to resolve these issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://oss.oracle.com/pipermail/el-errata/2013-January/003208.html"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected ruby packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:N");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ruby");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ruby-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ruby-docs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ruby-irb");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ruby-libs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ruby-mode");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ruby-rdoc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ruby-ri");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ruby-tcltk");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:oracle:linux:5");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/11/24");
      script_set_attribute(attribute:"patch_publication_date", value:"2013/01/12");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/07/12");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Oracle Linux Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/OracleLinux", "Host/RedHat/release", "Host/RedHat/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/OracleLinux")) audit(AUDIT_OS_NOT, "Oracle Linux");
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || !pregmatch(pattern: "Oracle (?:Linux Server|Enterprise Linux)", string:release)) audit(AUDIT_OS_NOT, "Oracle Linux");
    os_ver = pregmatch(pattern: "Oracle (?:Linux Server|Enterprise Linux) .*release ([0-9]+(\.[0-9]+)?)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Oracle Linux");
    os_ver = os_ver[1];
    if (! preg(pattern:"^5([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Oracle Linux 5", "Oracle Linux " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && "ia64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Oracle Linux", cpu);
    
    flag = 0;
    if (rpm_check(release:"EL5", reference:"ruby-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"EL5", reference:"ruby-devel-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"EL5", reference:"ruby-docs-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"EL5", reference:"ruby-irb-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"EL5", reference:"ruby-libs-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"EL5", reference:"ruby-mode-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"EL5", reference:"ruby-rdoc-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"EL5", reference:"ruby-ri-1.8.5-27.el5")) flag++;
    if (rpm_check(release:"EL5", reference:"ruby-tcltk-1.8.5-27.el5")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ruby / ruby-devel / ruby-docs / ruby-irb / ruby-libs / ruby-mode / etc");
    }
    
  • NASL familyMandriva Local Security Checks
    NASL idMANDRIVA_MDVSA-2013-124.NASL
    descriptionUpdated ruby packages fix security vulnerabilities : Shugo Maedo and Vit Ondruch discovered that Ruby incorrectly allowed untainted strings to be modified in protective safe levels. An attacker could use this flaw to bypass intended access restrictions (CVE-2012-4466, CVE-2012-4481). It was discovered that Ruby
    last seen2020-06-01
    modified2020-06-02
    plugin id66136
    published2013-04-20
    reporterThis script is Copyright (C) 2013-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/66136
    titleMandriva Linux Security Advisory : ruby (MDVSA-2013:124)
    code
    #%NASL_MIN_LEVEL 80502
    
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Mandriva Linux Security Advisory MDVSA-2013:124. 
    # The text itself is copyright (C) Mandriva S.A.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(66136);
      script_version("1.7");
      script_cvs_date("Date: 2019/08/02 13:32:55");
    
      script_cve_id("CVE-2012-4466", "CVE-2012-4481", "CVE-2013-1821");
      script_bugtraq_id(55757, 55813, 58141);
      script_xref(name:"MDVSA", value:"2013:124");
      script_xref(name:"MGASA", value:"2012-0294");
      script_xref(name:"MGASA", value:"2013-0092");
    
      script_name(english:"Mandriva Linux Security Advisory : ruby (MDVSA-2013:124)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Mandriva Linux host is missing one or more security
    updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated ruby packages fix security vulnerabilities :
    
    Shugo Maedo and Vit Ondruch discovered that Ruby incorrectly allowed
    untainted strings to be modified in protective safe levels. An
    attacker could use this flaw to bypass intended access restrictions
    (CVE-2012-4466, CVE-2012-4481).
    
    It was discovered that Ruby's REXML library did not properly restrict
    XML entity expansion. An attacker could use this flaw to cause a
    denial of service by tricking a Ruby application using REXML to read
    text nodes from specially crafted XML content, which will result in
    REXML consuming large amounts of system memory (CVE-2013-1821)."
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:N");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:ruby");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:ruby-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:ruby-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:ruby-tk");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:mandriva:business_server:1");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2013/04/10");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/04/20");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2013-2019 Tenable Network Security, Inc.");
      script_family(english:"Mandriva Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/Mandrake/release", "Host/Mandrake/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Mandrake/release")) audit(AUDIT_OS_NOT, "Mandriva / Mandake Linux");
    if (!get_kb_item("Host/Mandrake/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if (cpu !~ "^(amd64|i[3-6]86|x86_64)$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Mandriva / Mandrake Linux", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"ruby-1.8.7.p358-2.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"ruby-devel-1.8.7.p358-2.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", reference:"ruby-doc-1.8.7.p358-2.1.mbs1")) flag++;
    if (rpm_check(release:"MDK-MBS1", cpu:"x86_64", reference:"ruby-tk-1.8.7.p358-2.1.mbs1")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyAmazon Linux Local Security Checks
    NASL idALA_ALAS-2013-173.NASL
    descriptionIt was discovered that Ruby
    last seen2020-06-01
    modified2020-06-02
    plugin id69732
    published2013-09-04
    reporterThis script is Copyright (C) 2013-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/69732
    titleAmazon Linux AMI : ruby (ALAS-2013-173)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Amazon Linux AMI Security Advisory ALAS-2013-173.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(69732);
      script_version("1.6");
      script_cvs_date("Date: 2018/04/18 15:09:35");
    
      script_cve_id("CVE-2011-1005", "CVE-2012-4481", "CVE-2013-1821");
      script_xref(name:"ALAS", value:"2013-173");
      script_xref(name:"RHSA", value:"2013:0612");
    
      script_name(english:"Amazon Linux AMI : ruby (ALAS-2013-173)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Amazon Linux AMI host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "It was discovered that Ruby's REXML library did not properly restrict
    XML entity expansion. An attacker could use this flaw to cause a
    denial of service by tricking a Ruby application using REXML to read
    text nodes from specially crafted XML content, which will result in
    REXML consuming large amounts of system memory. (CVE-2013-1821)
    
    It was found that the RHSA-2011-0910 update did not correctly fix the
    CVE-2011-1005 issue, a flaw in the method for translating an exception
    message into a string in the Exception class. A remote attacker could
    use this flaw to bypass safe level 4 restrictions, allowing untrusted
    (tainted) code to modify arbitrary, trusted (untainted) strings, which
    safe level 4 restrictions would otherwise prevent. (CVE-2012-4481)
    
    The safe-level feature in Ruby 1.8.6 through 1.8.6-420, 1.8.7 through
    1.8.7-330, and 1.8.8dev allows context-dependent attackers to modify
    strings via the Exception#to_s method, as demonstrated by changing an
    intended pathname. (CVE-2011-1005)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://alas.aws.amazon.com/ALAS-2013-173.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Run 'yum update ruby' to update your system."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:N");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby-irb");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby-libs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby-rdoc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby-ri");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby-static");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:amazon:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2013/03/14");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/09/04");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2013-2018 Tenable Network Security, Inc.");
      script_family(english:"Amazon Linux Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/AmazonLinux/release", "Host/AmazonLinux/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    
    release = get_kb_item("Host/AmazonLinux/release");
    if (isnull(release) || !strlen(release)) audit(AUDIT_OS_NOT, "Amazon Linux");
    os_ver = pregmatch(pattern: "^AL(A|\d)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Amazon Linux");
    os_ver = os_ver[1];
    if (os_ver != "A")
    {
      if (os_ver == 'A') os_ver = 'AMI';
      audit(AUDIT_OS_NOT, "Amazon Linux AMI", "Amazon Linux " + os_ver);
    }
    
    if (!get_kb_item("Host/AmazonLinux/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (rpm_check(release:"ALA", reference:"ruby-1.8.7.371-2.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"ruby-debuginfo-1.8.7.371-2.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"ruby-devel-1.8.7.371-2.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"ruby-irb-1.8.7.371-2.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"ruby-libs-1.8.7.371-2.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"ruby-rdoc-1.8.7.371-2.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"ruby-ri-1.8.7.371-2.25.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"ruby-static-1.8.7.371-2.25.amzn1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ruby / ruby-debuginfo / ruby-devel / ruby-irb / ruby-libs / etc");
    }
    
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-1603-1.NASL
    descriptionShugo Maedo and Vit Ondruch discovered that Ruby incorrectly allowed untainted strings to be modified in protective safe levels. An attacker could use this flaw to bypass intended access restrictions. (CVE-2012-4466, CVE-2012-4481). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id62497
    published2012-10-11
    reporterUbuntu Security Notice (C) 2012-2019 Canonical, Inc. / NASL script (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/62497
    titleUbuntu 10.04 LTS / 11.04 / 11.10 / 12.04 LTS : ruby1.8 vulnerabilities (USN-1603-1)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Ubuntu Security Notice USN-1603-1. The text 
    # itself is copyright (C) Canonical, Inc. See 
    # <http://www.ubuntu.com/usn/>. Ubuntu(R) is a registered 
    # trademark of Canonical, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(62497);
      script_version("1.8");
      script_cvs_date("Date: 2019/09/19 12:54:28");
    
      script_cve_id("CVE-2012-4466", "CVE-2012-4481");
      script_bugtraq_id(55757, 55813);
      script_xref(name:"USN", value:"1603-1");
    
      script_name(english:"Ubuntu 10.04 LTS / 11.04 / 11.10 / 12.04 LTS : ruby1.8 vulnerabilities (USN-1603-1)");
      script_summary(english:"Checks dpkg output for updated package.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Ubuntu host is missing a security-related patch."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Shugo Maedo and Vit Ondruch discovered that Ruby incorrectly allowed
    untainted strings to be modified in protective safe levels. An
    attacker could use this flaw to bypass intended access restrictions.
    (CVE-2012-4466, CVE-2012-4481).
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the Ubuntu security advisory. Tenable
    has attempted to automatically clean and format it as much as possible
    without introducing additional issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://usn.ubuntu.com/1603-1/"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected libruby1.8 package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:N");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:libruby1.8");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:10.04:-:lts");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:11.04");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:11.10");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:12.04:-:lts");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2013/04/25");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/10/10");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/10/11");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"Ubuntu Security Notice (C) 2012-2019 Canonical, Inc. / NASL script (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Ubuntu Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/cpu", "Host/Ubuntu", "Host/Ubuntu/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("ubuntu.inc");
    include("misc_func.inc");
    
    if ( ! get_kb_item("Host/local_checks_enabled") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/Ubuntu/release");
    if ( isnull(release) ) audit(AUDIT_OS_NOT, "Ubuntu");
    release = chomp(release);
    if (! preg(pattern:"^(10\.04|11\.04|11\.10|12\.04)$", string:release)) audit(AUDIT_OS_NOT, "Ubuntu 10.04 / 11.04 / 11.10 / 12.04", "Ubuntu " + release);
    if ( ! get_kb_item("Host/Debian/dpkg-l") ) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Ubuntu", cpu);
    
    flag = 0;
    
    if (ubuntu_check(osver:"10.04", pkgname:"libruby1.8", pkgver:"1.8.7.249-2ubuntu0.2")) flag++;
    if (ubuntu_check(osver:"11.04", pkgname:"libruby1.8", pkgver:"1.8.7.302-2ubuntu0.2")) flag++;
    if (ubuntu_check(osver:"11.10", pkgname:"libruby1.8", pkgver:"1.8.7.352-2ubuntu0.2")) flag++;
    if (ubuntu_check(osver:"12.04", pkgname:"libruby1.8", pkgver:"1.8.7.352-2ubuntu1.1")) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : ubuntu_report_get()
      );
      exit(0);
    }
    else
    {
      tested = ubuntu_pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "libruby1.8");
    }
    
  • NASL familySolaris Local Security Checks
    NASL idSOLARIS11_RUBY_20130924.NASL
    descriptionThe remote Solaris system is missing necessary patches to address security updates : - The safe-level feature in Ruby 1.8.6 through 1.8.6-420, 1.8.7 through 1.8.7-330, and 1.8.8dev allows context-dependent attackers to modify strings via the Exception#to_s method, as demonstrated by changing an intended pathname. (CVE-2011-1005) - The safe-level feature in Ruby 1.8.7 allows context-dependent attackers to modify strings via the NameError#to_s method when operating on Ruby objects. NOTE: this issue is due to an incomplete fix for CVE-2011-1005. (CVE-2012-4481) - The OpenSSL::SSL.verify_certificate_identity function in lib/openssl/ssl.rb in Ruby 1.8 before 1.8.7-p374, 1.9 before 1.9.3-p448, and 2.0 before 2.0.0-p247 does not properly handle a
    last seen2020-06-01
    modified2020-06-02
    plugin id80755
    published2015-01-19
    reporterThis script is Copyright (C) 2015-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/80755
    titleOracle Solaris Third-Party Patch Update : ruby (cve_2013_4073_cryptographic_issues)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from the Oracle Third Party software advisories.
    #
    include("compat.inc");
    
    if (description)
    {
      script_id(80755);
      script_version("1.2");
      script_cvs_date("Date: 2018/11/15 20:50:24");
    
      script_cve_id("CVE-2011-1005", "CVE-2012-4481", "CVE-2013-4073");
    
      script_name(english:"Oracle Solaris Third-Party Patch Update : ruby (cve_2013_4073_cryptographic_issues)");
      script_summary(english:"Check for the 'entire' version.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Solaris system is missing a security patch for third-party
    software."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The remote Solaris system is missing necessary patches to address
    security updates :
    
      - The safe-level feature in Ruby 1.8.6 through 1.8.6-420,
        1.8.7 through 1.8.7-330, and 1.8.8dev allows
        context-dependent attackers to modify strings via the
        Exception#to_s method, as demonstrated by changing an
        intended pathname. (CVE-2011-1005)
    
      - The safe-level feature in Ruby 1.8.7 allows
        context-dependent attackers to modify strings via the
        NameError#to_s method when operating on Ruby objects.
        NOTE: this issue is due to an incomplete fix for
        CVE-2011-1005. (CVE-2012-4481)
    
      - The OpenSSL::SSL.verify_certificate_identity function in
        lib/openssl/ssl.rb in Ruby 1.8 before 1.8.7-p374, 1.9
        before 1.9.3-p448, and 2.0 before 2.0.0-p247 does not
        properly handle a '\0' character in a domain name in the
        Subject Alternative Name field of an X.509 certificate,
        which allows man-in-the-middle attackers to spoof
        arbitrary SSL servers via a crafted certificate issued
        by a legitimate Certification Authority, a related issue
        to CVE-2009-2408. (CVE-2013-4073)"
      );
      # https://www.oracle.com/technetwork/topics/security/thirdparty-patch-map-1482893.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?4a913f44"
      );
      # https://blogs.oracle.com/sunsecurity/cve-2013-4073-cryptographic-issues-vulnerability-in-ruby
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?a520feac"
      );
      # https://blogs.oracle.com/sunsecurity/multiple-vulnerabilities-in-ruby
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?cee1e109"
      );
      script_set_attribute(attribute:"solution", value:"Upgrade to Solaris 11.1.11.4.0.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:oracle:solaris:11.1");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:solaris:ruby");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2013/09/24");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/01/19");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2015-2018 Tenable Network Security, Inc.");
      script_family(english:"Solaris Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Solaris11/release", "Host/Solaris11/pkg-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("solaris.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/Solaris11/release");
    if (isnull(release)) audit(AUDIT_OS_NOT, "Solaris11");
    pkg_list = solaris_pkg_list_leaves();
    if (isnull (pkg_list)) audit(AUDIT_PACKAGE_LIST_MISSING, "Solaris pkg-list packages");
    
    if (empty_or_null(egrep(string:pkg_list, pattern:"^ruby$"))) audit(AUDIT_PACKAGE_NOT_INSTALLED, "ruby");
    
    flag = 0;
    
    if (solaris_check_release(release:"0.5.11-0.175.1.11.0.4.0", sru:"SRU 11.1.11.4.0") > 0) flag++;
    
    if (flag)
    {
      error_extra = 'Affected package : ruby\n' + solaris_get_report2();
      error_extra = ereg_replace(pattern:"version", replace:"OS version", string:error_extra);
      if (report_verbosity > 0) security_warning(port:0, extra:error_extra);
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_PACKAGE_NOT_AFFECTED, "ruby");
    
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2013-0612.NASL
    descriptionUpdated ruby packages that fix two security issues are now available for Red Hat Enterprise Linux 6. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. Ruby is an extensible, interpreted, object-oriented, scripting language. It has features to process text files and to do system management tasks. It was discovered that Ruby
    last seen2020-06-01
    modified2020-06-02
    plugin id65085
    published2013-03-08
    reporterThis script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/65085
    titleRHEL 6 : ruby (RHSA-2013:0612)
  • NASL familyScientific Linux Local Security Checks
    NASL idSL_20130108_RUBY_ON_SL5_X.NASL
    descriptionIt was found that certain methods did not sanitize file names before passing them to lower layer routines in Ruby. If a Ruby application created files with names based on untrusted input, it could result in the creation of files with different names than expected. (CVE-2012-4522) It was found that the SLSA-2011:0909 update did not correctly fix the CVE-2011-1005 issue, a flaw in the method for translating an exception message into a string in the Exception class. A remote attacker could use this flaw to bypass safe level 4 restrictions, allowing untrusted (tainted) code to modify arbitrary, trusted (untainted) strings, which safe level 4 restrictions would otherwise prevent. (CVE-2012-4481) This update also fixes the following bug : - Prior to this update, the
    last seen2020-03-18
    modified2013-01-17
    plugin id63603
    published2013-01-17
    reporterThis script is Copyright (C) 2013-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/63603
    titleScientific Linux Security Update : ruby on SL5.x i386/x86_64 (20130108)
  • NASL familyOracle Linux Local Security Checks
    NASL idORACLELINUX_ELSA-2013-0612.NASL
    descriptionFrom Red Hat Security Advisory 2013:0612 : Updated ruby packages that fix two security issues are now available for Red Hat Enterprise Linux 6. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. Ruby is an extensible, interpreted, object-oriented, scripting language. It has features to process text files and to do system management tasks. It was discovered that Ruby
    last seen2020-06-01
    modified2020-06-02
    plugin id68782
    published2013-07-12
    reporterThis script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/68782
    titleOracle Linux 6 : ruby (ELSA-2013-0612)
  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2013-0612.NASL
    descriptionUpdated ruby packages that fix two security issues are now available for Red Hat Enterprise Linux 6. The Red Hat Security Response Team has rated this update as having moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. Ruby is an extensible, interpreted, object-oriented, scripting language. It has features to process text files and to do system management tasks. It was discovered that Ruby
    last seen2020-06-01
    modified2020-06-02
    plugin id65166
    published2013-03-10
    reporterThis script is Copyright (C) 2013-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/65166
    titleCentOS 6 : ruby (CESA-2013:0612)
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-1603-2.NASL
    descriptionUSN-1603-1 fixed vulnerabilities in Ruby. This update provides the corresponding updates for Ubuntu 12.10. Shugo Maedo and Vit Ondruch discovered that Ruby incorrectly allowed untainted strings to be modified in protective safe levels. An attacker could use this flaw to bypass intended access restrictions. (CVE-2012-4466, CVE-2012-4481). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id62660
    published2012-10-23
    reporterUbuntu Security Notice (C) 2012-2019 Canonical, Inc. / NASL script (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/62660
    titleUbuntu 12.10 : ruby1.8 vulnerabilities (USN-1603-2)
  • NASL familyScientific Linux Local Security Checks
    NASL idSL_20130307_RUBY_ON_SL6_X.NASL
    descriptionIt was discovered that Ruby
    last seen2020-03-18
    modified2013-03-08
    plugin id65094
    published2013-03-08
    reporterThis script is Copyright (C) 2013-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/65094
    titleScientific Linux Security Update : ruby on SL6.x i386/x86_64 (20130307)
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201412-27.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201412-27 (Ruby: Denial of Service) Multiple vulnerabilities have been discovered in Ruby. Please review the CVE identifiers referenced below for details. Impact : A context-dependent attacker could possibly execute arbitrary code with the privileges of the process, cause a Denial of Service condition, or bypass security restrictions. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id79980
    published2014-12-15
    reporterThis script is Copyright (C) 2014-2015 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/79980
    titleGLSA-201412-27 : Ruby: Denial of Service

Redhat

advisories
  • rhsa
    idRHSA-2013:0129
  • rhsa
    idRHSA-2013:0612
rpms
  • ruby-0:1.8.5-27.el5
  • ruby-debuginfo-0:1.8.5-27.el5
  • ruby-devel-0:1.8.5-27.el5
  • ruby-docs-0:1.8.5-27.el5
  • ruby-irb-0:1.8.5-27.el5
  • ruby-libs-0:1.8.5-27.el5
  • ruby-mode-0:1.8.5-27.el5
  • ruby-rdoc-0:1.8.5-27.el5
  • ruby-ri-0:1.8.5-27.el5
  • ruby-tcltk-0:1.8.5-27.el5
  • ruby-0:1.8.7.352-10.el6_4
  • ruby-debuginfo-0:1.8.7.352-10.el6_4
  • ruby-devel-0:1.8.7.352-10.el6_4
  • ruby-docs-0:1.8.7.352-10.el6_4
  • ruby-irb-0:1.8.7.352-10.el6_4
  • ruby-libs-0:1.8.7.352-10.el6_4
  • ruby-rdoc-0:1.8.7.352-10.el6_4
  • ruby-ri-0:1.8.7.352-10.el6_4
  • ruby-static-0:1.8.7.352-10.el6_4
  • ruby-tcltk-0:1.8.7.352-10.el6_4