Vulnerabilities > CVE-2012-4464 - Permissions, Privileges, and Access Controls vulnerability in Ruby-Lang Ruby 1.9.3/2.0/2.0.0

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
ruby-lang
CWE-264
nessus

Summary

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.

Vulnerable Configurations

Part Description Count
Application
Ruby-Lang
11

Common Attack Pattern Enumeration and Classification (CAPEC)

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

Nessus

  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-1602-1.NASL
    descriptionTyler Hicks and Shugo Maeda 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-4464, CVE-2012-4466). 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 id62496
    published2012-10-11
    reporterUbuntu Security Notice (C) 2012-2019 Canonical, Inc. / NASL script (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/62496
    titleUbuntu 12.04 LTS : ruby1.9.1 vulnerabilities (USN-1602-1)
  • 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)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_RUBY-130221.NASL
    descriptionThe ruby interpreter received a fix for a security issue : - Ruby
    last seen2020-06-05
    modified2013-03-13
    plugin id65248
    published2013-03-13
    reporterThis script is Copyright (C) 2013-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/65248
    titleSuSE 11.2 Security Update : ruby (SAT Patch Number 7386)
  • 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)
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2012-763.NASL
    descriptionThis update of ruby fixed multiple SAFE level bypass flaws.
    last seen2020-06-05
    modified2014-06-13
    plugin id74804
    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/74804
    titleopenSUSE Security Update : ruby / ruby19 (openSUSE-SU-2012:1443-1)
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_2A093853249511E2B0C7000D601460A4.NASL
    descriptionThe official ruby site reports : Vulnerabilities found for Exception#to_s, NameError#to_s, and name_err_mesg_to_s() which is Ruby interpreter-internal API. A malicious user code can bypass $SAFE check by utilizing one of those security holes. Ruby
    last seen2020-06-01
    modified2020-06-02
    plugin id62791
    published2012-11-02
    reporterThis script is Copyright (C) 2012-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/62791
    titleFreeBSD : ruby -- $SAFE escaping vulnerability about Exception#to_s/NameError#to_s (2a093853-2495-11e2-b0c7-000d601460a4)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2012-15395.NASL
    descriptionSome security flaws were found on ruby currently shipped on Fedora 17 where malicious user can bypass safe mechanize by raising exception intentionally and make arbitrary strings tainted. This flaw were now registered as CVE-2012-4464 and CVE-2012-4466. This update rpm will fix this issue. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-03-17
    modified2012-10-15
    plugin id62528
    published2012-10-15
    reporterThis script is Copyright (C) 2012-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/62528
    titleFedora 17 : ruby-1.9.3.194-17.fc17 (2012-15395)
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2013-167.NASL
    descriptionruby19 was updated to fix various bugs and security issues: Update to 1.9.3 p385 (bnc#802406) - XSS exploit of RDoc documentation generated by rdoc (CVE-2013-0256) - for other changes see /usr/share/doc/packages/ruby19/Changelog Update to 1.9.3 p327 (bnc#789983) - CVE-2012-5371 and plenty of other fixes Update to 1.9.3 p286 (bnc#783511, bnc#791199) - This release includes some security fixes, and many other bug fixes. $SAFE escaping vulnerability about Exception#to_s / NameError#to_s (CVE-2012-4464, CVE-2012-4466) - Unintentional file creation caused by inserting an illegal NUL character many other bug fixes. (CVE-2012-4522) Also following bugfixes and packaging fixes were done : - make sure the rdoc output is more stable for build-compare (new patch ruby-sort-rdoc-output.patch) - readd the private header *atomic.h - remove build depencency on ca certificates - only causing cycles - one more header needed for rubygem-ruby-debug-base19 - install vm_core.h and its dependencies as ruby-devel-extra - move the provides to the ruby package instead - add provides for the internal gems - restore the old ruby macros and the gem wrapper script - gem_install_wrapper no longer necessary
    last seen2020-06-05
    modified2014-06-13
    plugin id74909
    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/74909
    titleopenSUSE Security Update : ruby19 (openSUSE-SU-2013:0376-1)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2012-15507.NASL
    descriptionSome security flaws were found on ruby currently shipped on Fedora 17 where malicious user can bypass safe mechanize by raising exception intentionally and make arbitrary strings tainted. This flaw were now registered as CVE-2012-4464 and CVE-2012-4466. Note that CVE-2012-4464 is basically the same as CVE-2011-1005, which was supposed to be already fixed on ruby 1.8.x branch but it proved that the fix was incomplete. This new rpm will fix the above issue. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-03-17
    modified2012-10-15
    plugin id62531
    published2012-10-15
    reporterThis script is Copyright (C) 2012-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/62531
    titleFedora 16 : ruby-1.8.7.358-4.fc16 (2012-15507)
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-1614-1.NASL
    descriptionTyler Hicks and Shugo Maeda 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. USN-1602-1 fixed these vulnerabilities in other Ubuntu releases. This update provides the corresponding updates for Ubuntu 12.10. (CVE-2012-4464, CVE-2012-4466) Peter Bex discovered that Ruby incorrectly handled file path strings when opening files. An attacker could use this flaw to open or create unexpected files. (CVE-2012-4522). 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 id62661
    published2012-10-23
    reporterUbuntu Security Notice (C) 2012-2019 Canonical, Inc. / NASL script (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/62661
    titleUbuntu 12.04 LTS / 12.10 : ruby1.9.1 vulnerabilities (USN-1614-1)
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2013-0582.NASL
    descriptionRed Hat OpenShift Enterprise 1.1.1 is now available. 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. OpenShift Enterprise is a cloud computing Platform-as-a-Service (PaaS) solution from Red Hat, and is designed for on-premise or private cloud deployments. Installing the updated packages and restarting the OpenShift services are the only requirements for this update. However, if you are updating your system to Red Hat Enterprise Linux 6.4 while applying OpenShift Enterprise 1.1.1 updates, it is recommended that you restart your system. For further information about this release, refer to the OpenShift Enterprise 1.1.1 Technical Notes, available shortly from https://access.redhat.com/knowledge/docs/ This update also fixes the following security issues : Multiple cross-site scripting (XSS) flaws were found in rubygem-actionpack. A remote attacker could use these flaws to conduct XSS attacks against users of an application using rubygem-actionpack. (CVE-2012-3463, CVE-2012-3464, CVE-2012-3465) It was found that certain methods did not sanitize file names before passing them to lower layer routines in Ruby. If a Ruby application created files with names based on untrusted input, it could result in the creation of files with different names than expected. (CVE-2012-4522) A denial of service flaw was found in the implementation of associative arrays (hashes) in Ruby. An attacker able to supply a large number of inputs to a Ruby application (such as HTTP POST request parameters sent to a web application) that are used as keys when inserting data into an array could trigger multiple hash function collisions, making array operations take an excessive amount of CPU time. To mitigate this issue, a new, more collision resistant algorithm has been used to reduce the chance of an attacker successfully causing intentional collisions. (CVE-2012-5371) Input validation vulnerabilities were discovered in rubygem-activerecord. A remote attacker could possibly use these flaws to perform a SQL injection attack against an application using rubygem-activerecord. (CVE-2012-2661, CVE-2012-2695, CVE-2013-0155) Input validation vulnerabilities were discovered in rubygem-actionpack. A remote attacker could possibly use these flaws to perform a SQL injection attack against an application using rubygem-actionpack and rubygem-activerecord. (CVE-2012-2660, CVE-2012-2694) A flaw was found in the HTTP digest authentication implementation in rubygem-actionpack. A remote attacker could use this flaw to cause a denial of service of an application using rubygem-actionpack and digest authentication. (CVE-2012-3424) A flaw was found in the handling of strings in Ruby safe level 4. A remote attacker can use Exception#to_s to destructively modify an untainted string so that it is tainted, the string can then be arbitrarily modified. (CVE-2012-4466) A flaw was found in the method for translating an exception message into a string in the Ruby 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-4464) It was found that ruby_parser from rubygem-ruby_parser created a temporary file in an insecure way. A local attacker could use this flaw to perform a symbolic link attack, overwriting arbitrary files accessible to the application using ruby_parser. (CVE-2013-0162) The CVE-2013-0162 issue was discovered by Michael Scherer of the Red Hat Regional IT team. Users are advised to upgrade to Red Hat OpenShift Enterprise 1.1.1.
    last seen2020-06-10
    modified2018-12-06
    plugin id119432
    published2018-12-06
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/119432
    titleRHEL 6 : openshift (RHSA-2013:0582)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2012-15376.NASL
    descriptionSome security flaws were found on ruby currently shipped on Fedora 18 where malicious user can bypass safe mechanize by raising exception intentionally and make arbitrary strings tainted. This flaw were now registered as CVE-2012-4464 and CVE-2012-4466. This update rpm will fix this issue. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-03-17
    modified2012-10-09
    plugin id62455
    published2012-10-09
    reporterThis script is Copyright (C) 2012-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/62455
    titleFedora 18 : ruby-1.9.3.194-18.fc18 (2012-15376)

Redhat

rpms
  • graphviz-0:2.26.0-10.el6
  • graphviz-debuginfo-0:2.26.0-10.el6
  • graphviz-devel-0:2.26.0-10.el6
  • graphviz-doc-0:2.26.0-10.el6
  • graphviz-gd-0:2.26.0-10.el6
  • graphviz-ruby-0:2.26.0-10.el6
  • openshift-console-0:0.0.16-1.el6op
  • openshift-origin-broker-0:1.0.11-1.el6op
  • openshift-origin-broker-util-0:1.0.15-1.el6op
  • openshift-origin-cartridge-cron-1.4-0:1.0.3-1.el6op
  • openshift-origin-cartridge-diy-0.1-0:1.0.3-1.el6op
  • openshift-origin-cartridge-haproxy-1.4-0:1.0.4-1.el6op
  • openshift-origin-cartridge-jbosseap-6.0-0:1.0.4-1.el6op
  • openshift-origin-cartridge-jbossews-1.0-0:1.0.13-1.el6op
  • openshift-origin-cartridge-jenkins-1.4-0:1.0.2-1.el6op
  • openshift-origin-cartridge-jenkins-client-1.4-0:1.0.2-1.el6op
  • openshift-origin-cartridge-mysql-5.1-0:1.0.5-1.el6op
  • openshift-origin-cartridge-perl-5.10-0:1.0.3-1.el6op
  • openshift-origin-cartridge-php-5.3-0:1.0.5-1.el6op
  • openshift-origin-cartridge-postgresql-8.4-0:1.0.3-2.el6op
  • openshift-origin-cartridge-ruby-1.8-0:1.0.7-1.el6op
  • openshift-origin-cartridge-ruby-1.9-scl-0:1.0.8-1.el6op
  • openshift-origin-msg-node-mcollective-0:1.0.3-1.el6op
  • php-bcmath-0:5.3.3-22.el6
  • php-debuginfo-0:5.3.3-22.el6
  • php-devel-0:5.3.3-22.el6
  • php-imap-0:5.3.3-22.el6
  • php-mbstring-0:5.3.3-22.el6
  • php-process-0:5.3.3-22.el6
  • ruby193-ruby-0:1.9.3.327-25.el6
  • ruby193-ruby-debuginfo-0:1.9.3.327-25.el6
  • ruby193-ruby-devel-0:1.9.3.327-25.el6
  • ruby193-ruby-doc-0:1.9.3.327-25.el6
  • ruby193-ruby-irb-0:1.9.3.327-25.el6
  • ruby193-ruby-libs-0:1.9.3.327-25.el6
  • ruby193-ruby-tcltk-0:1.9.3.327-25.el6
  • ruby193-rubygem-actionpack-1:3.2.8-3.el6
  • ruby193-rubygem-actionpack-doc-1:3.2.8-3.el6
  • ruby193-rubygem-activemodel-0:3.2.8-2.el6
  • ruby193-rubygem-activemodel-doc-0:3.2.8-2.el6
  • ruby193-rubygem-activerecord-1:3.2.8-3.el6
  • ruby193-rubygem-activerecord-doc-1:3.2.8-3.el6
  • ruby193-rubygem-bigdecimal-0:1.1.0-25.el6
  • ruby193-rubygem-io-console-0:0.3-25.el6
  • ruby193-rubygem-json-0:1.5.4-25.el6
  • ruby193-rubygem-minitest-0:2.5.1-25.el6
  • ruby193-rubygem-railties-0:3.2.8-2.el6
  • ruby193-rubygem-railties-doc-0:3.2.8-2.el6
  • ruby193-rubygem-rake-0:0.9.2.2-25.el6
  • ruby193-rubygem-rdoc-0:3.9.4-25.el6
  • ruby193-rubygem-ruby_parser-0:2.3.1-3.el6op
  • ruby193-rubygem-ruby_parser-doc-0:2.3.1-3.el6op
  • ruby193-rubygems-0:1.8.23-25.el6
  • ruby193-rubygems-devel-0:1.8.23-25.el6
  • rubygem-actionpack-1:3.0.13-4.el6op
  • rubygem-activemodel-0:3.0.13-3.el6op
  • rubygem-activemodel-doc-0:3.0.13-3.el6op
  • rubygem-activerecord-1:3.0.13-5.el6op
  • rubygem-bson-0:1.8.1-2.el6op
  • rubygem-mongo-0:1.8.1-2.el6op
  • rubygem-mongo-doc-0:1.8.1-2.el6op
  • rubygem-openshift-origin-auth-remote-user-0:1.0.5-1.el6op
  • rubygem-openshift-origin-console-0:1.0.10-1.el6op
  • rubygem-openshift-origin-console-doc-0:1.0.10-1.el6op
  • rubygem-openshift-origin-controller-0:1.0.12-1.el6op
  • rubygem-openshift-origin-node-0:1.0.11-1.el6op
  • rubygem-ruby_parser-0:2.0.4-6.el6op
  • rubygem-ruby_parser-doc-0:2.0.4-6.el6op