PHP 5.6.0 RC2 GD Extension NULL Byte input validation

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 classified as critical was found in PHP 5.6.0 RC2 (Programming Language Software). This vulnerability affects the function imagegd/imagegd2/imagegif/imagejpeg/imagepng/imagewbmp/imagewebp of the component GD Extension. The manipulation with the input value %00 leads to a input validation vulnerability. The CWE definition for the vulnerability is CWE-20. The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. As an impact it is known to affect integrity.

The weakness was published 08/19/2014 by Ryan Mauger as Sec Bug #67730 as confirmed bug report (Bug Tracker). The advisory is shared for download at bugs.php.net. This vulnerability was named CVE-2014-5120 since 07/30/2014. The exploitation appears to be easy. The attack can be initiated remotely. No form of authentication is required for a successful exploitation. Technical details and also a public exploit are known. The advisory points out:

The paths passed to the imagepng, imagejpeg, imagegif, imagewebp and imagewbmp functions are not validated to not contain null bytes, and as such may allow paths to be prematurely terminated by an attacker. This could be used to overwrite a file in a location other than the intended destination. The attached patch will check for null bytes in the given path, and return false, raising a warning in the event a null byte is encountered.

A public exploit has been developed by Ryan Mauger in ANSI C and been published immediately after the advisory. It is possible to download the exploit at bugs.php.net. It is declared as proof-of-concept. As 0-day the estimated underground price was around $5k-$25k. The vulnerability scanner Nessus provides a plugin with the ID 78358 (Amazon Linux AMI : php55 (ALAS-2014-415)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family Amazon Linux Local Security Checks. The commercial vulnerability scanner Qualys is able to test this issue with plugin 350314 (Amazon Linux Security Advisory for php55: ALAS-2014-415). The advisory illustrates:

phpt tests are included in the patch.

Upgrading to version 5.4.32 or 5.5.16 eliminates this vulnerability. Applying a patch is able to eliminate this problem. The bugfix is ready for download at bugs.php.net. The best possible mitigation is suggested to be upgrading to the latest version. A possible mitigation has been published immediately after the disclosure of the vulnerability.

The vulnerability is also documented in the databases at X-Force (95499) and Tenable (78358).

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: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Input validation
CWE: CWE-20
CAPEC: 🔍
ATT&CK: 🔍

Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Ryan Mauger
Programming Language: 🔍
Download: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-Dayunlockunlockunlockunlock
Todayunlockunlockunlockunlock

Nessus ID: 78358
Nessus Name: Amazon Linux AMI : php55 (ALAS-2014-415)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍

OpenVAS ID: 14611
OpenVAS Name: Amazon Linux Local Check: ALAS-2014-415
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Threat Intelligenceinfo

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

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍
Exploit Delay Time: 🔍

Upgrade: PHP 5.4.32/5.5.16
Patch: bugs.php.net

Timelineinfo

07/30/2014 🔍
08/19/2014 +20 days 🔍
08/19/2014 +0 days 🔍
08/19/2014 +0 days 🔍
08/21/2014 +2 days 🔍
08/22/2014 +1 days 🔍
08/24/2014 +2 days 🔍
08/28/2014 +4 days 🔍
02/11/2022 +2724 days 🔍

Sourcesinfo

Product: php.org

Advisory: Sec Bug #67730
Researcher: Ryan Mauger
Status: Confirmed
Confirmation: 🔍

CVE: CVE-2014-5120 (🔍)
OVAL: 🔍
IAVM: 🔍

X-Force: 95499 - PHP file overwrite, Medium Risk
Vulnerability Center: 45911 - PHP <5.4.32, <5.5.16 Remote File System Write via Crafted Image Input, Medium

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

Entryinfo

Created: 08/28/2014 10:06
Updated: 02/11/2022 06:51
Changes: 08/28/2014 10:06 (85), 06/05/2017 09:59 (4), 02/11/2022 06:38 (3), 02/11/2022 06:51 (1)
Complete: 🔍
Cache ID: 3:C28:103

Discussion

No comments yet. Languages: en.

Please log in to comment.

Might our Artificial Intelligence support you?

Check our Alexa App!