[ GLSA 201711-15 ] PHPUnit: Remote code execution

\n\n
–=-i6MgsOp6WPWxAFnSMsmC
Content-Type: text/plain; charset=”UTF-8″
Content-Transfer-Encoding: quoted-printable

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Gentoo Linux Security Advisory=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0GLSA 201711-15
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0https://security.gentoo.org/
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

=C2=A0Severity: Normal
=C2=A0=C2=A0=C2=A0=C2=A0Title: PHPUnit: Remote code execution
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Date: November 19, 2017
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Bugs: #635356
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ID: 201711-15

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

Synopsis
=3D=3D=3D=3D=3D=3D=3D=3D

A vulnerability was discovered in PHPUnit which may allow an
unauthenticated remote attacker to execute arbitrary PHP code.

Background
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

PHPUnit is a programmer-oriented testing framework for PHP. It is an
instance of the xUnit architecture for unit testing frameworks.

Affected packages
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

=C2=A0=C2=A0=C2=A0=C2=A0—————————————————=
—————-
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Package=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0Vulnerable=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Unaffected
=C2=A0=C2=A0=C2=A0=C2=A0—————————————————=
—————-
=C2=A0 1=C2=A0=C2=A0dev-php/phpunit=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=3D 5.7.15-r1=C2=A0

Description
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

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
=3D=3D=3D=3D=3D=3D

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

Workaround
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

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.

Resolution
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

All PHPUnit users should upgrade to the latest version:

=C2=A0 # emerge –sync
=C2=A0 # emerge –ask –oneshot –verbose “>=3Ddev-php/phpunit-5.7.15-r1″

References
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

[ 1 ] CVE-2017-9841
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0https://nvd.nist.gov/nvd.cfm?cvename=3D=
CVE-2017-9841

Availability
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

This GLSA and any updates to it are available for viewing at
the Gentoo Security Website:

=C2=A0https://security.gentoo.org/glsa/201711-15

Concerns?
=3D=3D=3D=3D=3D=3D=3D=3D=3D

Security is a primary focus of Gentoo Linux and ensuring the
confidentiality and security of our users’ machines is of utmost
importance to us. Any security concerns should be addressed to
security@gentoo.org or alternatively, you may file a bug at
https://bugs.gentoo.org.

License
=3D=3D=3D=3D=3D=3D=3D

Copyright 2017 Gentoo Foundation, Inc; referenced text
belongs to its owner(s).

The contents of this document are licensed under the
Creative Commons – Attribution / Share Alike license.

http://creativecommons.org/licenses/by-sa/2.5
–=-i6MgsOp6WPWxAFnSMsmC
Content-Type: application/pgp-signature; name=”signature.asc”
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

—–BEGIN PGP SIGNATURE—–
Version: GnuPG v2

iQGTBAABCgB9FiEE5Rdey4FSmOT+vCuqTbvRDw/dJUcFAloR7dJfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU1
MTc1RUNCODE1Mjk4RTRGRUJDMkJBQTREQkJEMTBGMEZERDI1NDcACgkQTbvRDw/d
JUdWeQgAxFqvC2OT2uVg2KV1jZfbmMGBLmQSCWLa6IobA5yZRdLb/Oh+8D6u9Slb
+YoUXT1BZQk3rueUlVQOJqu9e9JgVkdepO/xv4gSmtcFukYR2rfLkrt7cOeK7i/I
KsJ6WHPRbVgRCr07GxyNA0KQ15cHvVy/YKOKvkpIYTONh99GOlbQ4aLITXvTE62D
vW6TMyU60ZlwjuVTGbT9qPzGG7ekqYiZtO3A5+7aCb3ztzaB1HvYS1b3F41xgh7E
2x7pq6nWEwke9TTvDVavf+HlPq0kZ9cfTYKLs0Px23C6nM3Cr0SazlfoJMaAbmF8
pzgXiOPKqCo9IZWX8DMZ2XkmwvzCRA==
=901/
—–END PGP SIGNATURE—–

–=-i6MgsOp6WPWxAFnSMsmC–