CVE-2026-78689 in NGINX JavaScriptinfo

Summary

by MITRE • 09/02/2026

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.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 09/02/2026

The vulnerability identified in NGINX JavaScript, commonly referred to as njs, represents a critical security flaw within the XML module's namespace prefix list parser. This issue is specifically triggered through the xml.exclusiveC14n() method, which is designed for canonicalizing XML documents according to the Exclusive C14N standard. The root cause lies in an improper validation of input data passed by external sources into this function. When a configuration directs njs or its alternative engine, QuickJS (qjs), to process an externally controlled XML namespace prefix list without adequate bounds checking, it results in an out-of-bounds write operation. This memory corruption occurs past the end of a heap allocation, leading to undefined behavior that can destabilize the entire NGINX worker process. The flaw affects both the primary njs engine and the QuickJS engine, indicating a systemic issue within how these JavaScript engines handle specific XML parsing operations in this context.

The operational impact of this vulnerability is severe, primarily manifesting as a denial of service against the affected NGINX system. For configurations utilizing the standard njs engine, which is employed when the js_engine directive is not explicitly set to QuickJS, the out-of-bounds write corrupts adjacent objects in memory. This corruption inevitably leads to a crash of the NGINX worker process, forcing it to restart and causing service interruption for clients relying on that specific worker. In scenarios where the QuickJS engine is active, the consequences are twofold: while the same heap corruption occurs, there is an additional side effect where the prefix list data is leaked onto the memory stack with every invocation. This leakage causes continuous growth in worker memory usage across multiple requests, leading to resource exhaustion and eventual system instability or crash due to insufficient available memory.

A particularly dangerous aspect of this vulnerability is its potential for exploitation via unauthenticated remote attackers without requiring a valid cryptographic signature. The official nginxinc/nginx-saml reference implementation serves as a prime example of high-risk exposure. During the SAML authentication flow, this module reads the InclusiveNamespaces/@PrefixList attribute from an incoming SAML message and passes it directly to xml.exclusiveC14n() prior to verifying the digital signature attached to the message. Because the canonicalization step precedes signature verification, an attacker can craft a malicious SAML Response, Assertion, LogoutRequest, or LogoutResponse that exploits this flaw without needing valid credentials or signed data. This bypass of authentication checks significantly lowers the barrier for entry, allowing any remote actor with network access to trigger the vulnerability.

While the immediate and demonstrated impact is denial of service through worker crashes or memory exhaustion, security experts cannot rule out the possibility of arbitrary code execution. The nature of heap-based buffer overflows often allows attackers to manipulate adjacent memory structures in ways that can lead to control flow hijacking, depending on the specific platform architecture, compiler optimizations, and runtime conditions at the time of exploitation. Although no public proof-of-concept for remote code execution has been widely confirmed across all environments, the theoretical risk remains high due to the fundamental nature of writing past allocated heap boundaries. This aligns with Common Weakness Enumeration (CWE) standards, specifically CWE-787: Out-of-bounds Write, which describes writing data outside the bounds of a buffer, potentially leading to code execution or system crash.

From an ATT&CK perspective, this vulnerability facilitates initial access and persistence through denial of service tactics if exploited for disruption, though more sophisticated exploitation could lead to command execution under CWE-94: Improper Control of Generation of Code (Code Injection). The attack vector is classified as Network-based with Low complexity, requiring no user interaction or authentication. To mitigate this risk, organizations must immediately update NGINX and the njs module to versions that include patches for this specific heap corruption issue. For users relying on the nginxinc/nginx-saml reference implementation, it is critical to ensure that signature verification occurs before any canonicalization operations involving untrusted input data are performed. Additionally, implementing strict input validation and limiting the size of namespace prefix lists can provide a layer of defense-in-depth against similar parsing vulnerabilities in other XML processing libraries.

Responsible

F5

Reservation

08/26/2026

Disclosure

09/02/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!