What is NGINX2Root?
nginx2root is a collection of five distinct nginx vulnerabilities and one Linux kernel vulnerability. Each has a proven exploit. The most severe enables unauthenticated remote code execution; chained with a separate Linux kernel vulnerability, it can lead to host root.
Fixed version:
Stable:
Mainline: 1.31.9
Five nginx findings and one kernel vulnerability
The most severe of the five allows unauthenticated remote code execution on web servers running a common nginx configuration. This remote code execution can be chained with a separate Linux kernel vulnerability to reach host root, remotely and without authentication.
CVE-2026-123007
CVE-2026-123634
CVE-2026-123633
CVE-2026-121810
CVE-2026-113425
Linux kernel · SCTP
Host root · remote, unauthenticated
Who is affected?
The version range below applies to the HTTP/2 remote-code-execution finding, the most severe of the five. Official nginx releases from 1.9.5 through 1.31.8 contain the affected code. Exposure requires HTTP/2 support in the nginx build and an affected listener that accepts HTTP/2 connections.
Each of the other four CVEs is a distinct vulnerability with its own affected range and exploit. Check its individual advisory rather than applying the HTTP/2 finding’s version range to all five.
Distribution packages, appliances, and container images may backport a security fix while retaining an older version string. Confirm patch status from the relevant vendor advisory instead of relying on nginx -v alone. The host-root stage uses a separate Linux SCTP kernel vulnerability and must be assessed separately.
How do I fix it?
Apply the fixed nginx release or your vendor’s security update as soon as it is available. If you cannot update immediately, disable HTTP/2 on every affected nginx listener until the fix is applied. This mitigates the HTTP/2 finding. For the other CVEs and the Linux kernel finding, see the response guide in our blog post.
How to upgrade Your Nginx to the latest?
Ubuntu
- 安装
curl以及gpg密钥验证工具
1 | apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring |
- 导入
Nginx官方的验证密钥文件,用来验证Nginx库的合法性
1 | curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \ |
- 验证
GPG密钥是否正确
1 | gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg |
运行以上命令后,输出的信息必须包含以下信息:
1 | pub rsa2048 2011-08-19 [SC] [expires: 2027-05-24] |
指纹信息必须为573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62请注意观察.
- 将
apt的仓库设置为稳定版release ( 推荐 )
1 | echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ |
如果你想使用mainline版本,可以使用以下命令将仓库设置为mainline
1 | echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ |
- 将nginx源仓库设置为
Nginx官方而不走Ubuntu官方的apt仓库下载
1 | echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \ |
- 更新apt库
1 | apt update |
- 查看当前所有的
Nginx软件包
1 | apt list -a nginx |
打印出的内容应该为:
1 | Listing... Done |
假如打印出的信息还是旧版本,请自行排查或参见【Nginx官方安装指南—Ubuntu】.
- 安装最新版的
Nginx
1 | apt install nginx |
- 查看更新后的
Nginx版本
1 | nginx -v |
打印信息
1 | nginx version: nginx/1.30.7 |
到此,Ubuntu的Nginx更新完成。
Debian
安装
curl以及gpg密钥验证工具(Debian库)1
apt install curl gnupg2 ca-certificates lsb-release debian-archive-keyring
导入
Nginx官方的验证密钥文件,用来验证Nginx库的合法性
1 | curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \ |
- 验证
GPG密钥是否正确
1 | gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg |
运行以上命令后,输出的信息必须包含以下信息:
1 | pub rsa2048 2011-08-19 [SC] [expires: 2027-05-24] |
指纹信息必须为573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62请注意观察.(可能会输出多对密钥信息,这是正常的)
- 将
apt的仓库设置为稳定版release ( 推荐 )
1 | echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ |
如果你想使用mainline先行版本,可以使用以下命令将仓库设置为mainline
1 | echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ |
- 将nginx源仓库设置为
Nginx官方而不走Debian官方的apt仓库下载
1 | echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \ |
- 更新apt库
1 | apt update |
- 查看当前所有的
Nginx软件包
1 | apt list -a nginx |
打印出的内容应该为:
1 | Listing... Done |
假如打印出的信息还是旧版本,请自行排查或参见【Nginx官方安装指南-Debian】
- 安装最新版的
Nginx
1 | apt install nginx |
- 查看更新后的
Nginx版本
1 | nginx -v |
打印信息
1 | nginx version: nginx/1.30.7 |
到此,Debian的Nginx更新完成。
如您的服务器系统不是Ubuntu也不是Debian,请参见:【Nginx installation instructions】.
参考文献
Nginx 官方文档
- RHEL and derivatives
https://nginx.org/en/linux_packages.html#RHEL
- SLES
https://nginx.org/en/linux_packages.html#SLES
- Alpine
https://nginx.org/en/linux_packages.html#Alpine
- Amazon Linux
https://nginx.org/en/linux_packages.html#Amazon-Linux