phpBB up to 3.1.1 deregister_globals privileges management

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
4.8$0-$5k0.00

A vulnerability was found in phpBB up to 3.1.1 (Forum Software). It has been declared as critical. Affected by this vulnerability is the function deregister_globals. The manipulation with an unknown input leads to a privileges management vulnerability. The CWE definition for the vulnerability is CWE-269. The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. As an impact it is known to affect integrity.

The weakness was shared 11/22/2014 by Taoguang Chen as phpBB <= 3.1.1 deregister_globals() Function Bypass as not defined mailinglist post (Full-Disclosure). It is possible to read the advisory at seclists.org. The vendor was not involved in the public release. The exploitation appears to be easy. The attack can be launched remotely. The exploitation doesn't need any form of authentication. Technical details and also a public exploit are known. The attack technique deployed by this issue is T1068 according to MITRE ATT&CK. Responsible for the vulnerability is the following code:

$input = array_merge(
array_keys($_GET),
array_keys($_POST),
array_keys($_COOKIE),
array_keys($_SERVER),
array_keys($_SESSION),
array_keys($_ENV),
array_keys($_FILES)
);

foreach ($input as $varname)
{
if (isset($not_unset[$varname]))
{
if ($varname !== 'GLOBALS' || isset($_GET['GLOBALS']) ||
isset($_POST['GLOBALS']) || isset($_SERVER['GLOBALS']) ||
isset($_SESSION['GLOBALS']) || isset($_ENV['GLOBALS']) ||
isset($_FILES['GLOBALS']))
{
exit;
}
else
{
$cookie = &$_COOKIE;
while (isset($cookie['GLOBALS']))
{
if (!is_array($cookie['GLOBALS']))
{
break;
}
....
}
}
unset($GLOBALS[$varname]);
}
The advisory points out:
In the above code we see, when request $_COOKIE['GLOBALS'] = 1, $GLOBALS['GLOBALS'] will be destroyed by unset(). This means $GLOBALS array will be destroyed. This also means you will not be able to use $GLOBALS['key'] to access or control a global variable in all scopes throughout a script. Because the binding between the $GLOBALS array and the global symbol table has been broken. All global variables registered by PHP form $_COOKIE, $_SERVER, $_SESSION, $_ENV, and $_FILES arrays will be not unregistered.

A public exploit has been developed by Taoguang Chen in PHP and been published immediately after the advisory. It is possible to download the exploit at packetstormsecurity.com. It is declared as proof-of-concept. The real existence of this vulnerability is still doubted at the moment. The code used by the exploit is:

$_COOKIE['GLOBALS'] = 1;
$_COOKIE['ryat'] = $ryat = 'ryat';

deregister_globals();

var_dump($GLOBALS);
var_dump($ryat);

$GLOBALS['ryat'] = 'hi';

var_dump($GLOBALS);
var_dump($ryat);

The mailinglist post contains the following remark:

I had reported the issue to the phpBB developers, but they do not consider this a security issue.

The vulnerability is also documented in the vulnerability database at X-Force (99026).

Productinfo

Type

Name

Version

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB CVSS-B Score: 🔍
VulDB CVSS-BT Score: 🔍
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.3
VulDB Meta Temp Score: 4.8

VulDB Base Score: 5.3
VulDB Temp Score: 4.8
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfo

Class: Privileges management
CWE: CWE-269 / CWE-266
ATT&CK: T1068

Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Taoguang Chen
Programming Language: 🔍
Download: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍

0-Dayunlockunlockunlockunlock
Todayunlockunlockunlockunlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: no mitigation known
Status: 🔍

0-Day Time: 🔍
Exploit Delay Time: 🔍

Timelineinfo

11/22/2014 🔍
11/22/2014 +0 days 🔍
12/02/2014 +10 days 🔍
07/06/2017 +947 days 🔍

Sourcesinfo

Product: phpbb.com

Advisory: phpBB <= 3.1.1 deregister_globals() Function Bypass
Researcher: Taoguang Chen
Status: Not defined
Disputed: 🔍
X-Force: 99026 - phpBB deregister_globals() security bypass, Medium Risk

scip Labs: https://www.scip.ch/en/?labs.20161013

Entryinfo

Created: 12/02/2014 09:37
Updated: 07/06/2017 08:16
Changes: 12/02/2014 09:37 (51), 07/06/2017 08:16 (5)
Complete: 🔍

Discussion

No comments yet. Languages: en.

Please log in to comment.

Interested in the pricing of exploits?

See the underground prices here!