PHP up to 5.5.13 /tmp/phpglibccheck filename link following ⚔ [Disputed]

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.3$0-$5k0.00

Summaryinfo

A vulnerability, which was classified as problematic, was found in PHP up to 5.5.13. Affected by this vulnerability is an unknown functionality of the file /tmp/phpglibccheck. Such manipulation of the argument filename leads to link following. This vulnerability is uniquely identified as CVE-2014-3981. Moreover, an exploit is present. The existence of this vulnerability is still disputed at present. A patch should be applied to remediate this issue.

Detailsinfo

A vulnerability was found in PHP up to 5.5.13 (Programming Language Software) and classified as critical. Affected by this issue is some unknown functionality of the file /tmp/phpglibccheck. The manipulation of the argument filename with an unknown input leads to a link following vulnerability. Using CWE to declare the problem leads to CWE-59. The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. Impacted is confidentiality, and integrity. CVE summarizes:

acinclude.m4, as used in the configure script in PHP 5.5.13 and earlier, allows local users to overwrite arbitrary files via a symlink attack on the /tmp/phpglibccheck file.

The weakness was disclosed 06/04/2014 by A B as More /tmp fun (PHP, Lynis) as not defined mailinglist post (Full-Disclosure). The advisory is available at seclists.org. The vendor was not involved in the coordination of the public release. The mailinglist post contains:

This issue goes back at least 10+ years, but no one configures/compiles PHP as root and your files aren't important anyway.
This vulnerability is handled as CVE-2014-3981 since 06/05/2014. The attack may be launched remotely. No form of authentication is required for exploitation. Technical details as well as a exploit are known. The following code is the reason for this vulnerability:
#include <stdio.h>
int main(int argc, char *argv[])
{
  FILE *fp;
  long position;
  char *filename = "/tmp/phpglibccheck";

  fp = fopen(filename, "w");
  if (fp == NULL) {
    perror("fopen");
    exit(2);
  }
  fputs("foobar", fp);
  fclose(fp);

  fp = fopen(filename, "a+");
  position = ftell(fp);
  fclose(fp);
  unlink(filename);
  if (position == 0)
  return 1;
  return 0;
}

It is declared as highly functional. The vulnerability was handled as a non-public zero-day exploit for at least 620 days. During that time the estimated underground price was around $5k-$25k. The real existence of this vulnerability is still doubted at the moment. The vulnerability scanner Nessus provides a plugin with the ID 78310 (Amazon Linux AMI : php54 (ALAS-2014-367)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family Amazon Linux Local Security Checks and running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 185089 (HP-UX Apache Server Suite Multiple Vulnerabilities (HPSBUX03102)).

Applying a patch is able to eliminate this problem. A possible mitigation has been published 2 months after the disclosure of the vulnerability.

The vulnerability is also documented in the databases at X-Force (93652), Tenable (78310) and SecurityTracker (ID 1030523†). openwall.com is providing further details. The entries VDB-13383, VDB-13384, VDB-13386 and VDB-13387 are pretty similar. If you want to get best quality of vulnerability data, you may have to visit VulDB.

Productinfo

Type

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.5
VulDB Meta Temp Score: 6.3

VulDB Base Score: 6.5
VulDB Temp Score: 6.3
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

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

NVD Base Score: 🔍

Exploitinginfo

Class: Link following
CWE: CWE-59
CAPEC: 🔍
ATT&CK: 🔍

Physical: Partially
Local: Yes
Remote: Yes

Availability: 🔍
Status: Highly functional

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 78310
Nessus Name: Amazon Linux AMI : php54 (ALAS-2014-367)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍

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

Qualys ID: 🔍
Qualys Name: 🔍

Threat Intelligenceinfo

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

Countermeasuresinfo

Recommended: Patch
Status: 🔍

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

Timelineinfo

09/22/2012 🔍
06/04/2014 +620 days 🔍
06/05/2014 +1 days 🔍
06/05/2014 +0 days 🔍
06/08/2014 +3 days 🔍
07/04/2014 +26 days 🔍
07/09/2014 +5 days 🔍
10/12/2014 +95 days 🔍
05/17/2018 +1313 days 🔍

Sourcesinfo

Product: php.org

Advisory: More /tmp fun (PHP, Lynis)
Researcher: A B
Status: Not defined
Confirmation: 🔍
Disputed: 🔍

CVE: CVE-2014-3981 (🔍)
GCVE (CVE): GCVE-0-2014-3981
GCVE (VulDB): GCVE-100-13442

OVAL: 🔍
IAVM: 🔍

X-Force: 93652 - PHP configure script symlink, Medium Risk
SecurityTracker: 1030523

scip Labs: https://www.scip.ch/en/?labs.20161013
Misc.: 🔍
See also: 🔍

Entryinfo

Created: 06/05/2014 08:25
Updated: 05/17/2018 09:01
Changes: 06/05/2014 08:25 (78), 05/17/2018 09:01 (11)
Complete: 🔍
Cache ID: 216:DBF:103

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Interested in the pricing of exploits?

See the underground prices here!