NGINX map directive and regex matching vulnerability
What fixes it
- 37.1.0.1NGINX PlusCVE List
- 37.0.5.1NGINX PlusCVE List
- 1.31.7NGINX Open SourceCVE List
- 1.30.6NGINX Open SourceCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Vendor and government advisories 1
Vendors that say their products are affected, and agencies that issued alerts. Check each for the fixed release of the product you run.
Reports 3
3 outlets mention it. Reports are not confirmation; each links to its source.
Description
A vulnerability exists in NGINX Plus and NGINX Open Source when a map directive uses regex matching and the root directive or access log format references the map's regex capture variables before referencing the map output variable. Alternatively, the same result could be achieved by using a non-cacheable variable in a string expression under certain conditions. An unauthenticated attacker along with conditions beyond their control can exploit this vulnerability by sending crafted HTTP requests. This may cause a heap buffer overflow in the NGINX worker process leading to a restart. Additionally, attackers can execute code on systems with Address Space Layout Randomization (ASLR) disabled or when the attacker can bypass ASLR.
Impact: This vulnerability may allow remote attackers to cause a denial-of-service (DoS) on the NGINX system or to possibly trigger a code execution. There is no control plane exposure; this is a data plane issue only.
Note: Software versions which have reached End of Technical Support (EoTS) are not evaluated.
Text from CVE List
Affected versions 8
- NGINX Plusaffected: 37.1.0 before 37.1.0.1CVE List
- NGINX Plusaffected: 37.0.0 before 37.0.5.1CVE List
- NGINX Plusaffected: R36 and laterCVE List
- NGINX Plusaffected: R35 and laterCVE List
- NGINX Plusaffected: R34 and laterCVE List
- NGINX Plusaffected: R33 and laterCVE List
- NGINX Open Sourceaffected: 1.31.2 before 1.31.7CVE List
- NGINX Open Sourceaffected: 1.30.0 before 1.30.6CVE List