Vulnerabilities > CVE-2009-3009 - Cross-Site Scripting vulnerability in Rubyonrails Rails

047910
CVSS 4.3 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
PARTIAL
Availability impact
NONE
network
rubyonrails
CWE-79
nessus

Summary

Cross-site scripting (XSS) vulnerability in Ruby on Rails 2.x before 2.2.3, and 2.3.x before 2.3.4, allows remote attackers to inject arbitrary web script or HTML by placing malformed Unicode strings into a form helper.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • 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.
  • Embedding Scripts in Non-Script Elements
    This attack is a form of Cross-Site Scripting (XSS) where malicious scripts are embedded in elements that are not expected to host scripts such as image tags (<img>), comments in XML documents (< !-CDATA->), etc. These tags may not be subject to the same input validation, output validation, and other content filtering and checking routines, so this can create an opportunity for an attacker to tunnel through the application's elements and launch a XSS attack through other elements. As with all remote attacks, it is important to differentiate the ability to launch an attack (such as probing an internal network for unpatched servers) and the ability of the remote attacker to collect and interpret the output of said attack.
  • Embedding Scripts within Scripts
    An attack of this type exploits a programs' vulnerabilities that are brought on by allowing remote hosts to execute scripts. The attacker leverages this capability to execute scripts to execute his/her own script by embedding it within other scripts that the target software is likely to execute. The attacker must have the ability to inject script into script that is likely to be executed. If this is done, then the attacker can potentially launch a variety of probes and attacks against the web server's local environment, in many cases the so-called DMZ, back end resources the web server can communicate with, and other hosts. With the proliferation of intermediaries, such as Web App Firewalls, network devices, and even printers having JVMs and Web servers, there are many locales where an attacker can inject malicious scripts. Since this attack pattern defines scripts within scripts, there are likely privileges to execute said attack on the host. Of course, these attacks are not solely limited to the server side, client side scripts like Ajax and client side JavaScript can contain malicious scripts as well. In general all that is required is for there to be sufficient privileges to execute a script, but not protected against writing.
  • Cross-Site Scripting in Error Pages
    An attacker distributes a link (or possibly some other query structure) with a request to a third party web server that is malformed and also contains a block of exploit code in order to have the exploit become live code in the resulting error page. When the third party web server receives the crafted request and notes the error it then creates an error message that echoes the malformed message, including the exploit. Doing this converts the exploit portion of the message into to valid language elements that are executed by the viewing browser. When a victim executes the query provided by the attacker the infected error message error message is returned including the exploit code which then runs in the victim's browser. XSS can result in execution of code as well as data leakage (e.g. session cookies can be sent to the attacker). This type of attack is especially dangerous since the exploit appears to come from the third party web server, who the victim may trust and hence be more vulnerable to deception.
  • Cross-Site Scripting Using Alternate Syntax
    The attacker uses alternate forms of keywords or commands that result in the same action as the primary form but which may not be caught by filters. For example, many keywords are processed in a case insensitive manner. If the site's web filtering algorithm does not convert all tags into a consistent case before the comparison with forbidden keywords it is possible to bypass filters (e.g., incomplete black lists) by using an alternate case structure. For example, the "script" tag using the alternate forms of "Script" or "ScRiPt" may bypass filters where "script" is the only form tested. Other variants using different syntax representations are also possible as well as using pollution meta-characters or entities that are eventually ignored by the rendering engine. The attack can result in the execution of otherwise prohibited functionality.

