[php-src] master: Merge branch 'PHP-8.6'

From: Date: Mon, 26 Oct 2026 21:35:00 +0000
Subject: [php-src] master: Merge branch 'PHP-8.6'
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142775@lists.php.net to get a copy of this message
Author: Daniel Scherzer (DanielEScherzer) Date: 2026-10-26T14:34:19-07:00 Commit: https://github.com/php/php-src/commit/3b8e98882e425907921c606496da424c33d12fab Raw diff: https://github.com/php/php-src/commit/3b8e98882e425907921c606496da424c33d12fab.diff Merge branch 'PHP-8.6' * PHP-8.6: LiteSpeed: document security considerations for executed paths (#24450) Changed paths: M sapi/litespeed/README.md M sapi/litespeed/lsapi_main.c Diff: diff --git a/sapi/litespeed/README.md b/sapi/litespeed/README.md index 3174bb55ad74..27f13ad2ba09 100644 --- a/sapi/litespeed/README.md +++ b/sapi/litespeed/README.md @@ -76,13 +76,20 @@ have lsphp bind to address 192.168.0.2:3000, have lsphp accept request on Unix domain socket /tmp/lsphp_manual.sock. -### INI Security +### Listener Security The lsphp listener must only be reachable by trusted sources, generally just -the LiteSpeed web front end. Any source that can set its own environment variables -can configure arbitrary PHP INI directives at the ZEND_INI_SYSTEM level for -that request. This is the equivalent level of access as the Apache -php_admin_value directive or the FPM's PHP_ADMIN_VALUE parameter. +the LiteSpeed web front end. Allowing access from other sources may cause +security issues: + +* Any source that can set its own environment variables can configure arbitrary +PHP INI directives at the ZEND_INI_SYSTEM level for that request. This is the +equivalent level of access as the Apache php_admin_value directive or the +FPM PHP_ADMIN_VALUE parameter. +* Any source that can invoke the lsphp listener can choose what file to execute +based on the request contents. The file to execute is the file name reported by +LSAPI_GetScriptFileName(), without additional validation. Specifically, there +is no enforcement of a docroot or open_basedir restriction. ## Using LiteSpeed PHP with LiteSpeed Web Server diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index 912480158870..1ce72b40207e 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -620,6 +620,11 @@ static sapi_module_struct lsapi_sapi_module = }; /* }}} */ +/* SG(request_info).path_translated comes from LSAPI_GetScriptFileName() without + * any additional validation; this is intentional, and is the mechanism by which + * LiteSpeed communicates the file to execute. The LiteSpeed listener should + * only be reachable from trusted callers. See README.md in this directory for + * more details. */ static void init_request_info( void ) { char * pContentType = LSAPI_GetHeader( H_CONTENT_TYPE );

« previous php.cvs (#142775) next »