Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-11311

CVE-2026-11311: NGINX Gateway Fabric RCE Vulnerability

CVE-2026-11311 is a remote code execution vulnerability in NGINX Gateway Fabric allowing authenticated attackers to inject malicious NGINX directives. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-11311 Overview

CVE-2026-11311 is a configuration injection vulnerability in the NGINX configuration generator component of NGINX Gateway Fabric when NGINX Plus serves as the data plane. The flaw stems from unsanitized rendering of user-supplied string values from two Custom Resource Definitions (CRDs): the serverTokens field of the NginxProxy CRD and the extraAuthArgs field of the AuthenticationFilter CRD. An authenticated attacker with permission to create or modify these CRDs can inject arbitrary NGINX configuration directives into the generated configuration. The issue affects the control plane only and does not expose the data plane through the trigger itself.

Critical Impact

An authenticated Kubernetes user with CRD write access can inject arbitrary NGINX directives, compromising confidentiality and integrity of the gateway control plane configuration.

Affected Products

  • NGINX Gateway Fabric (when configured with NGINX Plus as the data plane)
  • NGINX Plus (as deployed by NGINX Gateway Fabric)
  • Kubernetes deployments using NginxProxy and AuthenticationFilter CRDs

Discovery Timeline

  • 2026-06-17 - CVE-2026-11311 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2026-11311

Vulnerability Analysis

The vulnerability is classified as Improper Neutralization of Equivalent Special Elements [CWE-76]. The NGINX Gateway Fabric configuration generator consumes string fields from two CRDs and writes them directly into NGINX configuration templates. Because the generator performs no sanitization or escaping, attacker-controlled content is treated as configuration syntax rather than data.

The attack requires authenticated access with Kubernetes RBAC permission to create or modify the affected CRDs. Successful injection enables arbitrary NGINX directives to execute within the generated configuration, with high impact to confidentiality and integrity of the control plane. Availability of the data plane is not directly affected by the trigger.

Root Cause

The root cause is missing input neutralization in the configuration generator. The serverTokens field of the NginxProxy CRD and the extraAuthArgs field of the AuthenticationFilter CRD are interpolated as raw strings into NGINX configuration templates. Without escaping of newline characters, semicolons, or NGINX-specific tokens, an attacker can break out of the intended directive context and append arbitrary directives. This is a classic template injection pattern where trusted template logic concatenates untrusted input.

Attack Vector

The attack vector is network-based but requires authenticated low-privilege Kubernetes access. The attacker submits a malicious NginxProxy or AuthenticationFilter resource containing crafted string values for serverTokens or extraAuthArgs. When NGINX Gateway Fabric reconciles the resource, the generator renders the attacker payload into the NGINX configuration. The injected directives then become part of the gateway's operational configuration, allowing the attacker to alter routing, logging, authentication, or proxy behavior. Refer to the F5 Support Article K000161611 for vendor technical details.

Detection Methods for CVE-2026-11311

Indicators of Compromise

  • Unexpected modifications to NginxProxy or AuthenticationFilter CRD instances containing newline characters, semicolons, or NGINX directive keywords in the serverTokens or extraAuthArgs fields.
  • Generated NGINX configurations containing directives that do not match the declared gateway routing intent.
  • Kubernetes audit log entries showing CREATE or UPDATE actions on the affected CRDs from non-administrative service accounts.

Detection Strategies

  • Enable Kubernetes audit logging for gateway.nginx.org API group resources and alert on writes to NginxProxy and AuthenticationFilter objects.
  • Validate rendered NGINX configurations against an allowlist of expected directives before reload.
  • Apply admission controller policies (OPA Gatekeeper, Kyverno) that reject CRD values containing control characters or directive separators.

Monitoring Recommendations

  • Monitor NGINX Gateway Fabric control plane pod logs for configuration reload events correlated with CRD changes.
  • Track Kubernetes RBAC grants that include create, update, or patch verbs on the affected CRDs and review them against least-privilege expectations.
  • Alert on any divergence between declared Gateway/HTTPRoute resources and the directives present in the rendered NGINX configuration.

How to Mitigate CVE-2026-11311

Immediate Actions Required

  • Restrict Kubernetes RBAC permissions on NginxProxy and AuthenticationFilter CRDs to a minimal set of trusted cluster administrators.
  • Audit existing NginxProxy and AuthenticationFilter resources for suspicious serverTokens or extraAuthArgs values and remediate any anomalies.
  • Apply the vendor-provided update referenced in F5 Support Article K000161611.

Patch Information

F5 has published remediation guidance in F5 Support Article K000161611. Software versions which have reached End of Technical Support are not evaluated and should be upgraded to a supported release that contains the fix.

Workarounds

  • Deploy an admission controller policy that rejects writes to NginxProxy.serverTokens and AuthenticationFilter.extraAuthArgs values containing newline characters, semicolons, curly braces, or NGINX directive keywords.
  • Limit CRD write access to a dedicated GitOps service account and require pull-request review for all changes to affected resources.
  • Disable use of the AuthenticationFilter CRD if it is not required by workloads served through NGINX Gateway Fabric.
bash
# Example Kyverno policy to block injection characters in affected CRD fields
kubectl apply -f - <<EOF
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: block-ngf-config-injection
spec:
  validationFailureAction: Enforce
  rules:
    - name: validate-serverTokens
      match:
        any:
          - resources:
              kinds: ["NginxProxy"]
      validate:
        message: "serverTokens must not contain injection characters"
        pattern:
          spec:
            serverTokens: "!*;*|*\n*|*{*|*}*"
EOF

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.