Bug 956401 - (CVE-2013-3239) CVE-2013-3239 phpMyAdmin: remote code execution via locally saved SQL dump file multiple extensions (PMASA-2013-3)
CVE-2013-3239 phpMyAdmin: remote code execution via locally saved SQL dump fi...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20130424,repor...
: Security
Depends On: 956403 956404 956405
Blocks: 950112
  Show dependency treegraph
 
Reported: 2013-04-24 17:47 EDT by Vincent Danen
Modified: 2014-03-15 00:30 EDT (History)
6 users (show)

See Also:
Fixed In Version: phpMyAdmin 3.5.8.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-15 00:30:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vincent Danen 2013-04-24 17:47:16 EDT
phpMyAdmin can be configured to save an export file on the web server, via its SaveDir directive. With this in place, it's possible, either via a crafted filename template or a crafted table name, to save a double extension file like foobar.php.sql. In turn, an Apache webserver on which there is no definition for the MIME type "sql" (the default) will treat this saved file as a ".php" script, leading to remote code execution.

This vulnerability can be triggered only by someone who logged in to phpMyAdmin, as the usual token protection prevents non-logged-in users to access the required form. Moreover, the SaveDir directive is empty by default, so a default configuration is not vulnerable. The $cfg['SaveDir'] directive must be configured, and the server must be running Apache with mod_mime to be exploitable.

This is fixed via the following commits:

https://github.com/phpmyadmin/phpmyadmin/commit/d3fafdfba0807068196655e9b6d16c5d1d3ccf8a
https://github.com/phpmyadmin/phpmyadmin/commit/1f6bc0b707002e26cab216b9e57b4d5de764de48

External References:

http://www.phpmyadmin.net/home_page/security/PMASA-2013-3.php
Comment 1 Vincent Danen 2013-04-24 17:51:53 EDT
Created phpMyAdmin tracking bugs for this issue

Affects: fedora-all [bug 956403]
Affects: epel-6 [bug 956404]
Comment 2 Vincent Danen 2013-04-24 17:51:55 EDT
Created phpMyAdmin3 tracking bugs for this issue

Affects: epel-5 [bug 956405]
Comment 3 Fedora Update System 2013-05-15 15:43:19 EDT
phpMyAdmin3-3.5.8.1-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 4 Fedora Update System 2013-05-15 15:45:02 EDT
phpMyAdmin-3.5.8.1-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.