Vulnerabilities > CVE-2008-4094 - SQL Injection vulnerability in Rubyonrails Rails and Ruby ON Rails

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
rubyonrails
CWE-89
nessus

Summary

Multiple SQL injection vulnerabilities in Ruby on Rails before 2.1.1 allow remote attackers to execute arbitrary SQL commands via the (1) :limit and (2) :offset parameters, related to ActiveRecord, ActiveSupport, ActiveResource, ActionPack, and ActionMailer.

Vulnerable Configurations

Part Description Count
Application
Rubyonrails
92

Common Attack Pattern Enumeration and Classification (CAPEC)

  • 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.
  • Object Relational Mapping Injection
    An attacker leverages a weakness present in the database access layer code generated with an Object Relational Mapping (ORM) tool or a weakness in the way that a developer used a persistence framework to inject his or her own SQL commands to be executed against the underlying database. The attack here is similar to plain SQL injection, except that the application does not use JDBC to directly talk to the database, but instead it uses a data access layer generated by an ORM tool or framework (e.g. Hibernate). While most of the time code generated by an ORM tool contains safe access methods that are immune to SQL injection, sometimes either due to some weakness in the generated code or due to the fact that the developer failed to use the generated access methods properly, SQL injection is still possible.
  • SQL Injection through SOAP Parameter Tampering
    An attacker modifies the parameters of the SOAP message that is sent from the service consumer to the service provider to initiate a SQL injection attack. On the service provider side, the SOAP message is parsed and parameters are not properly validated before being used to access a database in a way that does not use parameter binding, thus enabling the attacker to control the structure of the executed SQL query. This pattern describes a SQL injection attack with the delivery mechanism being a SOAP message.
  • Expanding Control over the Operating System from the Database
    An attacker is able to leverage access gained to the database to read / write data to the file system, compromise the operating system, create a tunnel for accessing the host machine, and use this access to potentially attack other machines on the same network as the database machine. Traditionally SQL injections attacks are viewed as a way to gain unauthorized read access to the data stored in the database, modify the data in the database, delete the data, etc. However, almost every data base management system (DBMS) system includes facilities that if compromised allow an attacker complete access to the file system, operating system, and full access to the host running the database. The attacker can then use this privileged access to launch subsequent attacks. These facilities include dropping into a command shell, creating user defined functions that can call system level libraries present on the host machine, stored procedures, etc.
  • SQL Injection
    This attack exploits target software that constructs SQL statements based on user input. An attacker crafts input strings so that when the target software constructs SQL statements based on the input, the resulting SQL statement performs actions other than those the application intended. SQL Injection results from failure of the application to appropriately validate input. When specially crafted user-controlled input consisting of SQL syntax is used without proper validation as part of SQL queries, it is possible to glean information from the database in ways not envisaged during application design. Depending upon the database and the design of the application, it may also be possible to leverage injection to have the database execute system-related commands of the attackers' choice. SQL Injection enables an attacker to talk directly to the database, thus bypassing the application completely. Successful injection can cause information disclosure as well as ability to add or modify data in the database. In order to successfully inject SQL and retrieve information from a database, an attacker:

