Heap-based Buffer Overflow Affecting nginx package, versions [0.6.27,1.30.1)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
68.05% (100th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Heap-based Buffer Overflow vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-NGINX-16679754
  • published14 May 2026
  • disclosed13 May 2026
  • creditZhenpeng (Leo) Lin

Introduced: 13 May 2026

CVE-2026-42945  (opens in a new tab)
CWE-122  (opens in a new tab)

How to fix?

Upgrade nginx to version 1.30.1 or higher.

Overview

Affected versions of this package are vulnerable to Heap-based Buffer Overflow in the ngx_http_rewrite_module process when a rewrite directive is followed by a rewrite, if, or set directive and an unnamed Perl-Compatible Regular Expression (PCRE) capture (such as $1, $2) is used with a replacement string containing a question mark (?). An attacker can cause a heap buffer overflow in the worker process, potentially leading to process restart or, if Address Space Layout Randomization (ASLR) is disabled, arbitrary code execution by sending specially crafted HTTP requests. This is only exploitable if ASLR is disabled for code execution to occur.

CVSS Base Scores

version 4.0
version 3.1