The security research team Xint has just disclosed a set of critical vulnerabilities dubbed NGINX2Root. As the name suggests, this chain can take an attacker from being just another random visitor on the internet all the way to Root on the server running nginx — and even on the underlying host.
NGINX2Root isn't a single bug. It's an attack chain made up of five nginx remote code execution vulnerabilities plus one Linux kernel local privilege escalation flaw. The one with the widest impact is CVE-2026-123007, which can affect nginx servers with HTTP/2 enabled. [nginx2root.com], [xint.io]
What is NGINX2Root?
According to Xint, NGINX2Root covers the following five nginx vulnerabilities:
- CVE-2026-123007
- CVE-2026-123634
- CVE-2026-123633
- CVE-2026-121810
- CVE-2026-113425
These five don't need to be combined to work. Each one is a relatively independent attack path — they just require different server configurations to trigger. Once an attacker successfully exploits one, the first thing they get is the privileges of the nginx Worker process. [xint.io]
In further testing, the researchers chained the nginx bugs with a privilege escalation flaw in the Linux kernel's SCTP subsystem, achieving:
- Sending a malicious request to the nginx server from the public internet;
- Executing commands with no account or password;
- Gaining nginx Worker process privileges;
- Escalating via the Linux kernel vulnerability;
- Escaping from inside the container;
- Finally obtaining Root on the host.
The researchers say they carried out the demo in AWS over a public IP, and also provided demos for GCP, Azure, and bare-metal environments. [xint.io]
Why is this so dangerous?
1. No login required
CVE-2026-123007 is an unauthenticated remote code execution vulnerability — what's usually called Pre-auth RCE.
The attacker doesn't need a backend account, an SSH key, or a server password in advance. If the server meets the conditions, all they may need to do is send crafted HTTP/2 traffic over the network to have a shot at triggering it. [xint.io]
2. The bug may be over a decade old
CVE-2026-123007 traces back to nginx 1.9.5, the version where nginx first introduced HTTP/2 support.
According to the research team's analysis, official releases from nginx 1.9.5 through 1.31.8 all contain the vulnerable code. As of November 10, 2026, the same code is still present in the development branch. [xint.io]
3. Container isolation may not stop the full chain
A lot of admins figure that as long as nginx runs in a Docker container, even if it gets compromised the damage stays inside the container.
But in the chain Xint demonstrated, the attacker can first get nginx Worker privileges inside the container, then use the Linux kernel bug to break out, and finally land Root on the host. [xint.io]
That means containers still provide a degree of isolation, but they're no substitute for patching — and "it runs in a container" definitely doesn't mean "the server is safe."
Which configurations do the five NGINX vulnerabilities affect?
| CVE | Mainly affected configuration | Earliest affected version | Temporary mitigation |
|---|---|---|---|
| CVE-2026-123007 | HTTP/2 enabled | 1.9.5 | Disable HTTP/2 for now |
| CVE-2026-123634 | Uses resolver, sets proxy_pass dynamically from request values, and involves subrequests or Mirror config |
1.13.4 | Avoid dynamically resolving upstream addresses during the request phase |
| CVE-2026-123633 | HTTP/2 plus forwarding to an upstream server | 1.19.7 | Disable HTTP/2 for now |
| CVE-2026-121810 | HTTP/3 plus forwarding to an upstream server | 1.25.0 | Disable HTTP/3 for now |
| CVE-2026-113425 | Mail Proxy using proxy on and auth_http |
0.5.15 | Stop exposing it externally or restrict access |
Note that turning off HTTP/2 only temporarily blocks CVE-2026-123007 and CVE-2026-123633 — it won't fix the other three. So admins shouldn't treat "disable HTTP/2" as a complete fix. [xint.io]
How do I check my own server?
Step 1: Check the NGINX version
Run on the server:
nginx -v 2>&1
Sample output:
nginx version: nginx/1.31.8
You can do a rough first pass like this:
- 1.9.5 to 1.31.8: official releases contain the vulnerable code, keep digging;
- 1.9.4 or earlier: HTTP/2 wasn't introduced yet, so not affected by CVE-2026-123007;
- 1.31.9 or later: should already include the fix, but still verify where the package came from;
- Older versions shipped by Ubuntu, Debian, etc.: don't just look at
nginx -v— check the full package version and the distro's security advisories.
That's because distros like Ubuntu and Debian often fix things by backporting security patches. The nginx major version looks unchanged on the surface, but the distro package itself may already include the patch. [xint.io]
On Ubuntu or Debian, you can also run:
apt-cache policy nginx
dpkg-query -W nginx nginx-core nginx-full nginx-light 2>/dev/null
On RPM-based systems, run:
rpm -q nginx
dnf info nginx
Step 2: Check whether the HTTP/2 module is compiled in
nginx -V 2>&1 | grep -q -- '--with-http_v2_module' </span>
&& echo 'HTTP2_MODULE=present' </span>
|| echo 'HTTP2_MODULE=absent'
If the output is:
HTTP2_MODULE=present
then the current nginx binary includes the HTTP/2 module, and you need to check whether HTTP/2 is enabled in the config. [xint.io]
Step 3: Check whether HTTP/2 is enabled in the config
sudo nginx -T 2>&1 </span>
| sed 's/#.\*//' </span>
| grep -nE 'listen\[\[:space:\]\].\*http2|^\[\[:space:\]\]*http2\[\[:space:\]\]+on\[\[:space:\]\]*;'
If you see something like:
listen 443 ssl http2;
or:
http2 on;
then HTTP/2 is enabled on that listening port.
Keep in mind that nginx -T shows the config on disk. If the config was edited but not reloaded, what's actually running may differ from the file. [xint.io]
Step 4: Check from outside whether HTTP/2 is reachable
Run this from another machine, not the server itself:
openssl s_client </span>
-connect example.com:443 </span>
-servername example.com </span>
-alpn h2 </dev/null 2>&1 </span>
| grep -E 'ALPN protocol:|No ALPN negotiated|Connection refused|connect:errno|handshake failure'
Replace both instances of example.com with your own domain.
If the output is:
ALPN protocol: h2
then the server accepts HTTP/2 connections from the outside.
If there's Cloudflare, a CDN, a load balancer, or another reverse proxy in front of the server, this test may only be showing you the proxy node's result. Admins still need to check the actual listening port on the origin nginx. [xint.io]
How do I tell whether my server has already been compromised?
The researchers note that attacks on CVE-2026-123007 don't necessarily leave obvious traces in normal access logs. The HTTP/2 control frames involved in triggering the bug aren't regular HTTP requests, so the default access.log may not fully reflect what happened. [xint.io]
Admins should focus on the following signs.
1. Long-lived abnormal connections on 443
sudo ss -tinp state established '( sport = :443 )'
Run it twice, a few dozen seconds apart, and pay attention to:
- Connections from the same external IP lasting several minutes;
bytes_receivedgrowing quickly;- The server sending noticeably less data than it receives;
- Lots of short-lived connections from the same IP at once;
- No legitimate business scenario such as a large file upload.
Any single one of these doesn't mean you've been compromised, but if several show up together, isolate the source immediately and start investigating. [xint.io]
2. NGINX Worker spawning abnormal processes
You can inspect the children of the nginx Worker:
sudo ps -eo pid,ppid,user,lstart,cmd --forest
Or use:
sudo pstree -ap
Look for shells, download tools, reverse-connect programs, or anything else that doesn't match expected business behavior started by the nginx user, for example:
shbashcurlwgetncpythonperlsocat
These programs aren't necessarily malicious in themselves — the key question is whether they should be started by an nginx Worker at all.
3. NGINX Worker crashing abnormally
sudo journalctl -u nginx --since "24 hours ago"
sudo dmesg -T | grep -Ei 'nginx|segfault|general protection|oom'
If you see frequent Worker crashes, segfaults, or unexpected restarts, preserve the logs and memory dumps and dig deeper into the incident.
Urgent checklist for server admins
If you maintain nginx servers, work through it in this order:
- Run
nginx -vand note the current version; - Check the full package version and where it was installed from;
- Run
nginx -Vto confirm whether the HTTP/2 module is present; - Run
nginx -Tto confirm HTTP/2, HTTP/3, Mail Proxy, and dynamic upstream config; - Test from outside with ALPN to see whether HTTP/2 is publicly exposed;
- Check the real origin behind CDNs and load balancers;
- Check all containers and Kubernetes Ingress Controllers;
- Upgrade to a version the vendor confirms is fixed;
- Restart the service, not just reload the config;
- Check for abnormal connections, Worker crashes, and child processes;
- Keep records of versions, logs, and changes before and after the upgrade;
- If you can't upgrade right away, apply temporary mitigations based on your actual config.
Closing thoughts
What makes NGINX2Root dangerous isn't just that there's a serious nginx vulnerability — it's that it demonstrates a complete attack path:
From a single unauthenticated request over the network, into the nginx Worker, across the container boundary, and finally to Root on the host.
For individual site owners, enterprise ops teams, and anyone running reverse proxies on Docker or Kubernetes, the most important thing isn't waiting for public exploit code to show up — it's immediately confirming your versions, configs, and actual exposure.
Security updates should go out ASAP. Temporarily disabling HTTP/2 lowers some of the risk, but it's no replacement for a full patch and doesn't cover all the vulnerabilities in NGINX2Root.
Notes
Sources:
- NGINX2Root official page [nginx2root.com]
- Xint: NGINX2Root technical analysis and incident response guidance [xint.io]
Post polished by: GPT5.6-sol
近日,安全研究团队 Xint 公布了一组名为 NGINX2Root 的严重安全漏洞。顾名思义,这组漏洞可能让攻击者从一名普通的网络访问者,一步步获得运行 nginx 的服务器,甚至底层宿主机的 Root 权限。
NGINX2Root 并不是单一漏洞,而是五个 nginx 远程代码执行漏洞与一个 Linux 内核本地提权漏洞组成的攻击链。其中影响最广的漏洞是 CVE-2026-123007,它可能影响启用了 HTTP/2 的 nginx 服务器。 [nginx2root.com], [xint.io]
什么是 NGINX2Root?
按照 Xint 的说明,NGINX2Root 包含以下五个 nginx 漏洞:
- CVE-2026-123007
- CVE-2026-123634
- CVE-2026-123633
- CVE-2026-121810
- CVE-2026-113425
这五个漏洞并不需要组合在一起才能生效。每个漏洞都是一条相对独立的攻击路径,只是触发它们所需要的服务器配置不同。攻击者成功利用漏洞后,可以首先获得 nginx Worker 进程的权限。 [xint.io]
在进一步的测试中,研究人员又将 nginx 漏洞与 Linux 内核 SCTP 子系统中的提权漏洞组合起来,实现了:
- 从公网向 nginx 服务器发送恶意请求;
- 在没有账号和密码的情况下执行命令;
- 获得 nginx Worker 进程权限;
- 利用 Linux 内核漏洞提升权限;
- 从容器内部逃逸;
- 最终获得宿主机的 Root 权限。
研究人员表示,他们在 AWS 环境中通过公网 IP 完成了攻击演示,同时还提供了 GCP、Azure 和裸机服务器环境的演示。 [xint.io]
为什么这个漏洞如此危险?
1. 攻击者不需要登录
CVE-2026-123007 属于未认证远程代码执行漏洞,也就是通常所说的 Pre-auth RCE。
攻击者不需要提前获得网站后台账号、SSH 密钥或服务器密码。如果服务器满足相应条件,攻击者可能只需要通过网络向服务器发送经过构造的 HTTP/2 流量,就有机会触发漏洞。 [xint.io]
2. 漏洞存在时间可能超过十年
CVE-2026-123007 最早可追溯到 nginx 1.9.5,也就是 nginx 首次引入 HTTP/2 支持的版本。
根据研究团队的分析,nginx 1.9.5 至 1.31.8 的官方版本中均包含相关易受攻击代码。截至 2026 年 11 月 10 日,开发分支中也仍然存在相同代码。 [xint.io]
3. 容器隔离不一定能阻止完整攻击链
很多管理员会认为,只要将 nginx 放进 Docker 容器,就算 nginx 遭到攻击,影响也会被限制在容器内部。
但是在 Xint 展示的攻击链中,攻击者可以先获得容器内的 nginx Worker 权限,然后利用 Linux 内核漏洞逃逸出容器,最终获得宿主机 Root 权限。 [xint.io]
这意味着容器依然能够提供一定隔离能力,但不能代替漏洞修复,更不能把“运行在容器内”理解成“服务器已经安全”。
五个 NGINX 漏洞分别影响哪些配置?
| 漏洞编号 | 主要受影响配置 | 最早受影响版本 | 临时缓解方向 |
|---|---|---|---|
| CVE-2026-123007 | 启用了 HTTP/2 | 1.9.5 | 暂时禁用 HTTP/2 |
| CVE-2026-123634 | 使用 resolver、基于请求值动态设置 proxy_pass,并涉及子请求或 Mirror 配置 |
1.13.4 | 避免请求阶段动态解析上游地址 |
| CVE-2026-123633 | HTTP/2 加上转发到上游服务器 | 1.19.7 | 暂时禁用 HTTP/2 |
| CVE-2026-121810 | HTTP/3 加上转发到上游服务器 | 1.25.0 | 暂时禁用 HTTP/3 |
| CVE-2026-113425 | Mail Proxy 使用 proxy on 和 auth_http |
0.5.15 | 停止外部公开或限制访问 |
需要注意,关闭 HTTP/2 只能暂时阻断 CVE-2026-123007 和 CVE-2026-123633,并不能解决其余三个漏洞。因此,管理员不能将“关闭 HTTP/2”当作完整修复方案。 [xint.io]
如何检查自己的服务器?
第一步:检查 NGINX 版本
在服务器中执行:
nginx -v 2>&1
示例输出:
nginx version: nginx/1.31.8
可以按照以下方式进行初步判断:
- 1.9.5 至 1.31.8: 官方版本包含相关易受攻击代码,需要继续排查;
- 1.9.4 或更早: 尚未引入 HTTP/2,因此不受 CVE-2026-123007 影响;
- 1.31.9 或更高: 正常情况下已经包含修复,但仍应确认软件包来源;
- Ubuntu、Debian 等发行版提供的旧版本: 不能只看
nginx -v,还要检查完整软件包版本和发行版安全公告。
这是因为 Ubuntu 和 Debian 等发行版经常使用“安全补丁回移”方式修复漏洞。表面上看 nginx 主版本没有变化,但发行版软件包本身可能已经包含补丁。 [xint.io]
在 Ubuntu 或 Debian 上,可以进一步执行:
apt-cache policy nginx
dpkg-query -W nginx nginx-core nginx-full nginx-light 2>/dev/null
在基于 RPM 的系统上,可以执行:
rpm -q nginx
dnf info nginx
第二步:检查是否编译了 HTTP/2 模块
nginx -V 2>&1 | grep -q -- '--with-http_v2_module' </span>
&& echo 'HTTP2_MODULE=present' </span>
|| echo 'HTTP2_MODULE=absent'
如果输出:
HTTP2_MODULE=present
说明当前 nginx 二进制文件包含 HTTP/2 模块,需要继续检查配置中是否启用了 HTTP/2。 [xint.io]
第三步:检查配置中是否启用 HTTP/2
sudo nginx -T 2>&1 </span>
| sed 's/#.\*//' </span>
| grep -nE 'listen\[\[:space:\]\].\*http2|^\[\[:space:\]\]*http2\[\[:space:\]\]+on\[\[:space:\]\]*;'
如果看到类似内容:
listen 443 ssl http2;
或者:
http2 on;
说明对应监听端口启用了 HTTP/2。
需要注意,nginx -T 查看的是磁盘上的配置。如果配置文件修改后没有重新加载,当前正在运行的配置可能与文件内容不同。 [xint.io]
第四步:从外部检查 HTTP/2 是否可访问
请在服务器之外的另一台设备上执行:
openssl s_client </span>
-connect example.com:443 </span>
-servername example.com </span>
-alpn h2 </dev/null 2>&1 </span>
| grep -E 'ALPN protocol:|No ALPN negotiated|Connection refused|connect:errno|handshake failure'
请将两个 example.com 替换成自己的域名。
如果输出:
ALPN protocol: h2
说明服务器对外接受 HTTP/2 连接。
如果服务器前面使用了 Cloudflare、CDN、负载均衡器或其他反向代理,这项测试看到的可能只是代理节点的结果。管理员还需要对源站 nginx 的实际监听端口进行检查。 [xint.io]
如何判断服务器是否已经遭到攻击?
研究人员提醒,针对 CVE-2026-123007 的攻击不一定会在普通访问日志中留下明显记录。触发漏洞涉及的 HTTP/2 控制帧不属于常规 HTTP 请求,因此默认的 access.log 可能无法完整反映攻击过程。 [xint.io]
管理员可以重点检查以下迹象。
1. 长时间存在的异常 443 连接
sudo ss -tinp state established '( sport = :443 )'
间隔几十秒执行两次,重点关注:
- 同一外部 IP 的连接持续数分钟;
bytes_received快速增长;- 服务器发送的数据量明显小于接收的数据量;
- 同一 IP 同时建立大量短连接;
- 没有大文件上传等合理业务场景。
单独出现其中一项不等于已经遭到攻击,但多种异常同时出现时,应立即隔离来源并展开调查。 [xint.io]
2. NGINX Worker 启动异常进程
可以检查 nginx Worker 的子进程:
sudo ps -eo pid,ppid,user,lstart,cmd --forest
也可以使用:
sudo pstree -ap
重点关注由 nginx 用户启动的 Shell、下载工具、反向连接程序或其他不符合业务预期的进程,例如:
shbashcurlwgetncpythonperlsocat
这些程序本身并不一定恶意,关键是确认它们是否应该由 nginx Worker 启动。
3. NGINX Worker 异常崩溃
sudo journalctl -u nginx --since "24 hours ago"
sudo dmesg -T | grep -Ei 'nginx|segfault|general protection|oom'
如果看到频繁的 Worker 崩溃、段错误或者异常重启,应保留日志和内存转储,并进一步开展入侵调查。
给服务器管理员的紧急检查清单
如果你正在维护 nginx 服务器,可以按照下面的顺序处理:
- 执行
nginx -v,记录当前版本; - 检查完整软件包版本和安装来源;
- 执行
nginx -V,确认是否包含 HTTP/2 模块; - 执行
nginx -T,确认 HTTP/2、HTTP/3、Mail Proxy 和动态上游配置; - 从外部使用 ALPN 测试 HTTP/2 是否公开;
- 检查 CDN、负载均衡器后面的真实源站;
- 检查所有容器和 Kubernetes Ingress Controller;
- 升级到供应商确认已经修复的版本;
- 重启服务,而不仅仅是重新加载配置;
- 检查异常连接、Worker 崩溃和子进程;
- 保留升级前后的版本、日志和变更记录;
- 无法立即升级时,根据实际配置实施临时缓解措施。
结语
NGINX2Root 的危险之处,不只是存在一个严重的 nginx 漏洞,而是它展示了一条完整的攻击路径:
从一次未经认证的网络访问,进入 nginx Worker,再穿过容器边界,最终获得宿主机 Root 权限。
对于个人站长、企业运维团队以及使用 Docker、Kubernetes 部署反向代理的团队来说,最重要的事情不是等待公开利用代码出现,而是立即确认版本、配置和实际暴露范围。
安全更新应当尽快执行。临时关闭 HTTP/2 可以降低部分风险,但不能取代完整补丁,也不能解决 NGINX2Root 中的全部漏洞。
写作说明
原文:
贴文优化:GPT5.6-sol
Translated by AI from 简体中文Original (简体中文)
4 replies
Sort order