Skip to content
Prototype pollution Write-up Intermediate

Piwik <= 2.16.0 (saveLayout) PHP Object Injection Vulnerability

The saveLayout method in Piwik's Dashboard plugin stores unsanitised user input from the 'layout' parameter into a session variable for anonymous users. An attacker could inject a PHP object into the session, potentially leading to object injection and further exploitation.

karmainsecurity.com

Published on karmainsecurity.com

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

The author, on karmainsecurity.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could inject a PHP object into the session, potentially leading to further exploitation such as remote code execution, though the text does not confirm the full impact.

What the attacker needed

Anonymous access; crafted layout parameter

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Piwik is a web analytics tool. A part of its code takes text from a web request and saves it without cleaning it properly. This can let an attacker sneak in a special piece of data that the server later treats as a code object, which might let them run harmful actions.

What is Prototype pollution?

Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.

Similar reports

View all

Same bug class and techniques, clearest first.

Prototype pollution

The lesson behind this report.

Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.