GLSA-201711-15 : PHPUnit: Remote code execution

critical Nessus Plugin ID 104696

Synopsis

The remote Gentoo host is missing one or more security-related patches.

Description

The remote host is affected by the vulnerability described in GLSA-201711-15 (PHPUnit: Remote code execution)

When PHPUnit is installed in a production environment via composer and these modules are in a web accessible directory, the eval-stdin.php file in PHPUnit contains vulnerable statements that trigger the vulnerability.
Impact :

A remote attacker could possibly execute arbitrary PHP code or cause a Denial of Service condition.
Workaround :

There are several ways to fix or mitigate this vulnerability:
Remove PHPUnit from the production environment.
Update PHPUnit.
Manually apply the patch.
Disable direct access to the composer packages by placing .htaccess file to /vendor folder.

Solution

All PHPUnit users should upgrade to the latest version:
# emerge --sync # emerge --ask --oneshot --verbose '>=dev-php/phpunit-5.7.15-r1'

See Also

https://security.gentoo.org/glsa/201711-15

Plugin Details

Severity: Critical

ID: 104696

File Name: gentoo_GLSA-201711-15.nasl

Version: 3.5

Type: local

Published: 11/20/2017

Updated: 12/5/2022

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: High

Score: 8.9

CVSS v2

Risk Factor: High

Base Score: 7.5

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Vulnerability Information

CPE: cpe:/o:gentoo:linux, p-cpe:/a:gentoo:linux:phpunit

Required KB Items: Host/local_checks_enabled, Host/Gentoo/release, Host/Gentoo/qpkg-list

Patch Publication Date: 11/19/2017

CISA Known Exploited Vulnerability Due Dates: 8/15/2022

Reference Information

CVE: CVE-2017-9841

GLSA: 201711-15