Nessus

  • 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_2009-9922.NASL
    descriptionA vulnerability is found on Ruby on Rails in the escaping code for the form helpers, which also affects the rpms shipped in Fedora Project. Attackers who can inject deliberately malformed unicode strings into the form helpers can defeat the escaping checks and inject arbitrary HTML. This issue has been tagged as CVE-2009-3009. These new rpms 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-06-01
    modified2020-06-02
    plugin id41634
    published2009-09-28
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/41634
    titleFedora 11 : rubygem-actionpack-2.3.3-2.fc11 / rubygem-activesupport-2.3.3-2.fc11 (2009-9922)
    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 2009-9922.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(41634);
      script_version ("1.15");
      script_cvs_date("Date: 2019/08/02 13:32:30");
    
      script_cve_id("CVE-2009-3009");
      script_bugtraq_id(36278);
      script_xref(name:"FEDORA", value:"2009-9922");
    
      script_name(english:"Fedora 11 : rubygem-actionpack-2.3.3-2.fc11 / rubygem-activesupport-2.3.3-2.fc11 (2009-9922)");
      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:
    "A vulnerability is found on Ruby on Rails in the escaping code for the
    form helpers, which also affects the rpms shipped in Fedora Project.
    Attackers who can inject deliberately malformed unicode strings into
    the form helpers can defeat the escaping checks and inject arbitrary
    HTML. This issue has been tagged as CVE-2009-3009. These new rpms 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."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=520843"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2009-September/029461.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?9f4961de"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2009-September/029462.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?21f861ae"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Update the affected rubygem-actionpack and / or rubygem-activesupport
    packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/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_cwe_id(79);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      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-activesupport");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:11");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2009/09/25");
      script_set_attribute(attribute:"plugin_publication_date", value:"2009/09/28");
      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:"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:"^11([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 11.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:"FC11", reference:"rubygem-actionpack-2.3.3-2.fc11")) flag++;
    if (rpm_check(release:"FC11", reference:"rubygem-activesupport-2.3.3-2.fc11")) 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, "rubygem-actionpack / rubygem-activesupport");
    }
    
  • NASL familyMacOS X Local Security Checks
    NASL idMACOSX_10_6_3.NASL
    descriptionThe remote host is running a version of Mac OS X 10.6.x that is prior to 10.6.3. Mac OS X 10.6.3 contains security fixes for the following products : - AFP Server - Apache - CoreAudio - CoreMedia - CoreTypes - CUPS - DesktopServices - Disk Images - Directory Services - Dovecot - Event Monitor - FreeRADIUS - FTP Server - iChat Server - ImageIO - Image RAW - Libsystem - Mail - MySQL - OS Services - Password Server - PHP - Podcast Producer - Preferences - PS Normalizer - QuickTime - Ruby - Server Admin - SMB - Tomcat - Wiki Server - X11
    last seen2020-06-01
    modified2020-06-02
    plugin id45372
    published2010-03-29
    reporterThis script is Copyright (C) 2010-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/45372
    titleMac OS X 10.6.x < 10.6.3 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    if (!defined_func("bn_random")) exit(0);
    if (NASL_LEVEL < 3000) exit(0);
    
    
    include("compat.inc");
    
    
    if (description)
    {
      script_id(45372);
      script_version("1.31");
      script_cvs_date("Date: 2018/07/16 12:48:31");
    
      script_cve_id(
        "CVE-2003-0063",
        "CVE-2006-1329",
        "CVE-2008-4456",
        "CVE-2008-5515",
        "CVE-2008-7247",
        "CVE-2009-0033",
        "CVE-2009-0580",
        "CVE-2009-0689",
        "CVE-2009-0781",
        "CVE-2009-0783",
        "CVE-2009-1904",
        "CVE-2009-2042",
        "CVE-2009-2417",
        "CVE-2009-2422",
        "CVE-2009-2446",
        "CVE-2009-2693",
        "CVE-2009-2901",
        "CVE-2009-2902",
        "CVE-2009-2906",
        "CVE-2009-3009",
        "CVE-2009-3095",
        "CVE-2009-3557",
        "CVE-2009-3558",
        "CVE-2009-3559",
        "CVE-2009-4017",
        "CVE-2009-4019",
        "CVE-2009-4030",
        "CVE-2009-4214",
        "CVE-2010-0041",
        "CVE-2010-0042",
        "CVE-2010-0043",
        "CVE-2010-0057",
        "CVE-2010-0059",
        "CVE-2010-0060",
        "CVE-2010-0062",
        "CVE-2010-0063",
        "CVE-2010-0064",
        "CVE-2010-0065",
        "CVE-2010-0393",
        "CVE-2010-0497",
        "CVE-2010-0498",
        "CVE-2010-0500",
        "CVE-2010-0501",
        "CVE-2010-0502",
        "CVE-2010-0504",
        "CVE-2010-0505",
        "CVE-2010-0507",
        "CVE-2010-0508",
        "CVE-2010-0509",
        "CVE-2010-0510",
        "CVE-2010-0511",
        "CVE-2010-0512",
        "CVE-2010-0513",
        "CVE-2010-0514",
        "CVE-2010-0515",
        "CVE-2010-0516",
        "CVE-2010-0517",
        "CVE-2010-0518",
        "CVE-2010-0519",
        "CVE-2010-0520",
        "CVE-2010-0521",
        "CVE-2010-0524",
        "CVE-2010-0525",
        "CVE-2010-0526",
        "CVE-2010-0533",
        "CVE-2010-0534",
        "CVE-2010-0535",
        "CVE-2010-0537"
      );
      script_bugtraq_id(
        6940,
        17155,
        31486,
        35193,
        35196,
        35233,
        35263,
        35278,
        35416,
        35510,
        35579,
        35609,
        36032,
        36278,
        36554,
        36555,
        36573,
        37075,
        37142,
        37297,
        37942,
        37944,
        37945,
        38043,
        38524,
        38673,
        38676,
        38677,
        39151,
        39153,
        39157,
        39160,
        39161,
        39171,
        39172,
        39175,
        39194,
        39230,
        39231,
        39232,
        39234,
        39236,
        39252,
        39255,
        39256,
        39258,
        39264,
        39268,
        39273,
        39274,
        39278,
        39279,
        39281,
        39291
      );
    
      script_name(english:"Mac OS X 10.6.x < 10.6.3 Multiple Vulnerabilities");
      script_summary(english:"Check the version of Mac OS X");
    
      script_set_attribute(
        attribute:"synopsis",
        value:
    "The remote host is missing a Mac OS X update that fixes various
    security issues."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The remote host is running a version of Mac OS X 10.6.x that is prior
    to 10.6.3.
    
    Mac OS X 10.6.3 contains security fixes for the following products :
    
      - AFP Server
      - Apache
      - CoreAudio
      - CoreMedia
      - CoreTypes
      - CUPS
      - DesktopServices
      - Disk Images
      - Directory Services
      - Dovecot
      - Event Monitor
      - FreeRADIUS
      - FTP Server
      - iChat Server
      - ImageIO
      - Image RAW
      - Libsystem
      - Mail
      - MySQL
      - OS Services
      - Password Server
      - PHP
      - Podcast Producer
      - Preferences
      - PS Normalizer
      - QuickTime
      - Ruby
      - Server Admin
      - SMB
      - Tomcat
      - Wiki Server
      - X11"
      );
      script_set_attribute(
        attribute:"see_also", 
        value:"http://support.apple.com/kb/HT4077"
      );
      script_set_attribute(
        attribute:"see_also", 
        value:"http://lists.apple.com/archives/security-announce/2010/Mar/msg00001.html"
      );
      script_set_attribute(
        attribute:"see_also", 
        value:"http://www.securityfocus.com/advisories/19364"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Upgrade to Mac OS X 10.6.3 or later."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"exploit_framework_core", value:"true");
      script_set_attribute(attribute:"exploited_by_malware", value:"true");
      script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
      script_set_attribute(attribute:"canvas_package", value:'D2ExploitPack');
      script_cwe_id(20, 22, 59, 79, 119, 134, 189, 200, 264, 287, 310);
    script_set_attribute(attribute:"vuln_publication_date", value:"2010/03/29");
      script_set_attribute(attribute:"patch_publication_date", value:"2010/03/29");
      script_set_attribute(attribute:"plugin_publication_date", value:"2010/03/29");
      script_set_attribute(attribute:"plugin_type", value:"combined");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:apple:mac_os_x");
      script_end_attributes();
     
      script_category(ACT_GATHER_INFO);
      script_family(english:"MacOS X Local Security Checks");
     
      script_copyright(english:"This script is Copyright (C) 2010-2018 Tenable Network Security, Inc.");
     
      script_dependencies("ssh_get_info.nasl", "os_fingerprint.nasl");
    
     exit(0);
    }
    
    
    os = get_kb_item("Host/MacOSX/Version");
    if (!os)
    {
      os = get_kb_item("Host/OS");
      c = get_kb_item("Host/OS/Confidence");
      if ( isnull(os) || c <= 70 ) exit(0);
    }
    if (!os) exit(1, "The 'Host/OS' KB item is missing.");
    
    
    if (ereg(pattern:"Mac OS X 10\.6($|\.[0-2]([^0-9]|$))", string:os)) security_hole(0);
    else exit(0, "The host is not affected as it is running "+os+".");
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-1887.NASL
    descriptionBrian Mastenbrook discovered that rails, the MVC ruby based framework geared for web application development, is prone to cross-site scripting attacks via malformed strings in the form helper.
    last seen2020-06-01
    modified2020-06-02
    plugin id44752
    published2010-02-24
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/44752
    titleDebian DSA-1887-1 : rails - missing input sanitising
    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-1887. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(44752);
      script_version("1.10");
      script_cvs_date("Date: 2019/08/02 13:32:22");
    
      script_cve_id("CVE-2009-3009");
      script_bugtraq_id(36278);
      script_xref(name:"DSA", value:"1887");
    
      script_name(english:"Debian DSA-1887-1 : rails - missing input sanitising");
      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:
    "Brian Mastenbrook discovered that rails, the MVC ruby based framework
    geared for web application development, is prone to cross-site
    scripting attacks via malformed strings in the form helper."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=545063"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.debian.org/security/2009/dsa-1887"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the rails packages.
    
    For the oldstable distribution (etch) security support has been
    discontinued. It has been reported that rails in oldstable is unusable
    and several features that are affected by security issues are broken
    due to programming issues. It is highly recommended to upgrade to the
    version in stable (lenny).
    
    For the stable distribution (lenny), this problem has been fixed in
    version 2.1.0-7."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/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_cwe_id(79);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:rails");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:5.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2009/09/15");
      script_set_attribute(attribute:"plugin_publication_date", value:"2010/02/24");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2010-2019 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:"5.0", prefix:"rails", reference:"2.1.0-7")) 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 familyMacOS X Local Security Checks
    NASL idMACOSX_SECUPD2010-002.NASL
    descriptionThe remote host is running a version of Mac OS X 10.5 that does not have Security Update 2010-002 applied. This security update contains fixes for the following products : - AppKit - Application Firewall - AFP Server - Apache - ClamAV - CoreTypes - CUPS - curl - Cyrus IMAP - Cyrus SASL - Disk Images - Directory Services - Event Monitor - FreeRADIUS - FTP Server - iChat Server - Image RAW - Libsystem - Mail - Mailman - OS Services - Password Server - perl - PHP - PS Normalizer - Ruby - Server Admin - SMB - Tomcat - unzip - vim - Wiki Server - X11 - xar
    last seen2020-06-01
    modified2020-06-02
    plugin id45373
    published2010-03-29
    reporterThis script is Copyright (C) 2010-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/45373
    titleMac OS X Multiple Vulnerabilities (Security Update 2010-002)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    if (!defined_func("bn_random")) exit(0);
    if (NASL_LEVEL < 3000) exit(0);
    
    
    include("compat.inc");
    
    
    if (description)
    {
      script_id(45373);
      script_version("1.29");
      script_cvs_date("Date: 2018/07/16 12:48:31");
    
      script_cve_id(
        "CVE-2003-0063",
        "CVE-2006-1329",
        "CVE-2008-0564",
        "CVE-2008-0888",
        "CVE-2008-2712",
        "CVE-2008-4101",
        "CVE-2008-5302",
        "CVE-2008-5303",
        "CVE-2008-5515",
        "CVE-2009-0033",
        "CVE-2009-0037",
        "CVE-2009-0316",
        "CVE-2009-0580",
        "CVE-2009-0688",
        "CVE-2009-0689",
        "CVE-2009-0781",
        "CVE-2009-0783",
        "CVE-2009-1904",
        "CVE-2009-2042",
        "CVE-2009-2417",
        "CVE-2009-2422",
        "CVE-2009-2632",
        "CVE-2009-2693",
        "CVE-2009-2801",
        "CVE-2009-2901",
        "CVE-2009-2902",
        "CVE-2009-2906",
        "CVE-2009-3009",
        "CVE-2009-3095",
        "CVE-2009-3557",
        "CVE-2009-3558",
        "CVE-2009-3559",
        "CVE-2009-4142",
        "CVE-2009-4143",
        "CVE-2009-4214",
        "CVE-2010-0041",
        "CVE-2010-0042",
        "CVE-2010-0055",
        "CVE-2010-0056",
        "CVE-2010-0057",
        "CVE-2010-0058",
        "CVE-2010-0063",
        "CVE-2010-0065",
        "CVE-2010-0393",
        "CVE-2010-0497",
        "CVE-2010-0498",
        "CVE-2010-0500",
        "CVE-2010-0501",
        "CVE-2010-0502",
        "CVE-2010-0503",
        "CVE-2010-0504",
        "CVE-2010-0505",
        "CVE-2010-0506",
        "CVE-2010-0507",
        "CVE-2010-0508",
        "CVE-2010-0509",
        "CVE-2010-0510",
        "CVE-2010-0513",
        "CVE-2010-0521",
        "CVE-2010-0522",
        "CVE-2010-0523",
        "CVE-2010-0524",
        "CVE-2010-0525",
        "CVE-2010-0533"
      );
      script_bugtraq_id(
        6940,
        12767,
        17155,
        27630,
        28288,
        29715,
        30795,
        33447,
        33962,
        34961,
        35193,
        35196,
        35233,
        35263,
        35278,
        35416,
        35510,
        35579,
        36032,
        36278,
        36296,
        36377,
        36554,
        36555,
        36573,
        37142,
        37389,
        37390,
        37942,
        37944,
        37945,
        38524,
        38676,
        38677,
        39151,
        39156,
        39157,
        39169,
        39170,
        39171,
        39172,
        39175,
        39194,
        39231,
        39232,
        39234,
        39245,
        39252,
        39255,
        39256,
        39264,
        39268,
        39273,
        39274,
        39277,
        39279,
        39281,
        39289,
        39290,
        39292
      );
    
      script_name(english:"Mac OS X Multiple Vulnerabilities (Security Update 2010-002)");
      script_summary(english:"Check for the presence of Security Update 2010-002");
    
      script_set_attribute(
        attribute:"synopsis",
        value:
    "The remote host is missing a Mac OS X update that fixes various
    security issues."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The remote host is running a version of Mac OS X 10.5 that does not
    have Security Update 2010-002 applied.
    
    This security update contains fixes for the following products :
    
      - AppKit
      - Application Firewall
      - AFP Server
      - Apache
      - ClamAV
      - CoreTypes
      - CUPS
      - curl
      - Cyrus IMAP
      - Cyrus SASL
      - Disk Images
      - Directory Services
      - Event Monitor
      - FreeRADIUS
      - FTP Server
      - iChat Server
      - Image RAW
      - Libsystem
      - Mail
      - Mailman
      - OS Services
      - Password Server
      - perl
      - PHP
      - PS Normalizer
      - Ruby
      - Server Admin
      - SMB
      - Tomcat
      - unzip
      - vim
      - Wiki Server
      - X11
      - xar"
      );
      script_set_attribute(
        attribute:"see_also", 
        value:"http://support.apple.com/kb/HT4077"
      );
      script_set_attribute(
        attribute:"see_also", 
        value:"http://lists.apple.com/archives/security-announce/2010/Mar/msg00001.html"
      );
      script_set_attribute(
        attribute:"see_also", 
        value:"http://www.securityfocus.com/advisories/19364"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Install Security Update 2010-002 or later."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"exploit_framework_core", value:"true");
      script_set_attribute(attribute:"exploited_by_malware", value:"true");
      script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
      script_set_attribute(attribute:"canvas_package", value:'D2ExploitPack');
      script_cwe_id(20, 22, 79, 119, 189, 200, 264, 287, 310, 352, 362);
    script_set_attribute(attribute:"vuln_publication_date", value:"2010/03/29");
      script_set_attribute(attribute:"patch_publication_date", value:"2010/03/29");
      script_set_attribute(attribute:"plugin_publication_date", value:"2010/03/29");
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:apple:mac_os_x");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"MacOS X Local Security Checks");
      script_copyright(english:"This script is Copyright (C) 2010-2018 Tenable Network Security, Inc.");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/MacOSX/packages", "Host/uname");
    
      exit(0);
    }
    
    
    uname = get_kb_item("Host/uname");
    if (!uname) exit(1, "The 'Host/uname' KB item is missing.");
    
    pat = "^.+Darwin.* ([0-9]+\.[0-9.]+).*$";
    if (!ereg(pattern:pat, string:uname)) exit(1, "Can't identify the Darwin kernel version from the uname output ("+uname+").");
    
    
    darwin = ereg_replace(pattern:pat, replace:"\1", string:uname);
    if (ereg(pattern:"^9\.[0-8]\.", string:darwin))
    {
      packages = get_kb_item("Host/MacOSX/packages/boms");
      if (!packages) exit(1, "The 'Host/MacOSX/packages/boms' KB item is missing.");
    
      if (egrep(pattern:"^com\.apple\.pkg\.update\.security\.(2010\.00[2-9]|201[1-9]\.[0-9]+)(\.leopard)?\.bom", string:packages)) 
        exit(0, "The host has Security Update 2010-002 or later installed and therefore is not affected.");
      else 
        security_hole(0);
    }
    else exit(0, "The host is running Darwin kernel version "+darwin+" and therefore is not affected.");
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2009-9799.NASL
    descriptionA vulnerability is found on Ruby on Rails in the escaping code for the form helpers, which also affects the rpms shipped in Fedora Project. Attackers who can inject deliberately malformed unicode strings into the form helpers can defeat the escaping checks and inject arbitrary HTML. This issue has been tagged as CVE-2009-3009. These new rpms 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-06-01
    modified2020-06-02
    plugin id41612
    published2009-09-25
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/41612
    titleFedora 10 : rubygem-actionpack-2.1.1-3.fc10 / rubygem-activesupport-2.1.1-2.fc10 (2009-9799)
    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 2009-9799.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(41612);
      script_version ("1.14");
      script_cvs_date("Date: 2019/08/02 13:32:30");
    
      script_cve_id("CVE-2009-3009");
      script_bugtraq_id(36278);
      script_xref(name:"FEDORA", value:"2009-9799");
    
      script_name(english:"Fedora 10 : rubygem-actionpack-2.1.1-3.fc10 / rubygem-activesupport-2.1.1-2.fc10 (2009-9799)");
      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:
    "A vulnerability is found on Ruby on Rails in the escaping code for the
    form helpers, which also affects the rpms shipped in Fedora Project.
    Attackers who can inject deliberately malformed unicode strings into
    the form helpers can defeat the escaping checks and inject arbitrary
    HTML. This issue has been tagged as CVE-2009-3009. These new rpms 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."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=520843"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2009-September/029356.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?d939c36a"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2009-September/029357.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?4b854cfe"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Update the affected rubygem-actionpack and / or rubygem-activesupport
    packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/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_cwe_id(79);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      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-activesupport");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:10");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2009/09/24");
      script_set_attribute(attribute:"plugin_publication_date", value:"2009/09/25");
      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:"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:"^10([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 10.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:"FC10", reference:"rubygem-actionpack-2.1.1-3.fc10")) flag++;
    if (rpm_check(release:"FC10", reference:"rubygem-activesupport-2.1.1-2.fc10")) 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, "rubygem-actionpack / rubygem-activesupport");
    }
    
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_1_RUBYGEM-ACTIONPACK-2_1-090917.NASL
    descriptionThis update improves the escaping in the helper code of Ruby on Rails to protect against XSS attacks (CVE-2009-3009) and an information leak (CVE-2009-3086).
    last seen2020-06-01
    modified2020-06-02
    plugin id42204
    published2009-10-22
    reporterThis script is Copyright (C) 2009-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/42204
    titleopenSUSE Security Update : rubygem-actionpack-2_1 (rubygem-actionpack-2_1-1320)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_1_RUBYGEM-ACTIVESUPPORT-2_1-090917.NASL
    descriptionThis update improves the escaping in the helper code of Ruby on Rails to protect against XSS attacks (CVE-2009-3009) and an information leak (CVE-2009-3086).
    last seen2020-06-01
    modified2020-06-02
    plugin id42205
    published2009-10-22
    reporterThis script is Copyright (C) 2009-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/42205
    titleopenSUSE Security Update : rubygem-activesupport-2_1 (rubygem-activesupport-2_1-1321)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2009-10484.NASL
    description - Fixes CVE-2009-3009 - Downgrade to Rails 2.3.2 to avoid update issues for existing applications 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 id42128
    published2009-10-15
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/42128
    titleFedora 11 : rubygem-actionmailer-2.3.2-3.fc11 / rubygem-actionpack-2.3.2-2.fc11 / etc (2009-10484)

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 36278 CVE(CAN) ID: CVE-2009-3009 Ruby on Rails是一个新的Web应用程序框架,构建在Ruby语言之上。 Ruby on Rails的表单帮助程序中的转义代码存在跨站脚本漏洞,远程攻击者可以通过向其提交恶意的Unicode字符串绕过转义检查,在用户浏览器会话中注入并执行任意HTML代码。 David Heinemeier Hansson Ruby on Rails 2.x 厂商补丁: David Heinemeier Hansson ------------------------ 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: http://weblog.rubyonrails.org/assets/2009/9/4/2-0-CVE-2009-3009.patch http://weblog.rubyonrails.org/assets/2009/9/4/2-1-CVE-2009-3009.patch http://weblog.rubyonrails.org/assets/2009/9/4/2-2-CVE-2009-3009.patch http://weblog.rubyonrails.org/assets/2009/9/4/2-3-CVE-2009-3009.patch
idSSV:12235
last seen2017-11-19
modified2009-09-08
published2009-09-08
reporterRoot
titleRuby on Rails表单帮助程序Unicode字符串处理跨站脚本漏洞