CVE-2021-23017 Memory corruption in Nginx Web Server, Nginx Plus

High 7.7 Published Updated

An attacker forging DNS UDP packets can trigger a 1-byte memory overwrite in Nginx resolver, causing worker crashes or potential code execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-23017?

CVE-2021-23017 is a high-severity memory corruption vulnerability in Fedoraproject Fedora, published on 1 Jun 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A security issue in nginx resolver was identified, which might allow an attacker who is able to forge UDP packets from the DNS server to cause 1-byte memory overwrite, resulting in worker process crash or potential other impact.

Weakness: CWE-193

Which versions are affected by CVE-2021-23017?

2 open source packages ship an affected version, including nginx and nginx-gateway. It affects 13 products.

PackageAffectedFixed in
nginx BitnamiFrom 0.6.181.20.1
nginx-gateway BitnamiFrom 0.6.181.20.1
Linux distribution packages (38)
nginx AlmaLinux:8All versions1:1.16.1-2.module_el8.4.0+2470+68135136.1.alma
nginx AlmaLinux:8All versions1:1.16.1-2.module_el8.5.0+35+6a1225c3.1.alma
nginx AlmaLinux:8All versions1:1.18.0-3.module_el8.4.0+2472+f736ed63.1.alma
nginx AlmaLinux:8All versions1:1.18.0-3.module_el8.5.0+36+48437aab.1.alma
nginx AlmaLinux:8All versions1:1.20.1-1.module_el8.5.0+2611+ab304644.alma
nginx AlmaLinux:8All versions1:1.20.1-1.module_el8.6.0+2782+a022aca3.alma
nginx-all-modules AlmaLinux:8All versions1:1.16.1-2.module_el8.4.0+2470+68135136.1.alma
nginx-all-modules AlmaLinux:8All versions1:1.18.0-3.module_el8.4.0+2472+f736ed63.1.alma
nginx-all-modules AlmaLinux:8All versions1:1.20.1-1.module_el8.5.0+2611+ab304644.alma
nginx-all-modules AlmaLinux:8All versions1:1.20.1-1.module_el8.6.0+2782+a022aca3.alma
nginx-filesystem AlmaLinux:8All versions1:1.16.1-2.module_el8.4.0+2470+68135136.1.alma
nginx-filesystem AlmaLinux:8All versions1:1.18.0-3.module_el8.4.0+2472+f736ed63.1.alma
nginx-filesystem AlmaLinux:8All versions1:1.20.1-1.module_el8.5.0+2611+ab304644.alma
nginx-filesystem AlmaLinux:8All versions1:1.20.1-1.module_el8.6.0+2782+a022aca3.alma
nginx-mod-http-image-filter AlmaLinux:8All versions1:1.16.1-2.module_el8.4.0+2470+68135136.1.alma
nginx-mod-http-image-filter AlmaLinux:8All versions1:1.16.1-2.module_el8.5.0+35+6a1225c3.1.alma
nginx-mod-http-image-filter AlmaLinux:8All versions1:1.18.0-3.module_el8.4.0+2472+f736ed63.1.alma
nginx-mod-http-image-filter AlmaLinux:8All versions1:1.18.0-3.module_el8.5.0+36+48437aab.1.alma
nginx-mod-http-image-filter AlmaLinux:8All versions1:1.20.1-1.module_el8.5.0+2611+ab304644.alma
nginx-mod-http-image-filter AlmaLinux:8All versions1:1.20.1-1.module_el8.6.0+2782+a022aca3.alma
nginx-mod-http-perl AlmaLinux:8All versions1:1.16.1-2.module_el8.4.0+2470+68135136.1.alma
nginx-mod-http-perl AlmaLinux:8All versions1:1.16.1-2.module_el8.5.0+35+6a1225c3.1.alma
nginx-mod-http-perl AlmaLinux:8All versions1:1.18.0-3.module_el8.4.0+2472+f736ed63.1.alma
nginx-mod-http-perl AlmaLinux:8All versions1:1.18.0-3.module_el8.5.0+36+48437aab.1.alma
nginx-mod-http-perl AlmaLinux:8All versions1:1.20.1-1.module_el8.5.0+2611+ab304644.alma
nginx-mod-http-perl AlmaLinux:8All versions1:1.20.1-1.module_el8.6.0+2782+a022aca3.alma
nginx-mod-http-xslt-filter AlmaLinux:8All versions1:1.16.1-2.module_el8.4.0+2470+68135136.1.alma
nginx-mod-http-xslt-filter AlmaLinux:8All versions1:1.16.1-2.module_el8.5.0+35+6a1225c3.1.alma
nginx-mod-http-xslt-filter AlmaLinux:8All versions1:1.18.0-3.module_el8.4.0+2472+f736ed63.1.alma
nginx-mod-http-xslt-filter AlmaLinux:8All versions1:1.18.0-3.module_el8.5.0+36+48437aab.1.alma
nginx-mod-http-xslt-filter AlmaLinux:8All versions1:1.20.1-1.module_el8.5.0+2611+ab304644.alma
nginx-mod-http-xslt-filter AlmaLinux:8All versions1:1.20.1-1.module_el8.6.0+2782+a022aca3.alma
nginx-mod-mail AlmaLinux:8All versions1:1.16.1-2.module_el8.4.0+2470+68135136.1.alma
nginx-mod-mail AlmaLinux:8All versions1:1.16.1-2.module_el8.5.0+35+6a1225c3.1.alma
nginx-mod-mail AlmaLinux:8All versions1:1.18.0-3.module_el8.4.0+2472+f736ed63.1.alma
nginx-mod-mail AlmaLinux:8All versions1:1.18.0-3.module_el8.5.0+36+48437aab.1.alma
nginx-mod-mail AlmaLinux:8All versions1:1.20.1-1.module_el8.5.0+2611+ab304644.alma
nginx-mod-mail AlmaLinux:8All versions1:1.20.1-1.module_el8.6.0+2782+a022aca3.alma

Products include F5 Nginx, Fedoraproject Fedora, Netapp Ontap Select Deploy Administration Utility, Openresty Openresty, Oracle Blockchain Platform, Oracle Communications Control Plane Monitor and 7 more.

How do I fix CVE-2021-23017?

Upgrade nginx to 1.20.1 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-23017 being exploited?

There is no known exploitation of CVE-2021-23017 in the wild and no public exploit code.

Public exploit code: 1 Exploit-DB entry and 9 proofs of concept on GitHub.

All Fedoraproject Fedora vulnerabilities

Sources

Also known as ALPINE-CVE-2021-23017, ALSA-2021:2259, ALSA-2021:2290, ALSA-2022:0323, BIT-nginx-2021-23017, BIT-nginx-gateway-2021-23017 and 33 more.

Is CVE-2021-23017 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free