Vulnerabilities > CVE-2013-0334 - Improper Input Validation vulnerability in multiple products

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

Summary

Bundler before 1.7, when multiple top-level source lines are used, allows remote attackers to install arbitrary gems by creating a gem with the same name as another gem in a different source.

Vulnerable Configurations

Part Description Count
Application
Bundler
155
OS
Opensuse
2
OS
Fedoraproject
3

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-2015-2180.NASL
    descriptionUpdated rubygem-bundler and rubygem-thor packages that fix one security issue, several bugs, and add various enhancements are now available for Red Hat Enterprise Linux 7. Red Hat Product Security 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. Bundler manages an application
    last seen2020-06-01
    modified2020-06-02
    plugin id87140
    published2015-12-02
    reporterThis script is Copyright (C) 2015-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/87140
    titleCentOS 7 : rubygem-bundler / rubygem-thor (CESA-2015:2180)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2015:2180 and 
    # CentOS Errata and Security Advisory 2015:2180 respectively.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(87140);
      script_version("2.6");
      script_cvs_date("Date: 2020/01/02");
    
      script_cve_id("CVE-2013-0334");
      script_xref(name:"RHSA", value:"2015:2180");
    
      script_name(english:"CentOS 7 : rubygem-bundler / rubygem-thor (CESA-2015:2180)");
      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 rubygem-bundler and rubygem-thor packages that fix one
    security issue, several bugs, and add various enhancements are now
    available for Red Hat Enterprise Linux 7.
    
    Red Hat Product Security 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.
    
    Bundler manages an application's dependencies through its entire life,
    across many machines, systematically and repeatably. Thor is a toolkit
    for building powerful command-line interfaces.
    
    A flaw was found in the way Bundler handled gems available from
    multiple sources. An attacker with access to one of the sources could
    create a malicious gem with the same name, which they could then use
    to trick a user into installing, potentially resulting in execution of
    code from the attacker-supplied malicious gem. (CVE-2013-0334)
    
    Bundler has been upgraded to upstream version 1.7.8 and Thor has been
    upgraded to upstream version 1.19.1, both of which provide a number of
    bug fixes and enhancements over the previous versions. (BZ#1194243,
    BZ#1209921)
    
    All rubygem-bundler and rubygem-thor users are advised to upgrade to
    these updated packages, which correct these issues and add these
    enhancements."
      );
      # https://lists.centos.org/pipermail/centos-cr-announce/2015-November/002604.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?472a5899"
      );
      # https://lists.centos.org/pipermail/centos-cr-announce/2015-November/002605.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?cc429d95"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected rubygem-bundler and / or rubygem-thor 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-2013-0334");
      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:rubygem-bundler");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:rubygem-bundler-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:rubygem-thor");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:rubygem-thor-doc");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:centos:centos:7");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2014/10/31");
      script_set_attribute(attribute:"patch_publication_date", value:"2015/11/30");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/12/02");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2015-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:"^7([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "CentOS 7.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-7", cpu:"x86_64", reference:"rubygem-bundler-1.7.8-3.el7")) flag++;
    if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"rubygem-bundler-doc-1.7.8-3.el7")) flag++;
    if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"rubygem-thor-0.19.1-1.el7")) flag++;
    if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"rubygem-thor-doc-0.19.1-1.el7")) 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, "rubygem-bundler / rubygem-bundler-doc / rubygem-thor / etc");
    }
    
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2015-2180.NASL
    descriptionUpdated rubygem-bundler and rubygem-thor packages that fix one security issue, several bugs, and add various enhancements are now available for Red Hat Enterprise Linux 7. Red Hat Product Security 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. Bundler manages an application
    last seen2020-06-01
    modified2020-06-02
    plugin id86935
    published2015-11-19
    reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/86935
    titleRHEL 7 : rubygem-bundler and rubygem-thor (RHSA-2015:2180)
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2015-275.NASL
    descriptionrubygem-bunder was updated to fix security vulnerabilities and non-security issues The following security issues were fixed : - Hide credentials while warning about gems with ambiguous sources - Warn when more than one top-level source is present - Bundler may install gems from a different source than expected (CVE-2013-0334) (bnc#898205) In addition, rubygem-bundler was udpated to 1.8.4 to fix non-security issues.
    last seen2020-06-05
    modified2015-03-31
    plugin id82462
    published2015-03-31
    reporterThis script is Copyright (C) 2015-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/82462
    titleopenSUSE Security Update : rubygem-bundler (openSUSE-2015-275)
  • NASL familyOracle Linux Local Security Checks
    NASL idORACLELINUX_ELSA-2015-2180.NASL
    descriptionFrom Red Hat Security Advisory 2015:2180 : Updated rubygem-bundler and rubygem-thor packages that fix one security issue, several bugs, and add various enhancements are now available for Red Hat Enterprise Linux 7. Red Hat Product Security 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. Bundler manages an application
    last seen2020-06-01
    modified2020-06-02
    plugin id87029
    published2015-11-24
    reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/87029
    titleOracle Linux 7 : rubygem-bundler / rubygem-thor (ELSA-2015-2180)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2014-11677.NASL
    descriptionThis update fixes CVE-2013-0334:
    last seen2020-03-17
    modified2014-10-12
    plugin id78371
    published2014-10-12
    reporterThis script is Copyright (C) 2014-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/78371
    titleFedora 21 : rubygem-bundler-1.7.3-1.fc21 (2014-11677)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2014-11649.NASL
    descriptionThis update fixes CVE-2013-0334:
    last seen2020-03-17
    modified2014-10-12
    plugin id78370
    published2014-10-12
    reporterThis script is Copyright (C) 2014-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/78370
    titleFedora 19 : rubygem-bundler-1.7.3-1.fc19 (2014-11649)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2014-11630.NASL
    descriptionThis update fixes CVE-2013-0334:
    last seen2020-03-17
    modified2014-10-12
    plugin id78369
    published2014-10-12
    reporterThis script is Copyright (C) 2014-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/78369
    titleFedora 20 : rubygem-bundler-1.7.3-1.fc20 (2014-11630)
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201609-02.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201609-02 (Bundler: Insecure installation) Bundler, allows the installation of gems from different sources with the same names, when multiple top-level gem sources are used. Impact : Remote attackers could inject arbitrary code via the gem install process. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id93698
    published2016-09-26
    reporterThis script is Copyright (C) 2016 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/93698
    titleGLSA-201609-02 : Bundler: Insecure installation
  • NASL familyScientific Linux Local Security Checks
    NASL idSL_20151119_RUBYGEM_BUNDLER_AND_RUBYGEM_THOR_ON_SL7_X.NASL
    descriptionA flaw was found in the way Bundler handled gems available from multiple sources. An attacker with access to one of the sources could create a malicious gem with the same name, which they could then use to trick a user into installing, potentially resulting in execution of code from the attacker-supplied malicious gem. (CVE-2013-0334) Bundler has been upgraded to upstream version 1.7.8 and Thor has been upgraded to upstream version 1.19.1, both of which provide a number of bug fixes and enhancements over the previous versions.
    last seen2020-03-18
    modified2015-12-22
    plugin id87573
    published2015-12-22
    reporterThis script is Copyright (C) 2015-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/87573
    titleScientific Linux Security Update : rubygem-bundler and rubygem-thor on SL7.x (noarch) (20151119)

Redhat

advisories
bugzilla
id1209921
titleUpdate Thor to the latest release
oval
OR
  • commentRed Hat Enterprise Linux must be installed
    ovaloval:com.redhat.rhba:tst:20070304026
  • AND
    • commentRed Hat Enterprise Linux 7 is installed
      ovaloval:com.redhat.rhba:tst:20150364027
    • OR
      • AND
        • commentrubygem-thor-doc is earlier than 0:0.19.1-1.el7
          ovaloval:com.redhat.rhsa:tst:20152180001
        • commentrubygem-thor-doc is signed with Red Hat redhatrelease2 key
          ovaloval:com.redhat.rhsa:tst:20152180002
      • AND
        • commentrubygem-thor is earlier than 0:0.19.1-1.el7
          ovaloval:com.redhat.rhsa:tst:20152180003
        • commentrubygem-thor is signed with Red Hat redhatrelease2 key
          ovaloval:com.redhat.rhsa:tst:20152180004
      • AND
        • commentrubygem-bundler-doc is earlier than 0:1.7.8-3.el7
          ovaloval:com.redhat.rhsa:tst:20152180005
        • commentrubygem-bundler-doc is signed with Red Hat redhatrelease2 key
          ovaloval:com.redhat.rhba:tst:20193384060
      • AND
        • commentrubygem-bundler is earlier than 0:1.7.8-3.el7
          ovaloval:com.redhat.rhsa:tst:20152180007
        • commentrubygem-bundler is signed with Red Hat redhatrelease2 key
          ovaloval:com.redhat.rhba:tst:20193384062
rhsa
idRHSA-2015:2180
released2015-11-19
severityModerate
titleRHSA-2015:2180: rubygem-bundler and rubygem-thor security, bug fix, and enhancement update (Moderate)
rpms
  • rubygem-bundler-0:1.7.8-3.el7
  • rubygem-bundler-doc-0:1.7.8-3.el7
  • rubygem-thor-0:0.19.1-1.el7
  • rubygem-thor-doc-0:0.19.1-1.el7