GLSA-201711-15 : PHPUnit: Remote code execution

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

ID: 104696

File Name: gentoo_GLSA-201711-15.nasl

Version: Revision: 3.2

Type: local

Published: 2017/11/20

Modified: 2018/01/26

Dependencies: 12634

Risk Information

Risk Factor: High

CVSSv2

Base Score: 7.5

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

CVSSv3

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: p-cpe:/a:gentoo:linux:phpunit, cpe:/o:gentoo:linux

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

Patch Publication Date: 2017/11/19

Reference Information

CVE: CVE-2017-9841

GLSA: 201711-15