Vulnerabilities > CVE-2011-4064 - Cross-Site Scripting vulnerability in PHPmyadmin

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

Summary

Cross-site scripting (XSS) vulnerability in the setup interface in phpMyAdmin 3.4.x before 3.4.6 allows remote attackers to inject arbitrary web script or HTML via a crafted value.

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 familyFedora Local Security Checks
    NASL idFEDORA_2011-15460.NASL
    descriptionChanges for 3.4.7.0 (2011-10-23); - [interface] Links in navigation when $cfg[
    last seen2020-06-01
    modified2020-06-02
    plugin id56797
    published2011-11-14
    reporterThis script is Copyright (C) 2011-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/56797
    titleFedora 16 : phpMyAdmin-3.4.7-1.fc16 (2011-15460)
    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 2011-15460.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(56797);
      script_version("1.8");
      script_cvs_date("Date: 2019/08/02 13:32:34");
    
      script_cve_id("CVE-2011-3646", "CVE-2011-4064");
      script_xref(name:"FEDORA", value:"2011-15460");
    
      script_name(english:"Fedora 16 : phpMyAdmin-3.4.7-1.fc16 (2011-15460)");
      script_summary(english:"Checks rpm output for the updated package.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Fedora host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Changes for 3.4.7.0 (2011-10-23);
    
      - [interface] Links in navigation when
        $cfg['MainPageIconic'] =3D false
    
        - [interface] Inline edit shows dropdowns even after
          closing
    
        - [view] View renaming did not work
    
        - [navi] Wrong icon for view (MySQL 5.5)
    
        - [doc] Missing documentation section
    
        - [pdf] Broken PDF file when exporting database to PDF
    
        - [core] Allow to set language in URL
    
        - [doc] Fix links to PHP documentation
    
        - [export] Export to bzip2 is not working
    
    Changes for 3.4.6.0 (2011-10-16) :
    
      - [patch] InnoDB comment display with tooltips/aliases
    
        - [navi] Edit SQL statement after error
    
        - [interface] Collation not displayed for long enum
          fields
    
        - [export] Config for export compression not used
    
        - [privileges] DB-specific privileges won't submit
    
        - [config] Configuration storage incorrect suggested
          table name
    
        - [interface] Cannot execute saved query
    
        - [display] Full text button unchecks results display
          options
    
        - [display] Broken binary column when 'Show binary
          contents' is not set
    
        - [core] Call to undefined function PMA_isSuperuser()
    
        - [interface] Display options link missing after search
    
        - [core] CSP policy causing designer JS buttons to fail
    
        - [relation] Relations/constraints are dropped/created
          on every change
    
        - [display] Delete records from last page breaks search
    
        - [schema] PMA_User_Schema::processUserChoice() is
          broken
    
        - [core] External link fails in 3.4.5
    
        - [display] CharTextareaRows is not respected
    
        - [synchronize] Extraneous db choices
    
        - [security] Fixed local path disclosure vulnerability,
          see PMASA-2011-15=
          (http://www.phpmyadmin.net/home_page/security/PMASA-20
          11-15.php)
    
      - [security] Fixed XSS in setup (host/verbose parameter),
        see PMASA-2011-= 16
        (http://www.phpmyadmin.net/home_page/security/PMASA-2011
        -16.php)
        --------------------------------------------------------
        -------------------=
    
    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."
      );
      # http://www.phpmyadmin.net/home_page/security/PMASA-2011-15.php
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.phpmyadmin.net/security/PMASA-2011-15/"
      );
      # http://www.phpmyadmin.net/home_page/security/PMASA-2011-16.php
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.phpmyadmin.net/security/PMASA-2011-16/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=746880"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2011-November/069235.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?83c637df"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected phpMyAdmin package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:phpMyAdmin");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:16");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2011/11/05");
      script_set_attribute(attribute:"plugin_publication_date", value:"2011/11/14");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2011-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:"^16([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 16.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:"FC16", reference:"phpMyAdmin-3.4.7-1.fc16")) 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, "phpMyAdmin");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2011-15472.NASL
    descriptionChanges for 3.4.7.0 (2011-10-23); - [interface] Links in navigation when $cfg[
    last seen2020-06-01
    modified2020-06-02
    plugin id56799
    published2011-11-14
    reporterThis script is Copyright (C) 2011-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/56799
    titleFedora 14 : phpMyAdmin-3.4.7-1.fc14 (2011-15472)
    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 2011-15472.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(56799);
      script_version("1.9");
      script_cvs_date("Date: 2019/08/02 13:32:34");
    
      script_cve_id("CVE-2011-3646", "CVE-2011-4064");
      script_xref(name:"FEDORA", value:"2011-15472");
    
      script_name(english:"Fedora 14 : phpMyAdmin-3.4.7-1.fc14 (2011-15472)");
      script_summary(english:"Checks rpm output for the updated package.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Fedora host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Changes for 3.4.7.0 (2011-10-23);
    
      - [interface] Links in navigation when
        $cfg['MainPageIconic'] =3D false
    
        - [interface] Inline edit shows dropdowns even after
          closing
    
        - [view] View renaming did not work
    
        - [navi] Wrong icon for view (MySQL 5.5)
    
        - [doc] Missing documentation section
    
        - [pdf] Broken PDF file when exporting database to PDF
    
        - [core] Allow to set language in URL
    
        - [doc] Fix links to PHP documentation
    
        - [export] Export to bzip2 is not working
    
    Changes for 3.4.6.0 (2011-10-16) :
    
      - [patch] InnoDB comment display with tooltips/aliases
    
        - [navi] Edit SQL statement after error
    
        - [interface] Collation not displayed for long enum
          fields
    
        - [export] Config for export compression not used
    
        - [privileges] DB-specific privileges won't submit
    
        - [config] Configuration storage incorrect suggested
          table name
    
        - [interface] Cannot execute saved query
    
        - [display] Full text button unchecks results display
          options
    
        - [display] Broken binary column when 'Show binary
          contents' is not set
    
        - [core] Call to undefined function PMA_isSuperuser()
    
        - [interface] Display options link missing after search
    
        - [core] CSP policy causing designer JS buttons to fail
    
        - [relation] Relations/constraints are dropped/created
          on every change
    
        - [display] Delete records from last page breaks search
    
        - [schema] PMA_User_Schema::processUserChoice() is
          broken
    
        - [core] External link fails in 3.4.5
    
        - [display] CharTextareaRows is not respected
    
        - [synchronize] Extraneous db choices
    
        - [security] Fixed local path disclosure vulnerability,
          see PMASA-2011-15=
          (http://www.phpmyadmin.net/home_page/security/PMASA-20
          11-15.php)
    
      - [security] Fixed XSS in setup (host/verbose parameter),
        see PMASA-2011-= 16
        (http://www.phpmyadmin.net/home_page/security/PMASA-2011
        -16.php)
        --------------------------------------------------------
        -------------------=
    
    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."
      );
      # http://www.phpmyadmin.net/home_page/security/PMASA-2011-15.php
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.phpmyadmin.net/security/PMASA-2011-15/"
      );
      # http://www.phpmyadmin.net/home_page/security/PMASA-2011-16.php
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.phpmyadmin.net/security/PMASA-2011-16/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=746880"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2011-November/069234.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?3f737dee"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected phpMyAdmin package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:phpMyAdmin");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:14");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2011/11/05");
      script_set_attribute(attribute:"plugin_publication_date", value:"2011/11/14");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2011-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:"^14([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 14.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:"FC14", reference:"phpMyAdmin-3.4.7-1.fc14")) 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, "phpMyAdmin");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2011-15469.NASL
    descriptionChanges for 3.4.7.0 (2011-10-23); - [interface] Links in navigation when $cfg[
    last seen2020-06-01
    modified2020-06-02
    plugin id56798
    published2011-11-14
    reporterThis script is Copyright (C) 2011-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/56798
    titleFedora 15 : phpMyAdmin-3.4.7-1.fc15 (2011-15469)
    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 2011-15469.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(56798);
      script_version("1.8");
      script_cvs_date("Date: 2019/08/02 13:32:34");
    
      script_cve_id("CVE-2011-3646", "CVE-2011-4064");
      script_xref(name:"FEDORA", value:"2011-15469");
    
      script_name(english:"Fedora 15 : phpMyAdmin-3.4.7-1.fc15 (2011-15469)");
      script_summary(english:"Checks rpm output for the updated package.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Fedora host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Changes for 3.4.7.0 (2011-10-23);
    
      - [interface] Links in navigation when
        $cfg['MainPageIconic'] =3D false
    
        - [interface] Inline edit shows dropdowns even after
          closing
    
        - [view] View renaming did not work
    
        - [navi] Wrong icon for view (MySQL 5.5)
    
        - [doc] Missing documentation section
    
        - [pdf] Broken PDF file when exporting database to PDF
    
        - [core] Allow to set language in URL
    
        - [doc] Fix links to PHP documentation
    
        - [export] Export to bzip2 is not working
    
    Changes for 3.4.6.0 (2011-10-16) :
    
      - [patch] InnoDB comment display with tooltips/aliases
    
        - [navi] Edit SQL statement after error
    
        - [interface] Collation not displayed for long enum
          fields
    
        - [export] Config for export compression not used
    
        - [privileges] DB-specific privileges won't submit
    
        - [config] Configuration storage incorrect suggested
          table name
    
        - [interface] Cannot execute saved query
    
        - [display] Full text button unchecks results display
          options
    
        - [display] Broken binary column when 'Show binary
          contents' is not set
    
        - [core] Call to undefined function PMA_isSuperuser()
    
        - [interface] Display options link missing after search
    
        - [core] CSP policy causing designer JS buttons to fail
    
        - [relation] Relations/constraints are dropped/created
          on every change
    
        - [display] Delete records from last page breaks search
    
        - [schema] PMA_User_Schema::processUserChoice() is
          broken
    
        - [core] External link fails in 3.4.5
    
        - [display] CharTextareaRows is not respected
    
        - [synchronize] Extraneous db choices
    
        - [security] Fixed local path disclosure vulnerability,
          see PMASA-2011-15=
          (http://www.phpmyadmin.net/home_page/security/PMASA-20
          11-15.php)
    
      - [security] Fixed XSS in setup (host/verbose parameter),
        see PMASA-2011-= 16
        (http://www.phpmyadmin.net/home_page/security/PMASA-2011
        -16.php)
        --------------------------------------------------------
        -------------------=
    
    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."
      );
      # http://www.phpmyadmin.net/home_page/security/PMASA-2011-15.php
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.phpmyadmin.net/security/PMASA-2011-15/"
      );
      # http://www.phpmyadmin.net/home_page/security/PMASA-2011-16.php
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.phpmyadmin.net/security/PMASA-2011-16/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.redhat.com/show_bug.cgi?id=746880"
      );
      # https://lists.fedoraproject.org/pipermail/package-announce/2011-November/069237.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?1e5fda7b"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected phpMyAdmin package."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:phpMyAdmin");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:15");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2011/11/05");
      script_set_attribute(attribute:"plugin_publication_date", value:"2011/11/14");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2011-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:"^15([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 15.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:"FC15", reference:"phpMyAdmin-3.4.7-1.fc15")) 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, "phpMyAdmin");
    }
    
  • NASL familyCGI abuses : XSS
    NASL idPHPMYADMIN_PMASA_2011_16.NASL
    descriptionThe version of phpMyAdmin hosted on the remote server is 3.4.x prior to 3.4.6 and is affected by a cross-site scripting vulnerability. The
    last seen2020-06-01
    modified2020-06-02
    plugin id56652
    published2011-10-26
    reporterThis script is Copyright (C) 2011-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/56652
    titlephpMyAdmin 3.4.x < 3.4.6 XSS (PMASA-2011-16)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(56652);
      script_version("1.8");
      script_cvs_date("Date: 2018/07/24 18:56:11");
    
      script_cve_id("CVE-2011-4064");
      script_bugtraq_id(50175);
    
      script_name(english:"phpMyAdmin 3.4.x < 3.4.6 XSS (PMASA-2011-16)");
      script_summary(english:"Checks for cross-site scripting in phpMyAdmin");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote web server contains a PHP application that is affected by
    a cross-site scripting vulnerability.");
      script_set_attribute(attribute:"description", value:
    "The version of phpMyAdmin hosted on the remote server is 3.4.x prior
    to 3.4.6 and is affected by a cross-site scripting vulnerability.  The
    'Servers-0-verbose' parameter is not properly sanitized by methods in
    'libraries/config/ConfigFile.class.php' as called by the script
    'setup/index.php'.  Persistent cross-site scripting is possible if
    improper filesystem permissions are in place.
    ");
    
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?45ba6757");
      script_set_attribute(attribute:"see_also", value:"http://www.phpmyadmin.net/home_page/security/PMASA-2011-16.php");
      script_set_attribute(attribute:"solution", value:
    "Apply the vendor patches or upgrade to phpMyAdmin version 3.4.6 or
    later.");
      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:H/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
      script_set_attribute(attribute:"exploit_available", value:"false");
     script_cwe_id(20, 74, 79, 442, 629, 711, 712, 722, 725, 750, 751, 800, 801, 809, 811, 864, 900, 928, 931, 990);
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2011/10/17");
      script_set_attribute(attribute:"patch_publication_date", value:"2011/10/17");
      script_set_attribute(attribute:"plugin_publication_date", value:"2011/10/26");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:phpmyadmin:phpmyadmin");
      script_end_attributes();
    
      script_category(ACT_ATTACK);
      script_family(english:"CGI abuses : XSS");
    
      script_copyright(english:"This script is Copyright (C) 2011-2018 Tenable Network Security, Inc.");
    
      script_dependencies("phpMyAdmin_detect.nasl");
      script_exclude_keys("Settings/disable_cgi_scanning");
      script_require_ports("Services/www", 80);
      script_require_keys("www/phpMyAdmin", "www/PHP");
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("http.inc");
    include("webapp_func.inc");
    
    
    port    = get_http_port(default:80, php:TRUE);
    install = get_install_from_kb(appname:"phpMyAdmin", port:port, exit_on_fail:TRUE);
    dir = install['dir'];
    
    r = http_send_recv3(
      port   : port,
      method : "GET",
      item   : dir
               + '/setup/index.php?tab_hash=&check_page_refresh=1'
               + '&page=servers&mode=add&submit=New+server',
      exit_on_fail : TRUE
    );
    
    # parse cookie out
    headers = parse_http_headers(status_line:r[0], headers:r[1]);
    if (isnull(headers)) exit(1, "Error parsing HTTP headers on port "+port+".");
    
    cookie_header = headers['set-cookie'];
    if (isnull(cookie_header)) exit(1, "Did not receive a phpMyAdmin cookie on port "+port+".");
    cookie = get_any_http_cookie(name:'phpMyAdmin');
    if (strlen(cookie) == 0) exit(1, "'phpMyAdmin cookie not received on port "+port+".");
    
    # parse token out
    pattern = 'name="token"[ ]+value="(.*)"';
    foreach line (split(r[2], keep:0))
    {
      matches = eregmatch(
        string: line,
        pattern: pattern
      );
    
      if (!isnull(matches))
      {
        token = matches[1];
        break;
      }
    }
    if (isnull(token)) exit(1, "Unable to parse token from response on port "+port+".");
    
    magic = 'NESSUS_' + unixtime() + SCRIPT_NAME;
    xss   = '<script>alert(/'+magic+'/)</script>';
    
    post_data = 'phpMyAdmin='
      +cookie+
      '&tab_hash=&check_page_refresh=1&token='
      +token+
      '&Servers-0-verbose='
      +xss+
      '&Servers-0-host=localhost&Servers-0-port=&Servers-0-socket=&Servers-0-connect_type=tcp&Servers-0-extension=mysqli&submit_save=Save&Servers-0-auth_type=cookie&Servers-0-user=root&Servers-0-password=&Servers-0-auth_swekey_config=&Servers-0-auth_http_realm=&Servers-0-SignonSession=&Servers-0-SignonURL=&Servers-0-LogoutURL=&Servers-0-only_db=&Servers-0-only_db-userprefs-allow=on&Servers-0-hide_db=&Servers-0-hide_db-userprefs-allow=on&Servers-0-AllowRoot=on&Servers-0-DisableIS=on&Servers-0-AllowDeny-order=&Servers-0-AllowDeny-rules=&Servers-0-ShowDatabasesCommand=SHOW+DATABASES&Servers-0-pmadb=&Servers-0-controluser=&Servers-0-controlpass=&Servers-0-verbose_check=on&Servers-0-bookmarktable=&Servers-0-relation=&Servers-0-userconfig=&Servers-0-table_info=&Servers-0-column_info=&Servers-0-history=&Servers-0-tracking=&Servers-0-table_coords=&Servers-0-pdf_pages=&Servers-0-designer_coords=&Servers-0-tracking_default_statements=CREATE+TABLE%2CALTER+TABLE%2CDROP+TABLE%2CRENAME+TABLE%2CCREATE+INDEX%2CDROP+INDEX%2CINSERT%2CUPDATE%2CDELETE%2CTRUNCATE%2CREPLACE%2CCREATE+VIEW%2CALTER+VIEW%2CDROP+VIEW%2CCREATE+DATABASE%2CALTER+DATABASE%2CDROP+DATABASE&Servers-0-tracking_add_drop_view=on&Servers-0-tracking_add_drop_table=on&Servers-0-tracking_add_drop_database=on';
    
    referrer_url = build_url(port:port, qs:dir + '/setup/index.php?tab_hash=&check_page_refresh=1&token='+token+'&page=servers&mode=add&submit=New+server');
    request_url  = '/pma/setup/index.php?tab_hash=&check_page_refresh=1&token='+token+'&page=servers&mode=add&submit=New+server';
    
    r = http_send_recv3(
      port   : port,
      method : "POST",
      item   : request_url,
      data   : post_data,
      follow_redirect : 1,
      add_headers     : make_array(
        'Referrer'     , referrer_url,
        'Content-Type' , 'application/x-www-form-urlencoded'
      ),
      exit_on_fail : TRUE
    );
    
    if (
      "<h4>Use SSL ("+xss >< r[2] &&
      "<title>phpMyAdmin setup</title>" >< r[2]
    )
    {
      set_kb_item(name:'www/'+port+'/XSS', value:TRUE);
    
      if (report_verbosity > 0)
      {
        if (report_verbosity > 1)
        {
          last_req = http_last_sent_request();
    
          # grab vuln output
          vuln_output = strstr(r[2], '<h4>Use SSL');
          vuln_output = substr(vuln_output, 0, stridx(vuln_output, '.</div>'));
    
          footer = '\nThe full request was : \n\n'
                   + last_req
                   + '\nThe following HTTP POST data was used :\n\n'
                   + post_data
                   + '\n\n'
                   + '\nThe HTML output was :\n\n'
                   + vuln_output;
    
        }
        report = get_vuln_report(
          port    : port,
          items   : request_url,
          trailer : footer
        );
        security_warning(port:port, extra:report);
      }
      else security_warning(port);
      exit(0);
    }
    else exit(0, "The phpMyAdmin install at "+build_url(port:port, qs:dir)+" is not affected.");
    
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201201-01.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201201-01 (phpMyAdmin: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in phpMyAdmin. Please review the CVE identifiers and phpMyAdmin Security Advisories referenced below for details. Impact : Remote attackers might be able to insert and execute PHP code, include and execute local PHP files, or perform Cross-Site Scripting (XSS) attacks via various vectors. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id57433
    published2012-01-05
    reporterThis script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/57433
    titleGLSA-201201-01 : phpMyAdmin: Multiple vulnerabilities

Seebug

bulletinFamilyexploit
descriptionBugtraq ID: 50175 CVE ID:CVE-2011-4064 phpMyAdmin是一款基于PHP的MySQL管理程序。 部分传递给setup.php的输入在返回用户之前缺少过滤,攻击者构建恶意链接,诱使用户解析,可导致恶意脚本在目标用户浏览器上执行,可获得目标用户敏感信息或劫持用户会话。 如果存在配置目录并可写,那么XSS负载可保存在此目录中。 phpMyAdmin 3.x 厂商解决方案 phpMyAdmin 3.4.6已经修复此漏洞,建议用户下载使用: http://www.phpmyadmin.net/
idSSV:23110
last seen2017-11-19
modified2011-10-18
published2011-10-18
reporterRoot
sourcehttps://www.seebug.org/vuldb/ssvid-23110
titlephpMyAdmin Setup接口跨站脚本漏洞