CVE-2026-113425: NGINX mail proxy use-after-free from unauthenticated traffic

ByLinuxtastic

November 30, 2026 #CVE, #NGINX

nginx can proxy IMAP, POP3 and SMTP as well as HTTP, and the mail proxy module has been in the tree since 0.5.33 in 2007. Traffic that F5 does not describe can make it free a connection and use it again inside the worker process: a use-after-free reachable by an unauthenticated client of the mail listener, with a worker crash the usual result and code execution possible where ASLR is off or defeated. Red Hat rates it Critical; F5’s own workaround is to keep mail listeners off untrusted networks. If nginx has a mail { } block, upgrade to 1.31.9, 1.30.7 or the distribution package and restart it; until then, allow the mail ports only from the networks that need them. The great majority of nginx installations proxy no mail and are not exposed; this page is for the ones that do.

CVE-2026-113425 at a glance.

ComponentNGINX Open Source and NGINX Plus, the mail proxy (ngx_mail_proxy_module, with the fixes spread across src/mail/); built only with --with-mail, which Debian, Ubuntu and Alpine do as a dynamic module and nginx.org packages include
Affected versionsNGINX Open Source 0.5.33 to 1.31.8 and 1.30.0 to 1.30.6, in other words every release with the mail proxy; NGINX Plus R33 to R37 before 37.3.0.1 / 37.0.8.1. Only when a mail block with a listen is configured
Fixed inNGINX Open Source 1.31.9 (mainline) and 1.30.7 (stable), 18 November 2026; Debian lists five commits on the 1.30.7 branch and Ubuntu ten, the last of which touches ngx_mail_smtp_block_reading(); NGINX Plus 37.3.0.1 and 37.0.8.1; distribution packages below
SeverityCVSS 4.0 9.2 Critical (AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H) and CVSS 3.1 8.1 High from the F5 CNA, repeated by NVD and Ubuntu. Red Hat Critical, 8.1 (CWE-825), with the statement that impact is limited to systems configured to proxy mail; Ubuntu high. CWE-416 use after free
Exploited in the wildNot on CISA’s Known Exploited Vulnerabilities list as of 30 November 2026; CISA’s SSVC says no known exploitation and not automatable. EPSS 0.1487 (97th percentile) on 29 November 2026
Who is exposedMail providers and hosting panels that front IMAP, POP3 or SMTP with nginx: the mail listener is by nature exposed to every mail client on the internet, and the bug is reached before any login. F5’s record says “undisclosed traffic”, so the trigger is not public; the fix set in 1.30.7 shows the affected paths run through the SMTP state machine as well as the generic proxy code
PublishedCVE record and F5 advisory K000163931, 18 November 2026 (credit Xint.io; the CHANGES entry also credits Maxim Dounin); this page built 30 November 2026, last updated 30 November 2026

What it is

The mail module accepts an IMAP, POP3 or SMTP client, asks an HTTP authentication server where that user’s real mailbox lives, and then proxies the session to the backend, copying bytes in both directions. That proxying code is older than most of nginx and has its own event handlers, buffers and state machines for each protocol, which is where this bug lives. F5 describes the trigger only as “undisclosed traffic” causing a use-after-free in a worker, and names remote code execution as a potential impact on systems where ASLR is disabled or bypassed; “there is no control plane exposure; this is a data plane issue only”.

What is public is the fix set. Debian’s tracker lists five commits on the release-1.30.7 branch for this CVE and Ubuntu lists ten, from 9e811a43 to 1d1d861a, with a note that the last one mirrors a change to ngx_mail_smtp_block_reading() that exists only in nginx 1.18 and later. Ten commits for one CVE means the problem was a pattern rather than a single line, and that the module’s handling of a connection that is being torn down while an event is still pending needed fixing in several places. The distributions backported all of them. It is one of ten security fixes in nginx 1.31.9 and 1.30.7, released on 18 November 2026 and announced by F5 the same day; this site covers each CVE on its own page and lists the siblings under Related reading.

The attacker’s position is the weakest in the batch: a mail listener is meant to be reached by arbitrary clients, the bug fires before authentication, and the mail proxy module is not something an operator can usually turn off for a while, because it is the reason that nginx exists on that host. That is why Red Hat went to Critical despite the CVSS 3.1 8.1, and why F5’s only workaround is to restrict the listeners to trusted networks, which for a public mail service means the fix is the upgrade.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 30 November 2026; the link in the row is the tracker page, which will be newer than this one. Only nginx instances with a configured mail block are affected, whatever the package version.

DistributionStatusFixed package
Debian bookworm, trixie, forkyFixedbookworm 1.22.1-9+deb12u11 (DLA-4918-1); trixie 1.26.3-3+deb13u11 (DSA-6642-1); forky 1.30.6-4, sid 1.30.6-6
Ubuntu 20.04 to 26.04 and ESMFixed (priority high, USN-9159-1, 19 November 2026)jammy 1.18.0-6ubuntu14.23, noble 1.24.0-2ubuntu7.20, resolute 1.28.3-2ubuntu1.13, stonking 1.30.4-7ubuntu1.2; focal 1.18.0-0ubuntu1.7+esm5 and bionic 1.14.0-0ubuntu1.11+esm6 under ESM; xenial 1.10.3-0ubuntu0.16.04.5+esm11 and trusty 1.4.6-1ubuntu3.9+esm10 under legacy ESM
RHEL, Rocky, AlmaFixed (rated Critical, 8.1)RHEL 10.3 nginx-1.26.3-16.el10_3.3 (RHSA-2026:100744) and the RHEL 8, 9, 9.x EUS/E4S and 10.x EUS errata of 20 November 2026 (RHSA-2026:100745 to 100822); Red Hat Hardened Images nginx-main-1.30.7 (RHSA-2026:100838)
AlpineNot readthe Alpine tracker returned an error for this page; Alpine’s nginx package follows upstream mainline closely, so 1.31.9 or a patched 1.30.x is what to look for
Fedora, openSUSE, ArchNot consultedtrackers not read for this page
nginx.org packages, Docker nginx image, self-built binaries, OpenResty and other forksAffected below the fixed versionsnginx.org 1.31.9 or 1.30.7; the official Docker image tags 1.31.9 and 1.30.7; forks need a release built on 1.30.7 or later

