CVE-2026-78689
nicheOut-of-bounds write in NGINX JavaScript (njs) XML module allows unauthenticated DoS
NGINX JavaScript (njs), the scripting engine for NGINX, contains a heap out-of-bounds write (CWE-122) in the XML module's namespace prefix list parser, reachable through the xml.exclusiveC14n() method when an NGINX configuration passes an externally controlled XML namespace prefix list to it; the flaw is rated 9.2 critical in CVSS v4.0. An unauthenticated remote attacker can trigger it by supplying a crafted prefix list, most notably by sending a crafted SAML Response, Assertion, LogoutRequest, or LogoutResponse to the official nginxinc/nginx-saml reference implementation, which reads InclusiveNamespaces/@PrefixList from untrusted SAML messages and passes it to xml.exclusiveC14n() before the signature is verified, so no valid SAML signature is required. Under the default njs engine (used when the js_engine directive is absent), the out-of-bounds write corrupts adjacent heap objects and crashes the NGINX worker, while under the QuickJS (qjs) engine it additionally leaks the prefix list on every invocation, driving worker memory growth; code execution has not been demonstrated but cannot be ruled out. Any NGINX deployment whose configuration calls xml.exclusiveC14n() with attacker-controlled data on either engine is affected, and the issue is data-plane only with no control-plane exposure. Exploitation has not been observed: no public proof-of-concept is known, the flaw is not in CISA KEV, and EPSS estimates roughly a 0.5% probability of exploitation within 30 days.
What to do: Audit NGINX configurations for njs usage that calls xml.exclusiveC14n() with externally supplied data - most notably the nginxinc/nginx-saml reference implementation, which feeds untrusted SAML InclusiveNamespaces/@PrefixList in before signature verification - and upgrade njs (both njs and qjs engines) to the vendor-patched release per F5's security advisory, noting that End-of-Technical-Support versions are not evaluated. Until patched, mitigate by hard-coding or validating the prefix list rather than accepting it from untrusted messages, and monitor for repeated NGINX worker crashes (default njs engine) or steadily growing worker memory (QuickJS engine) as indicators of attempted exploitation.
| F5 (NGINX) NGINX JavaScript (njs) - XML module via xml.exclusiveC14n(); affects both the njs engine (default when js_engine is abse | — |
| F5 (NGINX) nginxinc/nginx-saml (official NGINX SAML reference implementation) when it passes InclusiveNamespaces/@PrefixList from u | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Description NGINX JavaScript (njs) has a vulnerability in the XML module's namespace prefix list parser, reachable through the xml.exclusiveC14n() method. An unauthenticated remote attacker can trigger it when an affected NGINX configuration passes an externally controlled XML namespace prefix list to that method. Both the njs and the QuickJS (qjs) engines are affected. A crafted prefix list causes an out-of-bounds write past the end of a heap allocation. With the njs engine, which is the engine used when the js_engine directive is absent, this corrupts adjacent objects and crashes the NGINX worker. With the QuickJS engine, the same call additionally leaks the prefix list on every invocation, causing worker memory to grow across requests. The official nginxinc/nginx-saml reference implementation is affected during SAML signature verification. It reads InclusiveNamespaces/@PrefixList from an untrusted SAML message and passes it to xml.exclusiveC14n() before the signature has been verified, so a valid SAML signature is not required. A crafted SAML Response, Assertion, LogoutRequest, or LogoutResponse is sufficient. Code execution has not been demonstrated and cannot be ruled out for all platforms, as the effect of the out-of-bounds write depends on conditions beyond the attacker's control. Impact This vulnerability allows remote attackers to cause a denial of service on the NGINX system, either through repeatable worker restarts or through worker memory growth or possibly trigger 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.
- Weakness
- CWE-122
- Vector
- CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
In the news0 stories
No ingested article mentions this CVE yet.