NGINX2Root: Remote Code Execution vulnerabilities in nginx

Post Syndicated from jzb original https://lwn.net/Articles/1108362/

Xint is reporting that
it has discovered a collection of five
critical vulnerabilities
in the NGINX web
server. The worst flaw, it says, would allow
an unauthenticated attacker to execute commands on an affected nginx server with
HTTP/2 enabled
. The company also reports a local-privilege escalation (LPE) kernel
vulnerability
, which was introduced in the 4.15 kernel, in the Stream Control Transmission
Protocol (SCTP)
subsystem. If chained with the NGINX vulnerability,
it would allow an attacker to gain root privileges on the host. A kernel patch for this
is not yet available.

We also obtained a root shell on the host in a setup where nginx was running in
a Docker container. On many Linux distributions, the SCTP module is installed by
default and the kernel loads it automatically the first time a program opens an
SCTP socket. Whether SCTP is reachable on a given host still depends on the
kernel, the available modules, and the container’s restrictions. Where it is
reachable, the attacker can take over the host kernel. Since all containers on
the host share that kernel, this gives the attacker control of the host and
every container on it.

Xint recommends updating to NGINX
1.31.9
, which was just released, and to
block the SCTP module on hosts that do not need it until a kernel fix is
available. See the mitigations
section of their report for more information.