Vanilla Forums <= (class.utilitycontroller.php) PHP Object Injection Vulnerability

• Software Link:

• Affected Versions:

All versions from 2.0 to

• Vulnerability Description:

The vulnerable code is located in /applications/dashboard/controllers/class.utilitycontroller.php:

      // Get the message, response, and transientkey
      $Messages = TrueStripSlashes(GetValue('Messages', $_POST));
      $Response = TrueStripSlashes(GetValue('Response', $_POST));
      $TransientKey = GetIncomingValue('TransientKey', '');
      // If the key validates
      $Session = Gdn::Session();
      if ($Session->ValidateTransientKey($TransientKey)) {
         // If messages wasn't empty
         if ($Messages != '') {
            // Unserialize them & save them if necessary
            $Messages = Gdn_Format::Unserialize($Messages);
         // If the response wasn't empty, save it in the config
         if ($Response != '')
            $Save['Garden.RequiredUpdates'] = Gdn_Format::Unserialize($Response);

User input passed through the “Messages” and “Response” POST parameters is not properly sanitized before being used in a call to the “Gdn_Format::Unserialize” method at lines 327 and 360. This can be exploited to inject arbitrary PHP objects into the application scope, that could allow an attacker to conduct Local File Inclusion attacks by abusing the “Gdn_Module::__toString” method, which triggers a call to the “Gdn_Module::FetchView” method:

   public function FetchView() {
      $ViewPath = $this->FetchViewLocation();
      $String = '';
      if(is_object($this->_Sender) && isset($this->_Sender->Data)) {
         $Data = $this->_Sender->Data;
      } else {
         $Data = array();
      include ($ViewPath);

The value returned by the “Gdn_Module::FetchViewLocation” method at line 112 can be controlled by the “_ApplicationFolder” object’s property, which results in an arbitrary local file inclusion at line 120. Successful exploitation of the vulnerability using this vector requires the application running on PHP < 5.3.4, because it needs a null-byte injection attack. However, other attack vectors might be possible, e.g. leveraging magic methods of classes defined in third-party components.

• Solution:

Update to version or higher.

• Disclosure Timeline:

[02/03/2013] – Vendor notified
[22/03/2013] – Version released
[10/05/2013] – CVE number assigned
[07/10/2013] – Public disclosure

• CVE Reference:

The Common Vulnerabilities and Exposures project (
has assigned the name CVE-2013-3528 to this vulnerability.

• Credits:

Vulnerability discovered by Egidio Romano.