{"id":"CVE-2026-9256","state":"PUBLISHED","title":"NGINX ngx_http_rewrite_module vulnerability","description":"NGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_rewrite_module module. This vulnerability exists when a rewrite directive uses a regex pattern with distinct, overlapping Perl-Compatible Regular Expression (PCRE) captures (for example, ^/((.*))$) and a replacement string that references multiple such captures (for example, $1$2) in a redirect or arguments context. 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. \n\n\nNote: Software versions which have reached End of Technical Support (EoTS) are not evaluated.","publishedAt":"2026-05-22T14:11:41.877Z","updatedAt":"2026-08-25T12:05:55.163Z","severity":{"score":9.2,"label":"Critical","version":"4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","source":"f5"},"assigner":"f5","products":["F5 NGINX Plus","F5 NGINX Open Source"],"affected":[{"vendor":"F5","product":"NGINX Plus","defaultStatus":"unknown","versions":[{"version":"37.0","status":"affected","lessThan":"37.0.1.1","versionType":"custom"},{"version":"R36","status":"affected","lessThan":"R36 P5","versionType":"custom"},{"version":"R32","status":"affected","lessThan":"R32 P7","versionType":"custom"}],"modules":["ngx_http_rewrite_module"]},{"vendor":"F5","product":"NGINX Open Source","defaultStatus":"unaffected","versions":[{"version":"1.31.0","status":"affected","lessThan":"1.31.1","versionType":"custom"},{"version":"1.30.0","status":"affected","lessThan":"1.30.2","versionType":"custom"},{"version":"0.1.17","status":"affected","lessThanOrEqual":"0.9.7","versionType":"custom"}],"modules":["ngx_http_rewrite_module"]}],"references":["https://my.f5.com/manage/s/article/K000161377","http://www.openwall.com/lists/oss-security/2026/05/22/14","https://lists.debian.org/debian-lts-announce/2026/06/msg00023.html","https://access.redhat.com/security/cve/CVE-2026-9256","https://bugzilla.redhat.com/show_bug.cgi?id=2480746","https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-9256.json","https://access.redhat.com/errata/RHSA-2026:29874","https://access.redhat.com/errata/RHSA-2026:28921","https://access.redhat.com/errata/RHSA-2026:28212","https://access.redhat.com/errata/RHSA-2026:28973","https://access.redhat.com/errata/RHSA-2026:29151","https://access.redhat.com/errata/RHSA-2026:33313","https://access.redhat.com/errata/RHSA-2026:20351","https://access.redhat.com/errata/RHSA-2026:44481","https://access.redhat.com/errata/RHSA-2026:58981"],"weaknesses":["CWE-122"],"ingestedAt":"2026-10-29T20:13:52.441Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/9xxx/CVE-2026-9256.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-9256","state":"PUBLISHED","datePublished":"2026-05-22T14:11:41.877Z","dateUpdated":"2026-08-25T12:05:55.163Z","assignerShortName":"f5","assignerOrgId":"9dacffd4-cb11-413f-8451-fbbfd4ddc0ab","dateReserved":"2026-05-21T20:58:58.484Z"},"containers":{"cna":{"title":"NGINX ngx_http_rewrite_module vulnerability","descriptions":[{"lang":"en","value":"NGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_rewrite_module module. This vulnerability exists when a rewrite directive uses a regex pattern with distinct, overlapping Perl-Compatible Regular Expression (PCRE) captures (for example, ^/((.*))$) and a replacement string that references multiple such captures (for example, $1$2) in a redirect or arguments context. 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. \n\n\nNote: Software versions which have reached End of Technical Support (EoTS) are not evaluated."}],"affected":[{"vendor":"F5","product":"NGINX Plus","defaultStatus":"unknown","versions":[{"version":"37.0","status":"affected","lessThan":"37.0.1.1","versionType":"custom"},{"version":"R36","status":"affected","lessThan":"R36 P5","versionType":"custom"},{"version":"R32","status":"affected","lessThan":"R32 P7","versionType":"custom"}],"modules":["ngx_http_rewrite_module"]},{"vendor":"F5","product":"NGINX Open Source","defaultStatus":"unaffected","versions":[{"version":"1.31.0","status":"affected","lessThan":"1.31.1","versionType":"custom"},{"version":"1.30.0","status":"affected","lessThan":"1.30.2","versionType":"custom"},{"version":"0.1.17","status":"affected","lessThanOrEqual":"0.9.7","versionType":"custom"}],"modules":["ngx_http_rewrite_module"]}],"references":[{"url":"https://my.f5.com/manage/s/article/K000161377","tags":["vendor-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseSeverity":"HIGH","baseScore":8.1,"vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"version":"4.0","attackVector":"NETWORK","attackComplexity":"HIGH","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"NONE","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","baseSeverity":"CRITICAL","baseScore":9.2,"vectorString":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-122","lang":"en","description":"CWE-122 Heap-based Buffer Overflow","type":"CWE"}]}],"providerMetadata":{"shortName":"f5","orgId":"9dacffd4-cb11-413f-8451-fbbfd4ddc0ab","dateUpdated":"2026-05-28T18:20:47.449Z"},"datePublic":"2026-05-22T14:00:00.000Z","tags":["x_F5"],"credits":[{"lang":"en","value":"\"F5 acknowledges Mufeed VH of Winfunc Research, Nebula Security (@nebusecurity), and Vexera AI for bringing this issue to our attention and following the highest standards of coordinated disclosure.\"","type":"reporter"}],"source":{"discovery":"EXTERNAL"},"x_generator":{"engine":"F5 SIRTBot v1.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-05-22T00:00:00+00:00","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3","id":"CVE-2026-9256"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-05-23T03:55:52.757Z"}},{"title":"CVE Program Container","references":[{"url":"http://www.openwall.com/lists/oss-security/2026/05/22/14"},{"url":"https://lists.debian.org/debian-lts-announce/2026/06/msg00023.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2026-06-18T05:35:40.986Z"}},{"title":"nginx: ngx_http_rewrite_module: code execution and denial of service","descriptions":[{"lang":"en","value":"A flaw was found in the ngx_http_rewrite_module module of NGINX. When a rewrite directive uses a regex pattern with distinct, overlapping Perl-Compatible Regular Expression (PCRE) captures and a replacement string that references multiple such captures in a redirect or arguments context, an unauthenticated attacker can send crafted HTTP requests and cause a heap-based buffer overflow in the worker process, potentially allowing code execution or a denial of service by forcing the process to restart."}],"affected":[{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","packageName":"nginx","defaultStatus":"affected","versions":[{"version":"2:1.26.3-6.el10_2.4","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/o:redhat:enterprise_linux:10.2"]},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","packageName":"nginx:1.24","defaultStatus":"affected","versions":[{"version":"8100020260611094050.489197e6","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:enterprise_linux:8"]},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","packageName":"nginx:1.24","defaultStatus":"affected","versions":[{"version":"9080020260610161820.9","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:enterprise_linux:9"]},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","packageName":"nginx","defaultStatus":"affected","versions":[{"version":"2:1.20.1-28.el9_8.3","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:enterprise_linux:9"]},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","packageName":"nginx:1.26","defaultStatus":"affected","versions":[{"version":"9080020260609152155.9","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:enterprise_linux:9"]},{"vendor":"Red Hat","product":"Red Hat Discovery 2","packageName":"discovery/discovery-ui-rhel9","defaultStatus":"affected","versions":[{"version":"1782756541","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:discovery:2::el9"]},{"vendor":"Red Hat","product":"Red Hat Hardened Images","packageName":"nginx-main","defaultStatus":"affected","versions":[{"version":"1.30.2-1.hum1","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:hummingbird:1"]},{"vendor":"Red Hat","product":"Red Hat Update Infrastructure 5","packageName":"rhui5/cds-kubernetes-rhel9","defaultStatus":"affected","versions":[{"version":"1784794818","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:rhui:5::el9"]},{"vendor":"Red Hat","product":"Red Hat Update Infrastructure 5","packageName":"rhui5/cds-rhel9","defaultStatus":"affected","versions":[{"version":"1784794778","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:rhui:5::el9"]},{"vendor":"Red Hat","product":"Red Hat Update Infrastructure 5","packageName":"rhui5/rhua-rhel9","defaultStatus":"affected","versions":[{"version":"1784795076","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:rhui:5::el9"]},{"vendor":"Red Hat","product":"Red Hat Update Infrastructure 5","packageName":"rhui5/cds-kubernetes-tp-rhel9","defaultStatus":"affected","versions":[{"version":"1787241211","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:rhui:5::el9"]},{"vendor":"Red Hat","product":"Red Hat Update Infrastructure 5","packageName":"rhui5/rhua-tp-rhel9","defaultStatus":"affected","versions":[{"version":"1787241260","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://catalog.redhat.com/software/containers/","cpes":["cpe:/a:redhat:rhui:5::el9"]},{"vendor":"Red Hat","product":"Red Hat Lightspeed proxy 1","packageName":"insights-proxy/insights-proxy-container-rhel9","defaultStatus":"affected","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/a:redhat:insights_proxy:1"]}],"references":[{"url":"https://access.redhat.com/security/cve/CVE-2026-9256","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2480746","name":"RHBZ#2480746","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-9256.json","tags":["x_sadp-csaf-vex"]},{"url":"https://access.redhat.com/errata/RHSA-2026:29874","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:28921","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:28212","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:28973","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:29151","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33313","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:20351","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:44481","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2026:58981","tags":["vendor-advisory","x_refsource_REDHAT"]}],"metrics":[{"other":{"content":{"namespace":"https://access.redhat.com/security/updates/classification/","value":"Important"},"type":"Red Hat severity rating"}},{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":8.1,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"format":"CVSS"}],"problemTypes":[{"descriptions":[{"cweId":"CWE-122","description":"Heap-based Buffer Overflow","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"redhat-SADP","orgId":"0b0ca135-0b70-47e7-9f44-1890c2a1c46c","dateUpdated":"2026-08-25T12:05:55.163Z"},"datePublic":"2026-05-22T14:11:41.877Z","solutions":[{"lang":"en","value":"RHSA-2026:29874: Red Hat Enterprise Linux AppStream (v. 10), Red Hat Enterprise Linux CodeReady Linux Builder (v. 10)"},{"lang":"en","value":"RHSA-2026:28921: Red Hat Enterprise Linux AppStream (v. 8)"},{"lang":"en","value":"RHSA-2026:28212: Red Hat Enterprise Linux AppStream (v. 9)"},{"lang":"en","value":"RHSA-2026:28973: Red Hat Enterprise Linux AppStream (v. 9), Red Hat Enterprise Linux CodeReady Linux Builder (v. 9)"},{"lang":"en","value":"RHSA-2026:29151: Red Hat Enterprise Linux AppStream (v. 9)"},{"lang":"en","value":"RHSA-2026:33313: Red Hat Discovery 2"},{"lang":"en","value":"RHSA-2026:20351: Red Hat Hardened Images"},{"lang":"en","value":"RHSA-2026:44481: Red Hat Update Infrastructure 5"},{"lang":"en","value":"RHSA-2026:58981: Red Hat Update Infrastructure 5"}],"timeline":[{"lang":"en","time":"2026-05-22T15:00:55.131Z","value":"Reported to Red Hat."},{"lang":"en","time":"2026-05-22T14:11:41.877Z","value":"Made public."}],"workarounds":[{"lang":"en","value":"To mitigate this vulnerability, use named captures instead of unnamed captures in rewrite definitions.\n\nFor example, the following rewrite directive uses unnamed PCRE capture groups, $1 and $2:\n\n~~~\nrewrite ^/users/([0-9]+)/profile/(.*)$ /profile.php?id=$1&tab=$2 last;\n~~~\n\nTo mitigate this vulnerability for this example, replace $1 and $2 with the appropriate named captures, $user_id and $section:\n\n~~~\nrewrite ^/users/(?<user_id>[0-9]+)/profile/(?<section>.*)$ /profile.php?id=$user_id&tab=$section last;\n~~~"}],"x_adpType":"supplier","x_generator":{"engine":"sadp-cli 1.0.0"}}]}}}