Vulnerabilities > CVE-2014-8958 - Cross-site Scripting vulnerability in PHPmyadmin
Summary
Multiple cross-site scripting (XSS) vulnerabilities in phpMyAdmin 4.0.x before 4.0.10.6, 4.1.x before 4.1.14.7, and 4.2.x before 4.2.12 allow remote authenticated users to inject arbitrary web script or HTML via a crafted (1) database, (2) table, or (3) column name that is improperly handled during rendering of the table browse page; a crafted ENUM value that is improperly handled during rendering of the (4) table print view or (5) zoom search page; or (6) a crafted pma_fontsize cookie that is improperly handled during rendering of the home page.
Vulnerable Configurations
Common Weakness Enumeration (CWE)
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 family Mandriva Local Security Checks NASL id MANDRIVA_MDVSA-2014-228.NASL description Multiple vulnerabilities has been discovered and corrected in phpmyadmin : - Multiple XSS vulnerabilities (CVE-2014-8958). - Local file inclusion vulnerability (CVE-2014-8959). - XSS vulnerability in error reporting functionality (CVE-2014-8960). - Leakage of line count of an arbitrary file (CVE-2014-8961). This upgrade provides the latest phpmyadmin version (4.2.12) to address these vulnerabilities. last seen 2020-06-01 modified 2020-06-02 plugin id 79588 published 2014-11-27 reporter This script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/79588 title Mandriva Linux Security Advisory : phpmyadmin (MDVSA-2014:228) NASL family Fedora Local Security Checks NASL id FEDORA_2014-15538.NASL description phpMyAdmin 4.2.12.0 (2014-11-20) ================================ - Blank/white page when JavaScript disabled - Multi row actions cause full page reloads - ReferenceError: targeurl is not defined - Incorrect text/icon display in Tracking report - Recordset return from procedure display nothing - Edit dialog for routines is too long for smaller displays - JavaScript error after moving a column - Issue with long comments on table columns - Input field unnecessarily selected on focus - Exporting selected rows exports all rows of the query - No insert statement produced in SQL export for queries with alias - Field disabled when internal relations used - [security] XSS through exception stack - [security] Path traversal can lead to leakage of line count - [security] XSS vulnerability in table print view - [security] XSS vulnerability in zoom search page - [security] Path traversal in file inclusion of GIS factory - [security] XSS in multi submit - [security] XSS through pma_fontsize cookie 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 seen 2020-03-17 modified 2014-12-02 plugin id 79654 published 2014-12-02 reporter This script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/79654 title Fedora 20 : phpMyAdmin-4.2.12-1.fc20 (2014-15538) NASL family Debian Local Security Checks NASL id DEBIAN_DLA-336.NASL description Several issues have been fixed in phpMyAdmin, the web administration tool for MySQL. CVE-2014-8958 Multiple cross-site scripting (XSS) vulnerabilities. CVE-2014-9218 Denial of service (resource consumption) via a long password. CVE-2015-2206 Risk of BREACH attack due to reflected parameter. CVE-2015-3902 XSRF/CSRF vulnerability in phpMyAdmin setup. NOTE: Tenable Network Security has extracted the preceding description block directly from the DLA security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-03-17 modified 2015-10-29 plugin id 86641 published 2015-10-29 reporter This script is Copyright (C) 2015-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/86641 title Debian DLA-336-1 : phpmyadmin security update NASL family FreeBSD Local Security Checks NASL id FREEBSD_PKG_A5D4A82A715311E488C76805CA0B3D42.NASL description The phpMyAdmin development team reports : - With a crafted database, table or column name it is possible to trigger an XSS attack in the table browse page. - With a crafted ENUM value it is possible to trigger XSS attacks in the table print view and zoom search pages. - With a crafted value for font size it is possible to trigger an XSS attack in the home page. These vulnerabilities can be triggered only by someone who is logged in to phpMyAdmin, as the usual token protection prevents non-logged-in users from accessing the required pages. Moreover, exploitation of the XSS vulnerability related to the font size requires forgery of the pma_fontsize cookie. In the GIS editor feature, a parameter specifying the geometry type was not correcly validated, opening the door to a local file inclusion attack. This vulnerability can be triggered only by someone who is logged in to phpMyAdmin, as the usual token protection prevents non-logged-in users from accessing the required page. With a crafted file name it is possible to trigger an XSS in the error reporting page. This vulnerability can be triggered only by someone who is logged in to phpMyAdmin, as the usual token protection prevents non-logged-in users from accessing the required page. In the error reporting feature, a parameter specifying the file was not correctly validated, allowing the attacker to derive the line count of an arbitrary file This vulnerability can be triggered only by someone who is logged in to phpMyAdmin, as the usual token protection prevents non-logged-in users from accessing the required page. last seen 2020-06-01 modified 2020-06-02 plugin id 79402 published 2014-11-24 reporter This script is Copyright (C) 2014-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/79402 title FreeBSD : phpMyAdmin -- XSS and information disclosure vulnerabilities (a5d4a82a-7153-11e4-88c7-6805ca0b3d42) NASL family Debian Local Security Checks NASL id DEBIAN_DSA-3382.NASL description Several issues have been fixed in phpMyAdmin, the web administration tool for MySQL. - CVE-2014-8958 (Wheezy only) Multiple cross-site scripting (XSS) vulnerabilities. - CVE-2014-9218 (Wheezy only) Denial of service (resource consumption) via a long password. - CVE-2015-2206 Risk of BREACH attack due to reflected parameter. - CVE-2015-3902 XSRF/CSRF vulnerability in phpMyAdmin setup. - CVE-2015-3903 (Jessie only) Vulnerability allowing man-in-the-middle attack on API call to GitHub. - CVE-2015-6830 (Jessie only) Vulnerability that allows bypassing the reCaptcha test. - CVE-2015-7873 (Jessie only) Content spoofing vulnerability when redirecting user to an external site. last seen 2020-06-01 modified 2020-06-02 plugin id 86665 published 2015-10-30 reporter This script is Copyright (C) 2015-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/86665 title Debian DSA-3382-1 : phpmyadmin - security update NASL family Gentoo Local Security Checks NASL id GENTOO_GLSA-201505-03.NASL description The remote host is affected by the vulnerability described in GLSA-201505-03 (phpMyAdmin: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in phpMyAdmin. Please review the CVE identifiers referenced below for details. Impact : A remote authenticated attacker could exploit these vulnerabilities to include and execute arbitrary local files via a crafted parameter, inject SQL code, or to conduct Cross-Site Scripting attacks. Workaround : There is no known workaround at this time. last seen 2020-06-01 modified 2020-06-02 plugin id 83912 published 2015-06-01 reporter This script is Copyright (C) 2015-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/83912 title GLSA-201505-03 : phpMyAdmin: Multiple vulnerabilities NASL family Fedora Local Security Checks NASL id FEDORA_2014-15535.NASL description phpMyAdmin 4.2.12.0 (2014-11-20) ================================ - Blank/white page when JavaScript disabled - Multi row actions cause full page reloads - ReferenceError: targeurl is not defined - Incorrect text/icon display in Tracking report - Recordset return from procedure display nothing - Edit dialog for routines is too long for smaller displays - JavaScript error after moving a column - Issue with long comments on table columns - Input field unnecessarily selected on focus - Exporting selected rows exports all rows of the query - No insert statement produced in SQL export for queries with alias - Field disabled when internal relations used - [security] XSS through exception stack - [security] Path traversal can lead to leakage of line count - [security] XSS vulnerability in table print view - [security] XSS vulnerability in zoom search page - [security] Path traversal in file inclusion of GIS factory - [security] XSS in multi submit - [security] XSS through pma_fontsize cookie 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 seen 2020-03-17 modified 2014-12-02 plugin id 79653 published 2014-12-02 reporter This script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/79653 title Fedora 19 : phpMyAdmin-4.2.12-1.fc19 (2014-15535) NASL family CGI abuses NASL id PHPMYADMIN_PMASA_2014_16.NASL description According to its self-reported version number, the phpMyAdmin application hosted on the remote web server is 4.0.x prior to 4.0.10.6, 4.1.x prior to 4.1.14.7, or 4.2.x prior to 4.2.12. It is, therefore, affected by the following vulnerabilities : - A cross-site scripting vulnerability in the zoom search page due to improper validation of input when handling an ENUM value before returning it to the user. A remote attacker, with a specially crafted request, could potentially execute arbitrary script code within the browser / server trust relationship. (CVE-2014-8958) - A cross-site scripting vulnerability in the home page due to improper validation of input when handling a font size before returning it to the user. A remote attacker, with a specially crafted request, could potentially execute arbitrary script code within the browser / server trust relationship. (CVE-2014-8958) - A cross-site scripting vulnerability in the print view page due to improper validation of input when handling an ENUM value before returning it to the user. A remote attacker, with a specially crafted request, could potentially execute arbitrary script code within the browser / server trust relationship. (CVE-2014-8958) - A cross-site scripting vulnerability in the table browse page due to improper validation of input when handling database, table, and column names before returning them to the user. A remote attacker, with a specially crafted request, could potentially execute arbitrary script code within the browser / server trust relationship. (CVE-2014-8958) - A local file inclusion vulnerability in the GIS editor feature due to improperly validation of a parameter used to specify the geometry type. This could allow a remote, authenticated attacker to include arbitrary files from the host, allowing disclosure of the file contents or the execution of scripts on the host. (CVE-2014-8959) - A cross-site scripting vulnerability in the error reporting page due to improper validation of filenames before returning them to the user. This could allow a remote attacker, with a specially crafted request, to potentially execute arbitrary script code within the browser / server trust relationship. (CVE-2014-8960) - An information disclosure vulnerability in the error reporting feature due to improper validation of user-supplied input. This could allow a remote, authenticated attacker to determine a file last seen 2020-06-01 modified 2020-06-02 plugin id 79599 published 2014-11-27 reporter This script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/79599 title phpMyAdmin 4.0.x < 4.0.10.6 / 4.1.x < 4.1.14.7 / 4.2.x < 4.2.12 Multiple Vulnerabilities (PMASA-2014-13 - PMASA-2014-16) NASL family Fedora Local Security Checks NASL id FEDORA_2014-15588.NASL description phpMyAdmin 4.2.12.0 (2014-11-20) ================================ - Blank/white page when JavaScript disabled - Multi row actions cause full page reloads - ReferenceError: targeurl is not defined - Incorrect text/icon display in Tracking report - Recordset return from procedure display nothing - Edit dialog for routines is too long for smaller displays - JavaScript error after moving a column - Issue with long comments on table columns - Input field unnecessarily selected on focus - Exporting selected rows exports all rows of the query - No insert statement produced in SQL export for queries with alias - Field disabled when internal relations used - [security] XSS through exception stack - [security] Path traversal can lead to leakage of line count - [security] XSS vulnerability in table print view - [security] XSS vulnerability in zoom search page - [security] Path traversal in file inclusion of GIS factory - [security] XSS in multi submit - [security] XSS through pma_fontsize cookie 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 seen 2020-03-17 modified 2014-12-07 plugin id 79777 published 2014-12-07 reporter This script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/79777 title Fedora 21 : phpMyAdmin-4.2.12-1.fc21 (2014-15588) NASL family SuSE Local Security Checks NASL id OPENSUSE-2014-735.NASL description phpMyAdmin was updated to fix four security issues. For openSUSE 12.3 and 13.1, phpMyAdmin was updated to 4.1.14.7. For openSUSE 13.2, phpMyAdmin was updated to to 4.2.12. These security issues were fixed : - XSS vulnerability in error reporting functionality (CVE-2014-8960). - Local file inclusion vulnerability (CVE-2014-8959). - Multiple XSS vulnerabilities (CVE-2014-8958). - Leakage of line count of an arbitrary file (CVE-2014-8961). last seen 2020-06-05 modified 2014-12-06 plugin id 79753 published 2014-12-06 reporter This script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/79753 title openSUSE Security Update : phpMyAdmin (openSUSE-SU-2014:1561-1)
References
- http://lists.opensuse.org/opensuse-updates/2014-12/msg00017.html
- http://lists.opensuse.org/opensuse-updates/2014-12/msg00017.html
- http://www.debian.org/security/2015/dsa-3382
- http://www.debian.org/security/2015/dsa-3382
- http://www.mandriva.com/security/advisories?name=MDVSA-2014:228
- http://www.mandriva.com/security/advisories?name=MDVSA-2014:228
- http://www.phpmyadmin.net/home_page/security/PMASA-2014-13.php
- http://www.phpmyadmin.net/home_page/security/PMASA-2014-13.php
- http://www.securityfocus.com/bid/71243
- http://www.securityfocus.com/bid/71243
- https://github.com/phpmyadmin/phpmyadmin/commit/1bc04ec95038f2356ad33752090001bf1c047208
- https://github.com/phpmyadmin/phpmyadmin/commit/1bc04ec95038f2356ad33752090001bf1c047208
- https://github.com/phpmyadmin/phpmyadmin/commit/2a3b7393d1d5a8ba0543699df94a08a0f5728fe0
- https://github.com/phpmyadmin/phpmyadmin/commit/2a3b7393d1d5a8ba0543699df94a08a0f5728fe0
- https://github.com/phpmyadmin/phpmyadmin/commit/2ffdbf2d7daa0b92541d8b754e2afac555d3ed21
- https://github.com/phpmyadmin/phpmyadmin/commit/2ffdbf2d7daa0b92541d8b754e2afac555d3ed21
- https://github.com/phpmyadmin/phpmyadmin/commit/d32da348c4de2379482a48661ce968a55eebe5c4
- https://github.com/phpmyadmin/phpmyadmin/commit/d32da348c4de2379482a48661ce968a55eebe5c4
- https://security.gentoo.org/glsa/201505-03
- https://security.gentoo.org/glsa/201505-03