php-gettext up to 1.0.11 select_string/ngettext/npgettext count 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.
6.0$0-$5k0.00

A vulnerability classified as critical was found in php-gettext up to 1.0.11 (Programming Language Software). Affected by this vulnerability is the function select_string/ngettext/npgettext. The manipulation of the argument count 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 confidentiality, integrity, and availability.

The weakness was published 08/15/2016 as not defined mailinglist post (Full-Disclosure). The advisory is shared at seclists.org. The attack can be launched remotely. Technical details are known, but no exploit is available. MITRE ATT&CK project uses the attack technique T1068 for this issue. Responsible for the vulnerability is the following code:

function select_string($n) {
   $string = $this->get_plural_forms();
   $string = str_replace('nplurals',"\$total",$string);
   $string = str_replace("n",$n,$string);
   $string = str_replace('plural',"\$plural",$string);
   $total = 0;
   $plural = 0;
   eval("$string");
   if ($plural >= $total) $plural = $total - 1;
   return $plural;
}
The advisory points out:
The vulnerability here lies in the fact that $string is evaluated as PHP code. If the plural form contains an 'n', and the $n parameter is exposed to a malicious user, PHP code can be added to the value of $string before it is evaluated. For websites, this means that a vulnerable application could allow an attacker to run PHP code on your site and potentially gain control of it. The $n parameter in select_string can also be exposed through ngettext and npgettext as the $number parameter.

Upgrading to version 1.0.12 eliminates this vulnerability. A possible mitigation has been published even before and not after the disclosure of the vulnerability. The mailinglist post contains the following remark:

The new release 1.0.12 was made available shortly after notification in 2015 and resolves the issue by raising an exception during non-numeric input to these parameters.

Similar entries are available at VDB-127235, VDB-131165, VDB-131166 and VDB-143304.

Productinfo

Type

Name

Version

CPE 2.3info

CPE 2.2info

CVSSv4info

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

CVSSv3info

VulDB Meta Base Score: 6.3
VulDB Meta Temp Score: 6.0

VulDB Base Score: 6.3
VulDB Temp Score: 6.0
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
CAPEC: 🔍
ATT&CK: 🔍

Local: No
Remote: Yes

Availability: 🔍
Status: Not defined
Price Prediction: 🔍
Current Price Estimation: 🔍

0-Dayunlockunlockunlockunlock
Todayunlockunlockunlockunlock

Threat Intelligenceinfo

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

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: php-gettext 1.0.12

Timelineinfo

11/11/2015 🔍
08/15/2016 +278 days 🔍
08/19/2016 +4 days 🔍
03/30/2019 +953 days 🔍

Sourcesinfo

Advisory: seclists.org
Status: Not defined
See also: 🔍

Entryinfo

Created: 08/19/2016 11:55
Updated: 03/30/2019 09:42
Changes: 08/19/2016 11:55 (42), 03/30/2019 09:42 (2)
Complete: 🔍
Cache ID: 18:896:103

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you want to use VulDB in your project?

Use the official API to access entries easily!