[doc-en] master: Add security warning about publicly exposed PHP-FPM (#5263)
| From: | Louis-Arnaud via GitHub | Date: | Wed, 02 Sep 2026 13:59:36 +0000 |
| Subject: | [doc-en] master: Add security warning about publicly exposed PHP-FPM (#5263) | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-23701@lists.php.net to get a copy of this message | ||
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-09-02T15:59:32+02:00
Commit: https://github.com/php/doc-en/commit/7efe863bc4b65788f652e3d9eff27941b1a74540
Raw diff: https://github.com/php/doc-en/commit/7efe863bc4b65788f652e3d9eff27941b1a74540.diff
Add security warning about publicly exposed PHP-FPM (#5263)
* Add security warning about publicly exposed PHP-FPM
* docs(fpm): add fastcgi_abort_request reference alongside fastcgi_finish_request
* fix(fpm): use <simpara> for inline-only listitem paragraphs
* fpm: drop the invented fastcgi_abort_request and tighten the warnings
fastcgi_abort_request() does not exist: the FPM SAPI only declares
fastcgi_finish_request(). The <simpara> conversion the style check
requires is kept.
The chapter warning now states the mechanism instead of asserting the
risk, and moves after the feature list so it no longer splits the
sentence introducing it. The listen warning carries the operational
detail, names listen.owner and the BSD caveat, and no longer repeats
the chapter.
Changed paths:
M install/fpm/configuration.xml
M install/fpm/index.xml
Diff:
diff --git a/install/fpm/configuration.xml b/install/fpm/configuration.xml
index e33c099864ce..e2396d9482cd 100644
--- a/install/fpm/configuration.xml
+++ b/install/fpm/configuration.xml
@@ -251,6 +251,23 @@
'ip.add.re.ss:port', 'port', '/path/to/unix/socket'. This
option is
mandatory for each pool.
</para>
+ <warning>
+ <simpara>
+ An exposed FastCGI endpoint allows arbitrary code execution.
+ When the web server runs on the same host, a Unix socket should be
+ preferred; on Linux its access is then controlled by
+ <link linkend="listen-owner">listen.owner</link>,
+ <literal>listen.group</literal> and
<literal>listen.mode</literal>,
+ although many BSD-derived systems accept connections regardless of
+ those permissions.
+ When a TCP socket is used, the addresses allowed to connect must be
+ listed in
+ <link
linkend="listen-allowed-clients">listen.allowed_clients</link>,
+ which is unset by default and then accepts any address.
+ In container setups, the FPM service should not publish its port on
+ the host; containers on the same network reach each other directly.
+ </simpara>
+ </warning>
</listitem>
</varlistentry>
<varlistentry xml:id="listen-backlog">
diff --git a/install/fpm/index.xml b/install/fpm/index.xml
index c4644a0e232e..f466595a00d8 100644
--- a/install/fpm/index.xml
+++ b/install/fpm/index.xml
@@ -41,11 +41,11 @@
</para>
</listitem>
<listitem>
- <para>
+ <simpara>
<function>fastcgi_finish_request</function> - special function to finish
request and flush all data while continuing to do something
time-consuming (video converting, stats processing etc.);
- </para>
+ </simpara>
</listitem>
<listitem>
<para>
@@ -66,6 +66,20 @@
</itemizedlist>
</para>
+ <warning>
+ <simpara>
+ php-fpm must not be reachable from an untrusted network.
+ A client that can open a FastCGI connection controls the
+ configuration used for the request, including
+ <link linkend="ini.auto-prepend-file">auto_prepend_file</link>,
+ and can therefore execute arbitrary code.
+ Access is restricted through the
+ <link linkend="listen">listen</link> and
+ <link linkend="listen-allowed-clients">listen.allowed_clients</link>
+ directives.
+ </simpara>
+ </warning>
+
&install.fpm.install;
&install.fpm.configuration;
</chapter>