Skip to content
RCE Write-up Advanced

Joomla! <= 3.0.3 (remember.php) PHP Object Injection Vulnerability

The Joomla remember-me plugin passed a cookie value straight into PHP's unserialize() without sanitising it. An attacker who could craft that cookie could inject a serialised PHP object and potentially trigger object injection behaviour in the application.

karmainsecurity.com

Published on karmainsecurity.com

User input passed through cookies is not properly sanitized before being used in an unserialize() call at line 45. This could be exploited to inject arbitrary PHP objects into the application scope.

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

Root cause

The remember-me cookie was decrypted and then passed directly to unserialize() without validating or restricting the resulting data.

Impact

An attacker could supply a crafted remember-me cookie to trigger PHP object injection, which may lead to further exploitation depending on available classes.

What the attacker needed

Crafted remember-me cookie; Joomla 3.0.x or 2.5.x

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.

When a website logs you in automatically, it stores a small piece of data in your browser called a cookie. This code took that cookie and turned it back into a program object without checking it first, so someone could put a fake object in the cookie and the site would build it. That kind of trick can sometimes let an attacker make the site do things it should not.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.