Vulnerabilities > CVE-2013-1821 - Improper Input Validation vulnerability in Ruby-Lang Ruby

047910
CVSS 5.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
PARTIAL
network
low complexity
ruby-lang
CWE-20
nessus

Summary

lib/rexml/text.rb in the REXML parser in Ruby before 1.9.3-p392 allows remote attackers to cause a denial of service (memory consumption and crash) via crafted text nodes in an XML document, aka an XML Entity Expansion (XEE) attack. Per: http://www.ruby-lang.org/en/news/2013/02/22/rexml-dos-2013-02-22/ "Affected versions All ruby 1.9 versions prior to ruby 1.9.3 patchlevel 392 All ruby 2.0 versions prior to ruby 2.0.0 patchlevel 0 prior to trunk revision 39384"

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Server Side Include (SSI) Injection
    An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
  • Cross Zone Scripting
    An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
  • Cross Site Scripting through Log Files
    An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.

Nessus

  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2013-0611.NASL
    descriptionUpdated ruby packages that fix one security issue are now available for Red Hat Enterprise Linux 5. The Red Hat Security Response Team has rated this update as having moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link 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 id65080
    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/65080
    titleCentOS 5 : ruby (CESA-2013:0611)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2013:0611 and 
    # CentOS Errata and Security Advisory 2013:0611 respectively.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(65080);
      script_version("1.10");
      script_cvs_date("Date: 2020/01/06");
    
      script_cve_id("CVE-2013-1821");
      script_bugtraq_id(58141);
      script_xref(name:"RHSA", value:"2013:0611");
    
      script_name(english:"CentOS 5 : ruby (CESA-2013:0611)");
      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 one security issue are now available
    for Red Hat Enterprise Linux 5.
    
    The Red Hat Security Response Team has rated this update as having
    moderate security impact. A Common Vulnerability Scoring System (CVSS)
    base score, which gives a detailed severity rating, is available from
    the CVE link 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'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)
    
    All users of Ruby are advised to upgrade to these updated packages,
    which contain backported patches to resolve this issue."
      );
      # https://lists.centos.org/pipermail/centos-announce/2013-March/019269.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?4fb60a74"
      );
      # https://lists.centos.org/pipermail/centos-announce/2013-March/019271.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?6df1f9ec"
      );
      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:N/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2013-1821");
      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:"2013/04/09");
      script_set_attribute(attribute:"patch_publication_date", value:"2013/03/07");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/03/08");
      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-29.el5_9")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-devel-1.8.5-29.el5_9")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-docs-1.8.5-29.el5_9")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-irb-1.8.5-29.el5_9")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-libs-1.8.5-29.el5_9")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-mode-1.8.5-29.el5_9")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-rdoc-1.8.5-29.el5_9")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-ri-1.8.5-29.el5_9")) flag++;
    if (rpm_check(release:"CentOS-5", reference:"ruby-tcltk-1.8.5-29.el5_9")) flag++;
    
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : rpm_report_get()
      );
      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 familySuSE Local Security Checks
    NASL idSUSE_RUBY-8524.NASL
    descriptionThe ruby interpreter received a fix for two security issues : - Ruby
    last seen2020-06-05
    modified2013-04-04
    plugin id65799
    published2013-04-04
    reporterThis script is Copyright (C) 2013-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/65799
    titleSuSE 10 Security Update : ruby (ZYPP Patch Number 8524)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The text description of this plugin is (C) Novell, Inc.
    #
    
    if (NASL_LEVEL < 3000) exit(0);
    
    include("compat.inc");
    
    if (description)
    {
      script_id(65799);
      script_version("1.5");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2011-2686", "CVE-2012-4464", "CVE-2012-4466", "CVE-2012-4522", "CVE-2013-1821");
    
      script_name(english:"SuSE 10 Security Update : ruby (ZYPP Patch Number 8524)");
      script_summary(english:"Checks rpm output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote SuSE 10 host is missing a security-related patch."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The ruby interpreter received a fix for two security issues :
    
      - Ruby's $SAFE mechanism enables untrusted user codes to
        run in $SAFE >= 4 mode. This is a kind of sandboxing so
        some operations are restricted in that mode to protect
        other data outside the sandbox. (CVE-2012-4466)
    
        The problem found was around this mechanism.
        Exception#to_s, NameError#to_s, and name_err_mesg_to_s()
        interpreter-internal API was not correctly handling the
        $SAFE bits so a String object which is not tainted can
        destructively be marked as tainted using them. By using
        this an untrusted code in a sandbox can modify a
        formerly-untainted string destructively.
    
        http://www.ruby-lang.org/en/news/2012/10/12/cve-2012-446
        4-cve-2012-4466/
    
      - Ruby before 1.8.7-p352 does not reset the random seed
        upon forking, which makes it easier for
        context-dependent attackers to predict the values of
        random numbers by leveraging knowledge of the number
        sequence obtained in a different child process.
        (CVE-2011-2686)
    
      - Fix entity expansion DoS vulnerability in REXML. When
        reading text nodes from an XML document, the REXML
        parser could be coerced into allocating extremely large
        string objects which could consume all available memory
        on the system. (CVE-2013-1821)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2011-2686.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2012-4464.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2012-4466.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2012-4522.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://support.novell.com/security/cve/CVE-2013-1821.html"
      );
      script_set_attribute(attribute:"solution", value:"Apply ZYPP patch number 8524.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:suse:suse_linux");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2011/08/05");
      script_set_attribute(attribute:"patch_publication_date", value:"2013/03/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/04/04");
      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:"SuSE Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/SuSE/release", "Host/SuSE/rpm-list");
    
      exit(0);
    }
    
    
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) exit(0, "Local checks are not enabled.");
    if (!get_kb_item("Host/SuSE/release")) exit(0, "The host is not running SuSE.");
    if (!get_kb_item("Host/SuSE/rpm-list")) exit(1, "Could not obtain the list of installed packages.");
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) exit(1, "Failed to determine the architecture type.");
    if (cpu >!< "x86_64" && cpu !~ "^i[3-6]86$") exit(1, "Local checks for SuSE 10 on the '"+cpu+"' architecture have not been implemented.");
    
    
    flag = 0;
    if (rpm_check(release:"SLED10", sp:4, reference:"ruby-1.8.6.p369-0.14.1")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else exit(0, "The host is not affected.");
    
  • NASL familyHuawei Local Security Checks
    NASL idEULEROS_SA-2018-1374.NASL
    descriptionAccording to the versions of the ruby packages installed, the EulerOS Virtualization installation on the remote host is affected by the following vulnerabilities : - The REXML parser in Ruby 1.9.x before 1.9.3-p550, 2.0.x before 2.0.0-p594, and 2.1.x before 2.1.4 allows remote attackers to cause a denial of service (memory consumption) via a crafted XML document, aka an XML Entity Expansion (XEE) attack.i1/4^CVE-2014-8080i1/4%0 - The REXML parser in Ruby 1.9.x before 1.9.3 patchlevel 551, 2.0.x before 2.0.0 patchlevel 598, and 2.1.x before 2.1.5 allows remote attackers to cause a denial of service (CPU and memory consumption) a crafted XML document containing an empty string in an entity that is used in a large number of nested entity references, aka an XML Entity Expansion (XEE) attack. NOTE: this vulnerability exists because of an incomplete fix for CVE-2013-1821 and CVE-2014-8080.i1/4^CVE-2014-8090i1/4%0 - Off-by-one error in the encodes function in pack.c in Ruby 1.9.3 and earlier, and 2.x through 2.1.2, when using certain format string specifiers, allows context-dependent attackers to cause a denial of service (segmentation fault) via vectors that trigger a stack-based buffer overflow.(CVE-2014-4975) Note that Tenable Network Security has extracted the preceding description block directly from the EulerOS security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-10
    modified2018-11-21
    plugin id119065
    published2018-11-21
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/119065
    titleEulerOS Virtualization 2.5.1 : ruby (EulerOS-SA-2018-1374)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(119065);
      script_version("1.34");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/07/21");
    
      script_cve_id(
        "CVE-2014-4975",
        "CVE-2014-8080",
        "CVE-2014-8090"
      );
      script_bugtraq_id(
        68474,
        70935,
        71230
      );
    
      script_name(english:"EulerOS Virtualization 2.5.1 : ruby (EulerOS-SA-2018-1374)");
      script_summary(english:"Checks the rpm output for the updated packages.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote EulerOS Virtualization host is missing multiple security
    updates.");
      script_set_attribute(attribute:"description", value:
    "According to the versions of the ruby packages installed, the EulerOS
    Virtualization installation on the remote host is affected by the
    following vulnerabilities :
    
      - The REXML parser in Ruby 1.9.x before 1.9.3-p550, 2.0.x
        before 2.0.0-p594, and 2.1.x before 2.1.4 allows remote
        attackers to cause a denial of service (memory
        consumption) via a crafted XML document, aka an XML
        Entity Expansion (XEE) attack.i1/4^CVE-2014-8080i1/4%0
    
      - The REXML parser in Ruby 1.9.x before 1.9.3 patchlevel
        551, 2.0.x before 2.0.0 patchlevel 598, and 2.1.x
        before 2.1.5 allows remote attackers to cause a denial
        of service (CPU and memory consumption) a crafted XML
        document containing an empty string in an entity that
        is used in a large number of nested entity references,
        aka an XML Entity Expansion (XEE) attack. NOTE: this
        vulnerability exists because of an incomplete fix for
        CVE-2013-1821 and CVE-2014-8080.i1/4^CVE-2014-8090i1/4%0
    
      - Off-by-one error in the encodes function in pack.c in
        Ruby 1.9.3 and earlier, and 2.x through 2.1.2, when
        using certain format string specifiers, allows
        context-dependent attackers to cause a denial of
        service (segmentation fault) via vectors that trigger a
        stack-based buffer overflow.(CVE-2014-4975)
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the EulerOS security advisory. Tenable
    has attempted to automatically clean and format it as much as possible
    without introducing additional issues.");
      # https://developer.huaweicloud.com/ict/en/site-euleros/euleros/security-advisories/EulerOS-SA-2018-1374
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?688a1521");
      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:N/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:ND/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:"patch_publication_date", value:"2018/11/11");
      script_set_attribute(attribute:"plugin_publication_date", value:"2018/11/21");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:ruby");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:ruby-irb");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:ruby-libs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:rubygem-bigdecimal");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:rubygem-io-console");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:rubygem-json");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:rubygem-psych");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:rubygem-rdoc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:rubygems");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:huawei:euleros:uvp:2.5.1");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Huawei Local Security Checks");
    
      script_copyright(english:"This script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/EulerOS/release", "Host/EulerOS/rpm-list", "Host/EulerOS/uvp_version");
    
      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/EulerOS/release");
    if (isnull(release) || release !~ "^EulerOS") audit(AUDIT_OS_NOT, "EulerOS");
    uvp = get_kb_item("Host/EulerOS/uvp_version");
    if (uvp != "2.5.1") audit(AUDIT_OS_NOT, "EulerOS Virtualization 2.5.1");
    if (!get_kb_item("Host/EulerOS/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$" && "aarch64" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "EulerOS", cpu);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_ARCH_NOT, "i686 / x86_64", cpu);
    
    flag = 0;
    
    pkgs = ["ruby-2.0.0.353-23.h9",
            "ruby-irb-2.0.0.353-23.h9",
            "ruby-libs-2.0.0.353-23.h9",
            "rubygem-bigdecimal-1.2.0-23.h9",
            "rubygem-io-console-0.4.2-23.h9",
            "rubygem-json-1.7.7-23.h9",
            "rubygem-psych-2.0.0-23.h9",
            "rubygem-rdoc-4.0.0-23.h9",
            "rubygems-2.0.14-23.h9"];
    
    foreach (pkg in pkgs)
      if (rpm_check(release:"EulerOS-2.0", reference:pkg)) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : rpm_report_get()
      );
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ruby");
    }
    
  • NASL familyHuawei Local Security Checks
    NASL idEULEROS_SA-2019-1428.NASL
    descriptionAccording to the versions of the ruby packages installed, the EulerOS Virtualization installation on the remote host is affected by the following vulnerabilities : - Ruby 1.8.7 before patchlevel 371, 1.9.3 before patchlevel 286, and 2.0 before revision r37068 allows context-dependent attackers to bypass safe-level restrictions and modify untainted strings via the name_err_mesg_to_str API function, which marks the string as tainted, a different vulnerability than CVE-2011-1005.(CVE-2012-4466) - The REXML parser in Ruby 1.9.x before 1.9.3 patchlevel 551, 2.0.x before 2.0.0 patchlevel 598, and 2.1.x before 2.1.5 allows remote attackers to cause a denial of service (CPU and memory consumption) a crafted XML document containing an empty string in an entity that is used in a large number of nested entity references, aka an XML Entity Expansion (XEE) attack. NOTE: this vulnerability exists because of an incomplete fix for CVE-2013-1821 and CVE-2014-8080.(CVE-2014-8090) - Algorithmic complexity vulnerability in Gem::Version::VERSION_PATTERN in lib/rubygems/version.rb in RubyGems before 1.8.23.1, 1.8.24 through 1.8.25, 2.0.x before 2.0.8, and 2.1.x before 2.1.0, as used in Ruby 1.9.0 through 2.0.0p247, allows remote attackers to cause a denial of service (CPU consumption) via a crafted gem version that triggers a large amount of backtracking in a regular expression.(CVE-2013-4287) - The REXML parser in Ruby 1.9.x before 1.9.3-p550, 2.0.x before 2.0.0-p594, and 2.1.x before 2.1.4 allows remote attackers to cause a denial of service (memory consumption) via a crafted XML document, aka an XML Entity Expansion (XEE) attack.(CVE-2014-8080) - 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-03-17
    modified2019-05-14
    plugin id124931
    published2019-05-14
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/124931
    titleEulerOS Virtualization 3.0.1.0 : ruby (EulerOS-SA-2019-1428)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(124931);
      script_version("1.19");
      script_cvs_date("$Date$");
    
      script_cve_id(
        "CVE-2012-4464",
        "CVE-2012-4466",
        "CVE-2012-4522",
        "CVE-2012-5371",
        "CVE-2013-2065",
        "CVE-2013-4073",
        "CVE-2013-4164",
        "CVE-2013-4287",
        "CVE-2013-4363",
        "CVE-2014-4975",
        "CVE-2014-8080",
        "CVE-2014-8090",
        "CVE-2018-16395",
        "CVE-2018-16396",
        "CVE-2018-8780"
      );
      script_bugtraq_id(
        55757,
        56115,
        56484,
        59881,
        60843,
        62281,
        62442,
        63873,
        68474,
        70935,
        71230
      );
    
      script_name(english:"EulerOS Virtualization 3.0.1.0 : ruby (EulerOS-SA-2019-1428)");
      script_summary(english:"Checks the rpm output for the updated packages.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote EulerOS Virtualization host is missing multiple security
    updates.");
      script_set_attribute(attribute:"description", value:
    "According to the versions of the ruby packages installed, the EulerOS
    Virtualization installation on the remote host is affected by the
    following vulnerabilities :
    
      - Ruby 1.8.7 before patchlevel 371, 1.9.3 before
        patchlevel 286, and 2.0 before revision r37068 allows
        context-dependent attackers to bypass safe-level
        restrictions and modify untainted strings via the
        name_err_mesg_to_str API function, which marks the
        string as tainted, a different vulnerability than
        CVE-2011-1005.(CVE-2012-4466)
    
      - The REXML parser in Ruby 1.9.x before 1.9.3 patchlevel
        551, 2.0.x before 2.0.0 patchlevel 598, and 2.1.x
        before 2.1.5 allows remote attackers to cause a denial
        of service (CPU and memory consumption) a crafted XML
        document containing an empty string in an entity that
        is used in a large number of nested entity references,
        aka an XML Entity Expansion (XEE) attack. NOTE: this
        vulnerability exists because of an incomplete fix for
        CVE-2013-1821 and CVE-2014-8080.(CVE-2014-8090)
    
      - Algorithmic complexity vulnerability in
        Gem::Version::VERSION_PATTERN in
        lib/rubygems/version.rb in RubyGems before 1.8.23.1,
        1.8.24 through 1.8.25, 2.0.x before 2.0.8, and 2.1.x
        before 2.1.0, as used in Ruby 1.9.0 through 2.0.0p247,
        allows remote attackers to cause a denial of service
        (CPU consumption) via a crafted gem version that
        triggers a large amount of backtracking in a regular
        expression.(CVE-2013-4287)
    
      - The REXML parser in Ruby 1.9.x before 1.9.3-p550, 2.0.x
        before 2.0.0-p594, and 2.1.x before 2.1.4 allows remote
        attackers to cause a denial of service (memory
        consumption) via a crafted XML document, aka an XML
        Entity Expansion (XEE) attack.(CVE-2014-8080)
    
      - 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)
    
      - The rb_get_path_check function in file.c in Ruby 1.9.3
        before patchlevel 286 and Ruby 2.0.0 before r37163
        allows context-dependent attackers to create files in
        unexpected locations or with unexpected names via a NUL
        byte in a file path.(CVE-2012-4522)
    
      - (1) DL and (2) Fiddle in Ruby 1.9 before 1.9.3
        patchlevel 426, and 2.0 before 2.0.0 patchlevel 195, do
        not perform taint checking for native functions, which
        allows context-dependent attackers to bypass intended
        $SAFE level restrictions.(CVE-2013-2065)
    
      - Algorithmic complexity vulnerability in
        Gem::Version::ANCHORED_VERSION_PATTERN in
        lib/rubygems/version.rb in RubyGems before 1.8.23.2,
        1.8.24 through 1.8.26, 2.0.x before 2.0.10, and 2.1.x
        before 2.1.5, as used in Ruby 1.9.0 through 2.0.0p247,
        allows remote attackers to cause a denial of service
        (CPU consumption) via a crafted gem version that
        triggers a large amount of backtracking in a regular
        expression. NOTE: this issue is due to an incomplete
        fix for CVE-2013-4287.(CVE-2013-4363)
    
      - Ruby (aka CRuby) 1.9 before 1.9.3-p327 and 2.0 before
        r37575 computes hash values without properly
        restricting the ability to trigger hash collisions
        predictably, which allows context-dependent attackers
        to cause a denial of service (CPU consumption) via
        crafted input to an application that maintains a hash
        table, as demonstrated by a universal multicollision
        attack against a variant of the MurmurHash2 algorithm,
        a different vulnerability than
        CVE-2011-4815.(CVE-2012-5371)
    
      - Off-by-one error in the encodes function in pack.c in
        Ruby 1.9.3 and earlier, and 2.x through 2.1.2, when
        using certain format string specifiers, allows
        context-dependent attackers to cause a denial of
        service (segmentation fault) via vectors that trigger a
        stack-based buffer overflow.(CVE-2014-4975)
    
      - Heap-based buffer overflow in Ruby 1.8, 1.9 before
        1.9.3-p484, 2.0 before 2.0.0-p353, 2.1 before 2.1.0
        preview2, and trunk before revision 43780 allows
        context-dependent attackers to cause a denial of
        service (segmentation fault) and possibly execute
        arbitrary code via a string that is converted to a
        floating point value, as demonstrated using (1) the
        to_f method or (2) JSON.parse.(CVE-2013-4164)
    
      - It was found that the methods from the Dir class did
        not properly handle strings containing the NULL byte.
        An attacker, able to inject NULL bytes in a path, could
        possibly trigger an unspecified behavior of the ruby
        script.(CVE-2018-8780)
    
      - Ruby 1.9.3 before patchlevel 286 and 2.0 before
        revision r37068 allows context-dependent attackers to
        bypass safe-level restrictions and modify untainted
        strings via the (1) exc_to_s or (2) name_err_to_s API
        function, which marks the string as tainted, a
        different vulnerability than CVE-2012-4466. NOTE: this
        issue might exist because of a CVE-2011-1005
        regression.(CVE-2012-4464)
    
      - An issue was discovered in the OpenSSL library in Ruby
        before 2.3.8, 2.4.x before 2.4.5, 2.5.x before 2.5.2,
        and 2.6.x before 2.6.0-preview3. When two
        OpenSSL::X509::Name objects are compared using ==,
        depending on the ordering, non-equal objects may return
        true. When the first argument is one character longer
        than the second, or the second argument contains a
        character that is one less than a character in the same
        position of the first argument, the result of == will
        be true. This could be leveraged to create an
        illegitimate certificate that may be accepted as
        legitimate and then used in signing or encryption
        operations.(CVE-2018-16395)
    
      - An issue was discovered in Ruby before 2.3.8, 2.4.x
        before 2.4.5, 2.5.x before 2.5.2, and 2.6.x before
        2.6.0-preview3. It does not taint strings that result
        from unpacking tainted strings with some
        formats.(CVE-2018-16396)
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the EulerOS security advisory. Tenable
    has attempted to automatically clean and format it as much as possible
    without introducing additional issues.");
      # https://developer.huaweicloud.com/ict/en/site-euleros/euleros/security-advisories/EulerOS-SA-2019-1428
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?81cbe7ae");
      script_set_attribute(attribute:"solution", value:
    "Update the affected ruby packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-8780");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2019/05/07");
      script_set_attribute(attribute:"plugin_publication_date", value:"2019/05/14");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:ruby");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:ruby-irb");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:ruby-libs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:rubygem-bigdecimal");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:rubygem-io-console");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:rubygem-json");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:rubygem-psych");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:rubygem-rdoc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:rubygems");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:huawei:euleros:uvp:3.0.1.0");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Huawei Local Security Checks");
    
      script_copyright(english:"This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/EulerOS/release", "Host/EulerOS/rpm-list", "Host/EulerOS/uvp_version");
    
      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/EulerOS/release");
    if (isnull(release) || release !~ "^EulerOS") audit(AUDIT_OS_NOT, "EulerOS");
    uvp = get_kb_item("Host/EulerOS/uvp_version");
    if (uvp != "3.0.1.0") audit(AUDIT_OS_NOT, "EulerOS Virtualization 3.0.1.0");
    if (!get_kb_item("Host/EulerOS/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$" && "aarch64" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "EulerOS", cpu);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_ARCH_NOT, "i686 / x86_64", cpu);
    
    flag = 0;
    
    pkgs = ["ruby-2.0.0.648-33.h12",
            "ruby-irb-2.0.0.648-33.h12",
            "ruby-libs-2.0.0.648-33.h12",
            "rubygem-bigdecimal-1.2.0-33.h12",
            "rubygem-io-console-0.4.2-33.h12",
            "rubygem-json-1.7.7-33.h12",
            "rubygem-psych-2.0.0-33.h12",
            "rubygem-rdoc-4.0.0-33.h12",
            "rubygems-2.0.14.1-33.h12"];
    
    foreach (pkg in pkgs)
      if (rpm_check(release:"EulerOS-2.0", reference:pkg)) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_HOLE,
        extra      : rpm_report_get()
      );
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ruby");
    }
    
  • NASL familyAmazon Linux Local Security Checks
    NASL idALA_ALAS-2013-195.NASL
    descriptionlib/rexml/text.rb in the REXML parser in Ruby before 1.9.3-p392 allows remote attackers to cause a denial of service (memory consumption and crash) via crafted text nodes in an XML document, aka an XML Entity Expansion (XEE) attack.
    last seen2020-06-01
    modified2020-06-02
    plugin id69753
    published2013-09-04
    reporterThis script is Copyright (C) 2013-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/69753
    titleAmazon Linux AMI : ruby19 (ALAS-2013-195)
    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-195.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(69753);
      script_version("1.6");
      script_cvs_date("Date: 2018/04/18 15:09:35");
    
      script_cve_id("CVE-2013-1821");
      script_xref(name:"ALAS", value:"2013-195");
    
      script_name(english:"Amazon Linux AMI : ruby19 (ALAS-2013-195)");
      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:
    "lib/rexml/text.rb in the REXML parser in Ruby before 1.9.3-p392 allows
    remote attackers to cause a denial of service (memory consumption and
    crash) via crafted text nodes in an XML document, aka an XML Entity
    Expansion (XEE) attack."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://alas.aws.amazon.com/ALAS-2013-195.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Run 'yum update ruby19' to update your system."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby19");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby19-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby19-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby19-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby19-irb");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:ruby19-libs");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:rubygem19-bigdecimal");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:rubygem19-io-console");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:rubygem19-json");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:rubygem19-minitest");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:rubygem19-rake");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:rubygem19-rdoc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:rubygems19");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:rubygems19-devel");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:amazon:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2013/05/24");
      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:"ruby19-1.9.3.392-29.38.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"ruby19-debuginfo-1.9.3.392-29.38.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"ruby19-devel-1.9.3.392-29.38.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"ruby19-doc-1.9.3.392-29.38.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"ruby19-irb-1.9.3.392-29.38.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"ruby19-libs-1.9.3.392-29.38.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"rubygem19-bigdecimal-1.1.0-29.38.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"rubygem19-io-console-0.3-29.38.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"rubygem19-json-1.5.5-29.38.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"rubygem19-minitest-2.5.1-29.38.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"rubygem19-rake-0.9.2.2-29.38.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"rubygem19-rdoc-3.9.5-29.38.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"rubygems19-1.8.23-29.38.amzn1")) flag++;
    if (rpm_check(release:"ALA", reference:"rubygems19-devel-1.8.23-29.38.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, "ruby19 / ruby19-debuginfo / ruby19-devel / ruby19-doc / ruby19-irb / 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 familyDebian Local Security Checks
    NASL idDEBIAN_DSA-2738.NASL
    descriptionSeveral vulnerabilities have been discovered in the interpreter for the Ruby language, which may lead to denial of service and other security problems. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2013-1821 Ben Murphy discovered that unrestricted entity expansion in REXML can lead to a Denial of Service by consuming all host memory. - CVE-2013-4073 William (B.J.) Snow Orvis discovered a vulnerability in the hostname checking in Ruby
    last seen2020-03-17
    modified2013-08-20
    plugin id69398
    published2013-08-20
    reporterThis script is Copyright (C) 2013-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/69398
    titleDebian DSA-2738-1 : ruby1.9.1 - several vulnerabilities
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Debian Security Advisory DSA-2738. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(69398);
      script_version("1.11");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12");
    
      script_cve_id("CVE-2013-1821", "CVE-2013-4073");
      script_bugtraq_id(58141, 60843);
      script_xref(name:"DSA", value:"2738");
    
      script_name(english:"Debian DSA-2738-1 : ruby1.9.1 - several vulnerabilities");
      script_summary(english:"Checks dpkg output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Several vulnerabilities have been discovered in the interpreter for
    the Ruby language, which may lead to denial of service and other
    security problems. The Common Vulnerabilities and Exposures project
    identifies the following problems :
    
      - CVE-2013-1821
        Ben Murphy discovered that unrestricted entity expansion
        in REXML can lead to a Denial of Service by consuming
        all host memory.
    
      - CVE-2013-4073
        William (B.J.) Snow Orvis discovered a vulnerability in
        the hostname checking in Ruby's SSL client that could
        allow man-in-the-middle attackers to spoof SSL servers
        via valid certificate issued by a trusted certification
        authority."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702525"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714543"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2013-1821"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2013-4073"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/wheezy/ruby1.9.1"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.debian.org/security/2013/dsa-2738"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the ruby1.9.1 packages.
    
    For the oldstable distribution (squeeze), these problems have been
    fixed in version 1.9.2.0-2+deb6u1.
    
    For the stable distribution (wheezy), these problems have been fixed
    in version 1.9.3.194-8.1+deb7u1."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      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:debian:debian_linux:ruby1.9.1");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:6.0");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:7.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2013/08/18");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/08/20");
      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:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"6.0", prefix:"ruby1.9.1", reference:"1.9.2.0-2+deb6u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libruby1.9.1", reference:"1.9.3.194-8.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libruby1.9.1-dbg", reference:"1.9.3.194-8.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libtcltk-ruby1.9.1", reference:"1.9.3.194-8.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"ri1.9.1", reference:"1.9.3.194-8.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"ruby1.9.1", reference:"1.9.3.194-8.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"ruby1.9.1-dev", reference:"1.9.3.194-8.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"ruby1.9.1-examples", reference:"1.9.3.194-8.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"ruby1.9.1-full", reference:"1.9.3.194-8.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"ruby1.9.3", reference:"1.9.3.194-8.1+deb7u1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-2809.NASL
    descriptionSeveral vulnerabilities have been discovered in the interpreter for the Ruby language. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2013-1821 Ben Murphy discovered that unrestricted entity expansion in REXML can lead to a Denial of Service by consuming all host memory. - CVE-2013-4073 William (B.J.) Snow Orvis discovered a vulnerability in the hostname checking in Ruby
    last seen2020-03-17
    modified2013-12-05
    plugin id71220
    published2013-12-05
    reporterThis script is Copyright (C) 2013-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/71220
    titleDebian DSA-2809-1 : ruby1.8 - several vulnerabilities
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Debian Security Advisory DSA-2809. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(71220);
      script_version("1.12");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12");
    
      script_cve_id("CVE-2013-1821", "CVE-2013-4073", "CVE-2013-4164");
      script_bugtraq_id(58141, 60843, 63873);
      script_xref(name:"DSA", value:"2809");
    
      script_name(english:"Debian DSA-2809-1 : ruby1.8 - several vulnerabilities");
      script_summary(english:"Checks dpkg output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Several vulnerabilities have been discovered in the interpreter for
    the Ruby language. The Common Vulnerabilities and Exposures project
    identifies the following problems :
    
      - CVE-2013-1821
        Ben Murphy discovered that unrestricted entity expansion
        in REXML can lead to a Denial of Service by consuming
        all host memory.
    
      - CVE-2013-4073
        William (B.J.) Snow Orvis discovered a vulnerability in
        the hostname checking in Ruby's SSL client that could
        allow man-in-the-middle attackers to spoof SSL servers
        via a crafted certificate issued by a trusted
        certification authority.
    
      - CVE-2013-4164
        Charlie Somerville discovered that Ruby incorrectly
        handled floating point number conversion. If an
        application using Ruby accepted untrusted input strings
        and converted them to floating point numbers, an
        attacker able to provide such input could cause the
        application to crash or, possibly, execute arbitrary
        code with the privileges of the application."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702526"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714541"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=730189"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2013-1821"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2013-4073"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security-tracker.debian.org/tracker/CVE-2013-4164"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/squeeze/ruby1.8"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/wheezy/ruby1.8"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.debian.org/security/2013/dsa-2809"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the ruby1.8 packages.
    
    For the oldstable distribution (squeeze), these problems have been
    fixed in version 1.8.7.302-2squeeze2.
    
    For the stable distribution (wheezy), these problems have been fixed
    in version 1.8.7.358-7.1+deb7u1."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      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:debian:debian_linux:ruby1.8");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:6.0");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:7.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2013/12/04");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/12/05");
      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:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"6.0", prefix:"libruby1.8", reference:"1.8.7.302-2squeeze2")) flag++;
    if (deb_check(release:"6.0", prefix:"libruby1.8-dbg", reference:"1.8.7.302-2squeeze2")) flag++;
    if (deb_check(release:"6.0", prefix:"libtcltk-ruby1.8", reference:"1.8.7.302-2squeeze2")) flag++;
    if (deb_check(release:"6.0", prefix:"ri1.8", reference:"1.8.7.302-2squeeze2")) flag++;
    if (deb_check(release:"6.0", prefix:"ruby1.8", reference:"1.8.7.302-2squeeze2")) flag++;
    if (deb_check(release:"6.0", prefix:"ruby1.8-dev", reference:"1.8.7.302-2squeeze2")) flag++;
    if (deb_check(release:"6.0", prefix:"ruby1.8-elisp", reference:"1.8.7.302-2squeeze2")) flag++;
    if (deb_check(release:"6.0", prefix:"ruby1.8-examples", reference:"1.8.7.302-2squeeze2")) flag++;
    if (deb_check(release:"7.0", prefix:"libruby1.8", reference:"1.8.7.358-7.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libruby1.8-dbg", reference:"1.8.7.358-7.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libtcltk-ruby1.8", reference:"1.8.7.358-7.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"ri1.8", reference:"1.8.7.358-7.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"ruby1.8", reference:"1.8.7.358-7.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"ruby1.8-dev", reference:"1.8.7.358-7.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"ruby1.8-examples", reference:"1.8.7.358-7.1+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"ruby1.8-full", reference:"1.8.7.358-7.1+deb7u1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyOracle Linux Local Security Checks
    NASL idORACLELINUX_ELSA-2013-0611.NASL
    descriptionFrom Red Hat Security Advisory 2013:0611 : Updated ruby packages that fix one security issue are now available for Red Hat Enterprise Linux 5. The Red Hat Security Response Team has rated this update as having moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link 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 id68781
    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/68781
    titleOracle Linux 5 : ruby (ELSA-2013-0611)
  • 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_20130307_RUBY_ON_SL5_X.NASL
    descriptionIt was discovered that Ruby
    last seen2020-03-18
    modified2013-03-08
    plugin id65093
    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/65093
    titleScientific Linux Security Update : ruby on SL5.x i386/x86_64 (20130307)
  • 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 familySlackware Local Security Checks
    NASL idSLACKWARE_SSA_2013-075-01.NASL
    descriptionNew ruby packages are available for Slackware 13.1, 13.37, 14.0, and -current to fix security issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id65583
    published2013-03-17
    reporterThis script is Copyright (C) 2013 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/65583
    titleSlackware 13.1 / 13.37 / 14.0 / current : ruby (SSA:2013-075-01)
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2013-0611.NASL
    descriptionUpdated ruby packages that fix one security issue are now available for Red Hat Enterprise Linux 5. The Red Hat Security Response Team has rated this update as having moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link 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 id65084
    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/65084
    titleRHEL 5 : ruby (RHSA-2013:0611)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_RUBY-140415.NASL
    descriptionThis Ruby update fixes the following security issue : - Fixed entity expansion DoS vulnerability in REXML. (CVE-2013-1821). (bnc#808137)
    last seen2020-06-05
    modified2014-05-21
    plugin id74118
    published2014-05-21
    reporterThis script is Copyright (C) 2014-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/74118
    titleSuSE 11.3 Security Update : Ruby (SAT Patch Number 9136)
  • 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 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 familySuSE Local Security Checks
    NASL idOPENSUSE-2013-298.NASL
    descriptionRuby 1.8 was updated to fix a XML entity expansion denial of service attack (CVE-2013-1821) Ruby 1.9 was updated to 1.9.3 p392, fixing the same security issues and also : - update json intree to 1.5.5: Denial of Service and Unsafe Object Creation Vulnerability in JSON CVE-2013-0269 - limit entity expansion text limit to 10kB CVE-2013-1821 - get rid of a SEGV when calling rb_iter_break() from some extention libraries. - some warning suppressed and smaller fixes
    last seen2020-06-05
    modified2014-06-13
    plugin id74955
    published2014-06-13
    reporterThis script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/74955
    titleopenSUSE Security Update : ruby (openSUSE-SU-2013:0603-1)
  • 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
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-1780-1.NASL
    descriptionBen Murphy discovered that the Ruby REXML library incorrectly handled XML entity expansion. An attacker could use this flaw to cause Ruby to consume large amounts of memory, resulting in a denial of service. 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 id65686
    published2013-03-26
    reporterUbuntu Security Notice (C) 2013-2019 Canonical, Inc. / NASL script (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/65686
    titleUbuntu 10.04 LTS / 11.10 / 12.04 LTS / 12.10 : ruby1.8, ruby1.9.1 vulnerability (USN-1780-1)

Redhat

advisories
  • bugzilla
    id914716
    titleCVE-2013-1821 ruby: entity expansion DoS vulnerability in REXML
    oval
    OR
    • commentRed Hat Enterprise Linux must be installed
      ovaloval:com.redhat.rhba:tst:20070304026
    • AND
      • commentRed Hat Enterprise Linux 5 is installed
        ovaloval:com.redhat.rhba:tst:20070331005
      • OR
        • AND
          • commentruby-devel is earlier than 0:1.8.5-29.el5_9
            ovaloval:com.redhat.rhsa:tst:20130611001
          • commentruby-devel is signed with Red Hat redhatrelease key
            ovaloval:com.redhat.rhsa:tst:20070965004
        • AND
          • commentruby-mode is earlier than 0:1.8.5-29.el5_9
            ovaloval:com.redhat.rhsa:tst:20130611003
          • commentruby-mode is signed with Red Hat redhatrelease key
            ovaloval:com.redhat.rhsa:tst:20070965016
        • AND
          • commentruby-tcltk is earlier than 0:1.8.5-29.el5_9
            ovaloval:com.redhat.rhsa:tst:20130611005
          • commentruby-tcltk is signed with Red Hat redhatrelease key
            ovaloval:com.redhat.rhsa:tst:20070965006
        • AND
          • commentruby-docs is earlier than 0:1.8.5-29.el5_9
            ovaloval:com.redhat.rhsa:tst:20130611007
          • commentruby-docs is signed with Red Hat redhatrelease key
            ovaloval:com.redhat.rhsa:tst:20070965012
        • AND
          • commentruby is earlier than 0:1.8.5-29.el5_9
            ovaloval:com.redhat.rhsa:tst:20130611009
          • commentruby is signed with Red Hat redhatrelease key
            ovaloval:com.redhat.rhsa:tst:20070965010
        • AND
          • commentruby-rdoc is earlier than 0:1.8.5-29.el5_9
            ovaloval:com.redhat.rhsa:tst:20130611011
          • commentruby-rdoc is signed with Red Hat redhatrelease key
            ovaloval:com.redhat.rhsa:tst:20070965018
        • AND
          • commentruby-ri is earlier than 0:1.8.5-29.el5_9
            ovaloval:com.redhat.rhsa:tst:20130611013
          • commentruby-ri is signed with Red Hat redhatrelease key
            ovaloval:com.redhat.rhsa:tst:20070965002
        • AND
          • commentruby-irb is earlier than 0:1.8.5-29.el5_9
            ovaloval:com.redhat.rhsa:tst:20130611015
          • commentruby-irb is signed with Red Hat redhatrelease key
            ovaloval:com.redhat.rhsa:tst:20070965008
        • AND
          • commentruby-libs is earlier than 0:1.8.5-29.el5_9
            ovaloval:com.redhat.rhsa:tst:20130611017
          • commentruby-libs is signed with Red Hat redhatrelease key
            ovaloval:com.redhat.rhsa:tst:20070965014
    rhsa
    idRHSA-2013:0611
    released2013-03-07
    severityModerate
    titleRHSA-2013:0611: ruby security update (Moderate)
  • bugzilla
    id914716
    titleCVE-2013-1821 ruby: entity expansion DoS vulnerability in REXML
    oval
    OR
    • commentRed Hat Enterprise Linux must be installed
      ovaloval:com.redhat.rhba:tst:20070304026
    • AND
      • commentRed Hat Enterprise Linux 6 is installed
        ovaloval:com.redhat.rhba:tst:20111656003
      • OR
        • AND
          • commentruby is earlier than 0:1.8.7.352-10.el6_4
            ovaloval:com.redhat.rhsa:tst:20130612001
          • commentruby is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhba:tst:20193384030
        • AND
          • commentruby-irb is earlier than 0:1.8.7.352-10.el6_4
            ovaloval:com.redhat.rhsa:tst:20130612003
          • commentruby-irb is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhba:tst:20193384070
        • AND
          • commentruby-libs is earlier than 0:1.8.7.352-10.el6_4
            ovaloval:com.redhat.rhsa:tst:20130612005
          • commentruby-libs is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhba:tst:20193384024
        • AND
          • commentruby-rdoc is earlier than 0:1.8.7.352-10.el6_4
            ovaloval:com.redhat.rhsa:tst:20130612007
          • commentruby-rdoc is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhsa:tst:20110910004
        • AND
          • commentruby-devel is earlier than 0:1.8.7.352-10.el6_4
            ovaloval:com.redhat.rhsa:tst:20130612009
          • commentruby-devel is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhba:tst:20193384026
        • AND
          • commentruby-static is earlier than 0:1.8.7.352-10.el6_4
            ovaloval:com.redhat.rhsa:tst:20130612011
          • commentruby-static is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhsa:tst:20110910002
        • AND
          • commentruby-ri is earlier than 0:1.8.7.352-10.el6_4
            ovaloval:com.redhat.rhsa:tst:20130612013
          • commentruby-ri is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhsa:tst:20110910012
        • AND
          • commentruby-docs is earlier than 0:1.8.7.352-10.el6_4
            ovaloval:com.redhat.rhsa:tst:20130612015
          • commentruby-docs is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhsa:tst:20110910016
        • AND
          • commentruby-tcltk is earlier than 0:1.8.7.352-10.el6_4
            ovaloval:com.redhat.rhsa:tst:20130612017
          • commentruby-tcltk is signed with Red Hat redhatrelease2 key
            ovaloval:com.redhat.rhsa:tst:20110910008
    rhsa
    idRHSA-2013:0612
    released2013-03-07
    severityModerate
    titleRHSA-2013:0612: ruby security update (Moderate)
  • rhsa
    idRHSA-2013:1028
  • rhsa
    idRHSA-2013:1147
rpms
  • ruby-0:1.8.5-29.el5_9
  • ruby-debuginfo-0:1.8.5-29.el5_9
  • ruby-devel-0:1.8.5-29.el5_9
  • ruby-docs-0:1.8.5-29.el5_9
  • ruby-irb-0:1.8.5-29.el5_9
  • ruby-libs-0:1.8.5-29.el5_9
  • ruby-mode-0:1.8.5-29.el5_9
  • ruby-rdoc-0:1.8.5-29.el5_9
  • ruby-ri-0:1.8.5-29.el5_9
  • ruby-tcltk-0:1.8.5-29.el5_9
  • 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