How to check

Three questions, in order: is the running binary older than the fix, is the mail module built and loaded, and is there a mail block with a listener. The third one is what almost every nginx answers “no” to.

# 1. the version that is actually running
nginx -v 2>&1
ps -o pid,lstart,args -C nginx | head -3
# affected: every release below 1.31.9 / 1.30.7 (distribution builds: compare with the table above)

# 2. is the mail module even present?
nginx -V 2>&1 | grep -oE -- '--with-mail(=dynamic)?'
ls /etc/nginx/modules-enabled/ 2>/dev/null | grep -i mail        # Debian / Ubuntu dynamic module
nginx -T 2>/dev/null | grep -nE '^\s*load_module\s.*mail'

# 3. is a mail proxy configured, and on which ports?
nginx -T 2>/dev/null | grep -nE '^\s*(mail\s*\{|protocol\s+(imap|pop3|smtp)|auth_http\s)'
ss -ltnp | grep nginx | grep -E ':(25|110|143|465|587|993|995)\b'

A fixed version in step 1 with a start time after the upgrade means you are done. Step 2 printing nothing means the module is not built or not loaded and the code cannot run. Step 3 is the real test: a mail block with auth_http and listeners on the mail ports is the vulnerable configuration, and those ports are usually open to the world because that is what a mail service is.

A triggered free crashes the worker. Look for workers exiting on a signal since the advisory, and correlate with the mail error log if you keep one separately.

grep -hE 'worker process [0-9]+ exited on signal (11|6)' /var/log/nginx/error.log* 2>/dev/null | tail
grep -hE 'mail|imap|pop3|smtp' /var/log/nginx/error.log* 2>/dev/null | grep -iE 'upstream|client.*closed|crash' | tail

A worker segmentation fault on a host whose only nginx job is mail proxying is this bug until shown otherwise. Each crash drops every mail session that worker held, which clients notice; repeated crashes are someone probing, and on a host with ASLR the damage is the outage rather than a shell.

How to fix it

Upgrade the package and restart nginx. Mail sessions are long-lived, so prefer the USR2 binary upgrade, which starts a new master on the new binary and lets old workers finish their sessions.

# Debian / Ubuntu
apt update && apt install --only-upgrade nginx
# RHEL family (module streams: dnf update nginx:1.26)
dnf update nginx
# Alpine
apk upgrade nginx
# nginx.org repository or self-built: install 1.31.9 (mainline) or 1.30.7 (stable)

# a new binary is not running until the master re-executes or restarts
nginx -t && systemctl restart nginx          # or: kill -USR2 $(cat /run/nginx.pid) for a zero-downtime binary upgrade
nginx -v                                     # must print the fixed version
ps -o pid,lstart,args -C nginx | head -3     # start time must be after the upgrade

F5’s workaround is “restrict listeners to trusted networks”. For an internal mail proxy that is straightforward; for a public one it is not possible, and the upgrade is the only mitigation. Where it is possible, do it at the firewall rather than in nginx, so a crash cannot reopen the port.

# allow the mail ports only from the client networks that need them (nftables example)
nft add rule inet filter input ip saddr { 10.0.0.0/8, 192.168.0.0/16 } tcp dport { 25, 110, 143, 465, 587, 993, 995 } accept
nft add rule inet filter input tcp dport { 25, 110, 143, 465, 587, 993, 995 } drop
ss -ltnp | grep nginx          # confirm the listeners are the ones you meant

Do not reload instead of restarting: nginx -s reload re-reads the configuration with the same old binary. And do not conclude that an nginx with the mail module compiled in is affected; the module has to be loaded and a mail block configured before any of this code runs.

Sources

  • CVE-2026-113425 at CVE.org — the F5 CNA record (18 November 2026): description, affected ranges for NGINX Open Source and NGINX Plus, CVSS 4.0 and 3.1 vectors, CWE-416
  • NVD entry — Modified; F5’s scores; CPE ranges for the other F5 products that bundle NGINX
  • F5 advisory K000163931 — the vendor advisory the record cites (the page renders only in a browser, so its contents are taken from the CVE record and from nginx.org below)
  • nginx.org security advisories — the affected and fixed version ranges for every CVE in the batch, and nginx CHANGES for the 1.31.9 entry of 18 November 2026
  • Distribution trackers: Debian · Ubuntu · Red Hat; USN-9159-1, DSA-6642-1, DLA-4918-1
  • EPSS score for this CVE, 29 November 2026

Related reading

This advisory page was assembled from the primary sources listed above on 30 November 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.