From 012464268420e53a9cd81cbb4a43988d70393c36 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 28 Jun 2013 13:09:13 -0400 Subject: [PATCH 1/2] [security] Global variables scope injection vulnerability (see PMASA-2013-7) --- ChangeLog | 3 +++ import.php | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8b29aabbd9..b1430c4908 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ phpMyAdmin - ChangeLog ====================== +4.0.4.1 () +- [security] Global variables scope injection vulnerability (see PMASA-2013-7) + 4.0.4.0 (2013-06-17) - bug #3959 Using DefaultTabDatabase in NavigationTree for Database Click - bug #3961 Avoid Suhosin warning when in simulation mode diff --git a/import.php b/import.php index 9d193ae63d..6075d5d94f 100644 --- a/import.php +++ b/import.php @@ -122,6 +122,24 @@ if ($_POST == array() && $_GET == array()) { * We only need to load the selected plugin */ +if (! in_array( + $format, + array( + 'csv', + 'ldi', + 'mediawiki', + 'ods', + 'shp', + 'sql', + 'xml' + ) +) +) { + // this should not happen for a normal user + // but only during an attack + PMA_fatalError('Incorrect format parameter'); +} + $post_patterns = array( '/^force_file_/', '/^'. $format . '_/' From 43b75a7a4f3a8074beff0a903f35ba000c4f76a6 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 30 Jun 2013 06:36:09 -0400 Subject: [PATCH 2/2] 4.0.4.1 release date --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b1430c4908..a46e88c0b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ phpMyAdmin - ChangeLog ====================== -4.0.4.1 () +4.0.4.1 (2013-06-30) - [security] Global variables scope injection vulnerability (see PMASA-2013-7) 4.0.4.0 (2013-06-17)