Nessus

  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_0_RUBYGEM-ACTIVERECORD-081122.NASL
    descriptionMissing sanity checks of the :limit and :offset parameters in SQL queries could potentially be exploited to conduct SQL inection attacks (CVE-2008-4094).
    last seen2020-06-01
    modified2020-06-02
    plugin id40124
    published2009-07-21
    reporterThis script is Copyright (C) 2009-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/40124
    titleopenSUSE Security Update : rubygem-activerecord (rubygem-activerecord-328)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from openSUSE Security Update rubygem-activerecord-328.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(40124);
      script_version("1.10");
      script_cvs_date("Date: 2019/10/25 13:36:31");
    
      script_cve_id("CVE-2008-4094");
    
      script_name(english:"openSUSE Security Update : rubygem-activerecord (rubygem-activerecord-328)");
      script_summary(english:"Check for the rubygem-activerecord-328 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Missing sanity checks of the :limit and :offset parameters in SQL
    queries could potentially be exploited to conduct SQL inection attacks
    (CVE-2008-4094)."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=426198"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected rubygem-activerecord package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_cwe_id(89);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:rubygem-activerecord");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:11.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2008/11/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2009/07/21");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2009-2019 Tenable Network Security, Inc.");
      script_family(english:"SuSE Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/SuSE/release", "Host/SuSE/rpm-list", "Host/cpu");
    
      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/SuSE/release");
    if (isnull(release) || release =~ "^(SLED|SLES)") audit(AUDIT_OS_NOT, "openSUSE");
    if (release !~ "^(SUSE11\.0)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "11.0", release);
    if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    ourarch = get_kb_item("Host/cpu");
    if (!ourarch) audit(AUDIT_UNKNOWN_ARCH);
    if (ourarch !~ "^(i586|i686|x86_64)$") audit(AUDIT_ARCH_NOT, "i586 / i686 / x86_64", ourarch);
    
    flag = 0;
    
    if ( rpm_check(release:"SUSE11.0", reference:"rubygem-activerecord-1.15.5-71.2") ) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "rubygem-activerecord");
    }
    
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200912-02.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200912-02 (Ruby on Rails: Multiple vulnerabilities) The following vulnerabilities were discovered: sameer reported that lib/action_controller/cgi_process.rb removes the :cookie_only attribute from the default session options (CVE-2007-6077), due to an incomplete fix for CVE-2007-5380 (GLSA 200711-17). Tobias Schlottke reported that the :limit and :offset parameters of ActiveRecord::Base.find() are not properly sanitized before being processed (CVE-2008-4094). Steve from Coderrr reported that the CRSF protection in protect_from_forgery() does not parse the text/plain MIME format (CVE-2008-7248). Nate reported a documentation error that leads to the assumption that a block returning nil passed to authenticate_or_request_with_http_digest() would deny access to the requested resource (CVE-2009-2422). Brian Mastenbrook reported an input sanitation flaw, related to multibyte characters (CVE-2009-3009). Gabe da Silveira reported an input sanitation flaw in the strip_tags() function (CVE-2009-4214). Coda Hale reported an information disclosure vulnerability related to HMAC digests (CVE-2009-3086). Impact : A remote attacker could send specially crafted requests to a vulnerable application, possibly leading to the execution of arbitrary SQL statements or a circumvention of access control. A remote attacker could also conduct session fixation attacks to hijack a user
    last seen2020-06-01
    modified2020-06-02
    plugin id43378
    published2009-12-22
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/43378
    titleGLSA-200912-02 : Ruby on Rails: Multiple vulnerabilities
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Gentoo Linux Security Advisory GLSA 200912-02.
    #
    # The advisory text is Copyright (C) 2001-2018 Gentoo Foundation, Inc.
    # and licensed under the Creative Commons - Attribution / Share Alike 
    # license. See http://creativecommons.org/licenses/by-sa/3.0/
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(43378);
      script_version("1.17");
      script_cvs_date("Date: 2019/08/02 13:32:45");
    
      script_cve_id("CVE-2007-5380", "CVE-2007-6077", "CVE-2008-4094", "CVE-2008-7248", "CVE-2009-2422", "CVE-2009-3009", "CVE-2009-3086", "CVE-2009-4214");
      script_bugtraq_id(31176, 36278, 37142);
      script_xref(name:"GLSA", value:"200912-02");
    
      script_name(english:"GLSA-200912-02 : Ruby on Rails: Multiple vulnerabilities");
      script_summary(english:"Checks for updated package(s) in /var/db/pkg");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Gentoo host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The remote host is affected by the vulnerability described in GLSA-200912-02
    (Ruby on Rails: Multiple vulnerabilities)
    
        The following vulnerabilities were discovered:
        sameer
        reported that lib/action_controller/cgi_process.rb removes the
        :cookie_only attribute from the default session options
        (CVE-2007-6077), due to an incomplete fix for CVE-2007-5380 (GLSA
        200711-17).
        Tobias Schlottke reported that the :limit and
        :offset parameters of ActiveRecord::Base.find() are not properly
        sanitized before being processed (CVE-2008-4094).
        Steve from
        Coderrr reported that the CRSF protection in protect_from_forgery()
        does not parse the text/plain MIME format (CVE-2008-7248).
        Nate reported a documentation error that leads to the assumption
        that a block returning nil passed to
        authenticate_or_request_with_http_digest() would deny access to the
        requested resource (CVE-2009-2422).
        Brian Mastenbrook reported
        an input sanitation flaw, related to multibyte characters
        (CVE-2009-3009).
        Gabe da Silveira reported an input sanitation
        flaw in the strip_tags() function (CVE-2009-4214).
        Coda Hale
        reported an information disclosure vulnerability related to HMAC
        digests (CVE-2009-3086).
      
    Impact :
    
        A remote attacker could send specially crafted requests to a vulnerable
        application, possibly leading to the execution of arbitrary SQL
        statements or a circumvention of access control. A remote attacker
        could also conduct session fixation attacks to hijack a user's session
        or bypass the CSRF protection mechanism, or furthermore conduct
        Cross-Site Scripting attacks or forge a digest via multiple attempts.
      
    Workaround :
    
        There is no known workaround at this time."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/200711-17"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/200912-02"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All Ruby on Rails 2.3.x users should upgrade to the latest version:
        # emerge --sync
        # emerge --ask --oneshot --verbose '>=dev-ruby/rails-2.3.5'
        All Ruby on Rails 2.2.x users should upgrade to the latest version:
        # emerge --sync
        # emerge --ask --oneshot --verbose '=dev-ruby/rails-2.2.3-r1'
        NOTE: All applications using Ruby on Rails should also be configured to
        use the latest version available by running 'rake rails:update' inside
        the application directory."
      );
      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:POC/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_cwe_id(20, 79, 89, 200, 287, 362);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:rails");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2009/12/20");
      script_set_attribute(attribute:"plugin_publication_date", value:"2009/12/22");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Gentoo Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Gentoo/release", "Host/Gentoo/qpkg-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("qpkg.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Gentoo/release")) audit(AUDIT_OS_NOT, "Gentoo");
    if (!get_kb_item("Host/Gentoo/qpkg-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (qpkg_check(package:"dev-ruby/rails", unaffected:make_list("ge 2.3.5", "rge 2.2.3-r1"), vulnerable:make_list("lt 2.2.2"))) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:qpkg_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = qpkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "Ruby on Rails");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2008-8282.NASL
    descriptionFixes CVE-2008-4094 (SQL injection in limit and offset clauses) 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-06-01
    modified2020-06-02
    plugin id34423
    published2008-10-16
    reporterThis script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/34423
    titleFedora 8 : rubygem-actionmailer-2.1.1-1.fc8 / rubygem-actionpack-2.1.1-1.fc8 / etc (2008-8282)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Fedora Security Advisory 2008-8282.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(34423);
      script_version ("1.15");
      script_cvs_date("Date: 2019/08/02 13:32:28");
    
      script_cve_id("CVE-2008-4094");
      script_xref(name:"FEDORA", value:"2008-8282");
    
      script_name(english:"Fedora 8 : rubygem-actionmailer-2.1.1-1.fc8 / rubygem-actionpack-2.1.1-1.fc8 / etc (2008-8282)");
      script_summary(english:"Checks rpm output for the updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Fedora host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Fixes CVE-2008-4094 (SQL injection in limit and offset clauses)
    
    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."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=462302"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=462303"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=462304"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=462306"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=462307"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=462308"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-October/015262.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?be77cdc8"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-October/015263.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?981c1243"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-October/015342.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?b08001e8"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-October/015343.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?674926fa"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-October/015344.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?071e8ce4"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-October/015345.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?b8cd099b"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-October/015346.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?7b6547de"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_cwe_id(89);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygem-actionmailer");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygem-actionpack");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygem-activerecord");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygem-activeresource");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygem-activesupport");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygem-rails");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygems");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:8");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2008/09/30");
      script_set_attribute(attribute:"patch_publication_date", value:"2008/10/16");
      script_set_attribute(attribute:"plugin_publication_date", value:"2008/10/16");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Fedora Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora");
    os_ver = eregmatch(pattern: "Fedora.*release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora");
    os_ver = os_ver[1];
    if (! ereg(pattern:"^8([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 8.x", "Fedora " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu);
    
    flag = 0;
    if (rpm_check(release:"FC8", reference:"rubygem-actionmailer-2.1.1-1.fc8")) flag++;
    if (rpm_check(release:"FC8", reference:"rubygem-actionpack-2.1.1-1.fc8")) flag++;
    if (rpm_check(release:"FC8", reference:"rubygem-activerecord-2.1.1-1.fc8")) flag++;
    if (rpm_check(release:"FC8", reference:"rubygem-activeresource-2.1.1-1.fc8")) flag++;
    if (rpm_check(release:"FC8", reference:"rubygem-activesupport-2.1.1-1.fc8")) flag++;
    if (rpm_check(release:"FC8", reference:"rubygem-rails-2.1.1-2.fc8")) flag++;
    if (rpm_check(release:"FC8", reference:"rubygems-1.2.0-2.fc8")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "rubygem-actionmailer / rubygem-actionpack / rubygem-activerecord / etc");
    }
    
  • NASL familySuSE Local Security Checks
    NASL idSUSE_RUBYGEM-ACTIVERECORD-5817.NASL
    descriptionMissing sanity checks of the :limit and :offset parameters in SQL queries could potentially be exploited to conduct SQL inection attacks (CVE-2008-4094).
    last seen2020-06-01
    modified2020-06-02
    plugin id34988
    published2008-12-01
    reporterThis script is Copyright (C) 2008-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/34988
    titleopenSUSE 10 Security Update : rubygem-activerecord (rubygem-activerecord-5817)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from openSUSE Security Update rubygem-activerecord-5817.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(34988);
      script_version ("1.8");
      script_cvs_date("Date: 2019/10/25 13:36:33");
    
      script_cve_id("CVE-2008-4094");
    
      script_name(english:"openSUSE 10 Security Update : rubygem-activerecord (rubygem-activerecord-5817)");
      script_summary(english:"Check for the rubygem-activerecord-5817 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Missing sanity checks of the :limit and :offset parameters in SQL
    queries could potentially be exploited to conduct SQL inection attacks
    (CVE-2008-4094)."
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected rubygem-activerecord package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_cwe_id(89);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:rubygem-activerecord");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:10.2");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:10.3");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2008/11/21");
      script_set_attribute(attribute:"plugin_publication_date", value:"2008/12/01");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2008-2019 Tenable Network Security, Inc.");
      script_family(english:"SuSE Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/SuSE/release", "Host/SuSE/rpm-list", "Host/cpu");
    
      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/SuSE/release");
    if (isnull(release) || release =~ "^(SLED|SLES)") audit(AUDIT_OS_NOT, "openSUSE");
    if (release !~ "^(SUSE10\.2|SUSE10\.3)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "10.2 / 10.3", release);
    if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    ourarch = get_kb_item("Host/cpu");
    if (!ourarch) audit(AUDIT_UNKNOWN_ARCH);
    if (ourarch !~ "^(i586|i686|x86_64)$") audit(AUDIT_ARCH_NOT, "i586 / i686 / x86_64", ourarch);
    
    flag = 0;
    
    if ( rpm_check(release:"SUSE10.2", reference:"rubygem-activerecord-1.14.4-18") ) flag++;
    if ( rpm_check(release:"SUSE10.3", reference:"rubygem-activerecord-1.15.3-20.2") ) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "rubygem-activerecord");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2008-8322.NASL
    descriptionFixes CVE-2008-4094 (SQL injection in limit and offset clauses) 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-06-01
    modified2020-06-02
    plugin id34305
    published2008-09-29
    reporterThis script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/34305
    titleFedora 9 : rubygem-actionmailer-2.1.1-1.fc9 / rubygem-actionpack-2.1.1-1.fc9 / etc (2008-8322)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Fedora Security Advisory 2008-8322.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(34305);
      script_version ("1.17");
      script_cvs_date("Date: 2019/08/02 13:32:28");
    
      script_cve_id("CVE-2008-4094");
      script_bugtraq_id(31176);
      script_xref(name:"FEDORA", value:"2008-8322");
    
      script_name(english:"Fedora 9 : rubygem-actionmailer-2.1.1-1.fc9 / rubygem-actionpack-2.1.1-1.fc9 / etc (2008-8322)");
      script_summary(english:"Checks rpm output for the updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Fedora host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Fixes CVE-2008-4094 (SQL injection in limit and offset clauses)
    
    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."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=462302"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=462303"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=462304"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=462306"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=462307"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=462308"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-September/014847.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?3c28d96e"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-September/014848.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?26a86463"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-September/014849.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?284f68c5"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-September/014850.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?96225701"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-September/014851.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?89653b26"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-September/014852.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?b19a2329"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2008-September/014853.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?d43f96d3"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected 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_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
      script_cwe_id(89);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygem-actionmailer");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygem-actionpack");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygem-activerecord");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygem-activeresource");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygem-activesupport");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygem-rails");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rubygems");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:9");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2008/09/30");
      script_set_attribute(attribute:"patch_publication_date", value:"2008/09/27");
      script_set_attribute(attribute:"plugin_publication_date", value:"2008/09/29");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Fedora Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora");
    os_ver = eregmatch(pattern: "Fedora.*release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora");
    os_ver = os_ver[1];
    if (! ereg(pattern:"^9([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 9.x", "Fedora " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu);
    
    flag = 0;
    if (rpm_check(release:"FC9", reference:"rubygem-actionmailer-2.1.1-1.fc9")) flag++;
    if (rpm_check(release:"FC9", reference:"rubygem-actionpack-2.1.1-1.fc9")) flag++;
    if (rpm_check(release:"FC9", reference:"rubygem-activerecord-2.1.1-1.fc9")) flag++;
    if (rpm_check(release:"FC9", reference:"rubygem-activeresource-2.1.1-1.fc9")) flag++;
    if (rpm_check(release:"FC9", reference:"rubygem-activesupport-2.1.1-1.fc9")) flag++;
    if (rpm_check(release:"FC9", reference:"rubygem-rails-2.1.1-2.fc9")) flag++;
    if (rpm_check(release:"FC9", reference:"rubygems-1.2.0-2.fc9")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "rubygem-actionmailer / rubygem-actionpack / rubygem-activerecord / etc");
    }
    
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_8E8B8B947F1D11DDA66A0019666436C2.NASL
    descriptionJonathan Weiss reports, that it is possible to perform a SQL injection in Rails applications via not correctly sanitized :limit and :offset parameters. It is possible to change arbitrary values in affected tables or gain access to the sensitive data.
    last seen2020-06-01
    modified2020-06-02
    plugin id36000
    published2009-03-24
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/36000
    titleFreeBSD : rubygem-rails -- SQL injection vulnerability (8e8b8b94-7f1d-11dd-a66a-0019666436c2)