CVE-2026-42533: NGINX Map Directive and Regex Matching Vulnerability

nginx Updated 21 Jul 2026

Summary

20/07/2026
Yes i
Critical
Not published

CVE-2026-42533: NGINX Map directive and Regex matching vulnerability. Affects nginx across 2 version ranges.

>= 0.9.6, < 1.30.4 >= 1.31.2, < 1.31.3

Fixed in 1.30.4 or 1.31.3, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2026-42533 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

NGINX is a high-performance web server and reverse proxy server known for its stability, rich feature set, and low resource consumption. It is widely used for serving static content, load balancing, and handling high traffic loads. However, NGINX is susceptible to vulnerabilities, including CVE-2026-42533, which affects its map directive when using regex matching.

Vulnerability Detail

A vulnerability exists in NGINX Plus and NGINX Open Source related to the map directive that uses regex matching. This occurs when a string expression references the map's regex capture variables before referencing the map output variable. An unauthenticated attacker can exploit this vulnerability by sending crafted HTTP requests, potentially leading to a heap buffer overflow in the NGINX worker process. This may cause the NGINX system to restart or allow code execution on systems with Address Space Layout Randomization (ASLR) disabled.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 0.9.6, < 1.30.4 1.30.4
  • >= 1.31.2, < 1.31.3 1.31.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, avoid using regex capture variables in string expressions before referencing the map output variable. Review your NGINX configuration for any instances of this pattern and modify them accordingly.

Conclusion

CVE-2026-42533 is a critical vulnerability in NGINX that can lead to severe consequences if not addressed. It is essential to update to the patched versions or implement the recommended workarounds to mitigate the risks associated with this vulnerability.

See every vulnerability recorded for nginx →

Share this vulnerability

FAQ

CVE-2026-42533 is a vulnerability in NGINX that affects the map directive when using regex matching, potentially leading to a denial-of-service or code execution.

Check your NGINX version against the fixed versions: 1.30.4 and 1.31.3. If you are using an earlier version, you are at risk.

Exploitation of this vulnerability may lead to a denial-of-service (DoS) condition or allow remote code execution on vulnerable systems.

Yes, you can use Vulert, which monitors open-source vulnerabilities in your software by analyzing a manifest file like package-lock.json. You can check your application for this vulnerability using the Vulert playground.

If an immediate update is not possible, implement the suggested workaround by avoiding the use of regex capture variables in your NGINX configuration.

Related vulnerabilities

Recent vulnerabilities recorded for nginx.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 0.9.6, < 1.30.4 1.30.4
  • >= 1.31.2, < 1.31.3 1.31.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback