what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Piwik 2.16.0 PHP Object Injection

Piwik 2.16.0 PHP Object Injection
Posted Nov 8, 2016
Authored by EgiX | Site karmainsecurity.com

Piwik version 2.16.0 and below suffer from a saveLayout PHP object injection vulnerability.

tags | exploit, php
SHA-256 | dcdc3544bfe63cc9a6b25f372b4bc6e23956e5ffd828ff6d48ff75fb585630b0

Piwik 2.16.0 PHP Object Injection

Change Mirror Download
---------------------------------------------------------------
Piwik <= 2.16.0 (saveLayout) PHP Object Injection Vulnerability
---------------------------------------------------------------


[-] Software Link:

https://piwik.org/


[-] Affected Versions:

Version 2.16.0 and prior versions.


[-] Vulnerability Description:

The vulnerability can be triggered through the saveLayout() method
defined in /plugins/Dashboard/Controller.php:

210. public function saveLayout()
211. {
212. $this->checkTokenInUrl();
213.
214. $layout =
Common::unsanitizeInputValue(Common::getRequestVar('layout'));
215. $layout = strip_tags($layout);
216. $idDashboard = Common::getRequestVar('idDashboard', 1, 'int');
217. $name = Common::getRequestVar('name', '', 'string');
218.
219. if (Piwik::isUserIsAnonymous()) {
220. $session = new SessionNamespace("Dashboard");
221. $session->dashboardLayout = $layout;
222. $session->setExpirationSeconds(1800);

User input passed by anonymous users through the "layout" request
parameter is being stored into
a session variable at line 221, and this is possible by invoking an URL
like this:

http://[piwik]/index.php?module=Dashboard&action=saveLayout&token_auth=anonymous&layout=[injection]%26%2365536;

Since Piwik is not using "utf8mb4" collations for its database, this can
be exploited in combination with a MySQL
UTF8 truncation issue in order to corrupt the session array, allowing
unauthenticated attackers to inject arbitrary
PHP objects into the application scope and carry out Server-Side Request
Forgery (SSRF) attacks, delete arbitrary
files, execute arbitrary PHP code, and possibly other attacks.
Successful exploitation of this vulnerability
requires Piwik to use the database to store session data (dbtable
option) and the application running on
PHP before version 5.4.45, 5.5.29, or 5.6.13.


[-] Solution:

Update to version 2.16.1 or later.


[-] Disclosure Timeline:

[08/02/2016] - Vendor notified
[09/02/2016] - Vendor replied not to be able to reproduce the issue
[11/02/2016] - Proof of concept tested on demo.piwik.org sent to the vendor
[11/02/2016] - Vendor response stating the issue will be fixed in 2.16.1
release
[17/02/2016] - Bug bounty received
[11/04/2016] - Version 2.16.1 released:
http://piwik.org/changelog/piwik-2-16-1/
[16/06/2016] - CVE number requested
[07/11/2016] - Public disclosure


[-] CVE Reference:

The Common Vulnerabilities and Exposures project (cve.mitre.org)
has not assigned a CVE identifier for this vulnerability.


[-] Credits:

Vulnerability discovered by Egidio Romano.


[-] Original Advisory:

http://karmainsecurity.com/KIS-2016-13




Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close