ZeroHour

CVE-2025-1097

large

Config Injection RCE in Kubernetes ingress-nginx via auth-tls-match-cn annotation

CVSS 3.1
8.8 high
EPSS
36%p98
Published
()
Modified
AI analysis

CVE-2025-1097 is a configuration injection flaw (CWE-20) in the Kubernetes ingress-nginx controller: values of the auth-tls-match-cn Ingress annotation are not properly sanitized, so an attacker who can create or modify Ingress resources can inject arbitrary nginx configuration directives. On configuration reload, the injected directives are interpreted by nginx, which can be escalated to arbitrary code execution in the context of the ingress-nginx controller. An attacker with code execution in the controller can also read Secrets accessible to it, and in a default installation the controller can access all Secrets cluster-wide, enabling broader cluster compromise. Any cluster running a vulnerable ingress-nginx controller is affected, with the greatest risk where untrusted or multi-tenant users hold rights to apply Ingress annotations or where controller pods are internet-exposed. Per the available data there is no confirmed in-the-wild exploitation or public PoC yet, but EPSS assigns a 35.5% probability of exploitation within 30 days (98th percentile), and the flaw is part of the "IngressNightmare" group of bugs reported to affect roughly 40% of cloud environments.

What to do: Upgrade ingress-nginx controllers to the latest release containing the IngressNightmare fixes and restart/verify the controller deployment. Until patched, restrict RBAC permissions for creating or modifying Ingress resources (especially the auth-tls-match-cn annotation) to trusted administrators, avoid exposing controller pods directly to the internet, and review which Secrets the controller service account can read.

Affected
kubernetes ingress-nginx
Estimated exposure
large~hundreds of thousands of clusters (ingress-nginx reported in ~40% of cloud environments; ~6,800 controllers directly internet-exposed in public scans) — Based on widely reported deployment data showing ingress-nginx in roughly 40% of cloud environments (it is the most-used Kubernetes ingress controller), with public internet scans showing thousands of directly exposed controllers, the…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-tls-match-cn` Ingress annotation can be used to inject configuration into nginx. This can lead to arbitrary code execution in the context of the ingress-nginx controller, and disclosure of Secrets accessible to the controller. (Note that in the default installation, the controller can access all Secrets cluster-wide.)

Weakness
CWE-20
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the news