Skip to content

Commit 58b3c13

Browse files
committed
Add security warning about publicly exposed PHP-FPM
1 parent 0600ff7 commit 58b3c13

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

install/fpm/configuration.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,15 @@
251251
'ip.add.re.ss:port', 'port', '/path/to/unix/socket'. This option is
252252
mandatory for each pool.
253253
</para>
254+
<warning>
255+
<simpara>
256+
Prefer Unix sockets over TCP sockets when the web server runs on
257+
the same host. If a TCP socket must be used, ensure it is not
258+
exposed to untrusted networks and restrict access using
259+
<link linkend="listen-allowed-clients">listen.allowed_clients</link>.
260+
An exposed FastCGI endpoint allows arbitrary code execution.
261+
</simpara>
262+
</warning>
254263
</listitem>
255264
</varlistentry>
256265
<varlistentry xml:id="listen-backlog">

install/fpm/index.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33
<chapter xml:id="install.fpm" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
44
<title>FastCGI Process Manager (FPM)</title>
55
&fpm.intro;
6+
<warning>
7+
<para>
8+
PHP-FPM must not be publicly exposed to the network. A FastCGI
9+
endpoint that is accessible from untrusted sources allows
10+
<emphasis>arbitrary code execution</emphasis>. When using TCP
11+
sockets, restrict access using the
12+
<link linkend="listen-allowed-clients">listen.allowed_clients</link>
13+
directive to allow connections from the web server only. Prefer
14+
Unix sockets over TCP sockets when the web server runs on the same
15+
host, as they can be protected with filesystem permissions. When
16+
using Docker or similar container setups, do not expose PHP-FPM
17+
ports to the host or external networks; communicate between
18+
containers using an internal network instead.
19+
</para>
20+
</warning>
621
<para>
722
These features include:
823
<itemizedlist>

0 commit comments

Comments
 (0)