Bug #77496 [Ver]: mysqli->real_connect() overwrites MYSQLI_OPT_LOCAL_INFILE setting

From: Date: Tue, 22 Jan 2019 16:58:31 +0000
Subject: Bug #77496 [Ver]: mysqli->real_connect() overwrites MYSQLI_OPT_LOCAL_INFILE setting
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219128@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77496&edit=1

 ID:                 77496
 Updated by:         requinix@php.net
 Reported by:        php at yghe dot net
 Summary:            mysqli->real_connect() overwrites
                     MYSQLI_OPT_LOCAL_INFILE setting
 Status:             Verified
 Type:               Bug
 Package:            MySQLi related
 Operating System:   Mac OS X Mojave 10.14.2
 PHP Version:        7.3.1
 Block user comment: N
 Private report:     N

 New Comment:

> I'd like to point out that this actually is a security issue.
...in the application. Not in PHP. There's a distinction there often lost in the commentary on
this bug tracker.


Previous Comments:
------------------------------------------------------------------------
[2019-01-22 11:17:08] hanno at hboeck dot de

I'd like to point out that this actually is a security issue.

LOCAL INFILE can be used by a malicious server to exfiltrate files from the client. Disabling this
option thus can certainly have security implications.

This caused an issue in phpmyadmin where they thought they set that option, but it wasn't
active:
https://github.com/phpmyadmin/phpmyadmin/commit/c5e01f84ad48c5c626001cb92d7a95500920a900

------------------------------------------------------------------------
[2019-01-22 00:50:25] cmb@php.net

Thanks, Damian!

------------------------------------------------------------------------
[2019-01-22 00:47:18] requinix@php.net

I hit Enter as a reflex, wasn't ready...

Came from the migration to mysqlnd.

------------------------------------------------------------------------
[2019-01-22 00:45:36] requinix@php.net

https://github.com/php/php-src/blob/PHP-7.3.1/ext/mysqli/mysqli_nonapi.c#L260

------------------------------------------------------------------------
[2019-01-22 00:42:25] cmb@php.net

Active support for PHP 7.1 has ended more than a month ago[1],
i.e. this branch will only receive security related fixes.  Since
this issue does not seem to be security related, please check
whether PHP 7.2 or higher are affected as well, and change the
“PHP Version” field accordingly.

[1] <http://php.net/supported-versions.php>

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=77496


--
Edit this bug report at https://bugs.php.net/bug.php?id=77496&edit=1


Thread (11 messages)

« previous php.bugs (#219128) next »