CVE-2025-1097 ingress-nginx controller - configuration injection via unsanitized auth-tls-match-cn annotation

High 8.8 Published Updated

Attackers can inject nginx configuration via annotations to execute arbitrary code and read cluster secrets in ingress-nginx.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-1097?

CVE-2025-1097 is a high-severity code injection vulnerability in kubernetes ingress-nginx, published on 24 Mar 2025. Any signed-in user can exploit it over the network, with no action from the victim.

Official 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

Which versions are affected by CVE-2025-1097?

5 open source packages ship an affected version, including k8s.io/ingress-nginx.

PackageAffectedFixed in
k8s.io/ingress-nginx GoAll versionsNone
k8s.io/ingress-nginx GoAll versions1.11.5
k8s.io/ingress-nginx GoAll versions1.11.5
k8s.io/ingress-nginx GoFrom 1.12.0-beta.01.12.1
k8s.io/ingress-nginx GoFrom 1.12.0-beta.01.12.1

How do I fix CVE-2025-1097?

Upgrade k8s.io/ingress-nginx to a fixed version for your release line: 1.11.5 or 1.12.1.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2025-1097 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-1097 exists.

Public exploit code: 1 Exploit-DB entry, 1 Nuclei template and 2 proofs of concept on GitHub.

Sources

Also known as GHSA-823x-fv5p-h7hw, GO-2025-3565, MINI-45p2-p5rg-8m87, MINI-69mc-p3wc-qx7v, MINI-89f9-gcxp-3fg6, MINI-fcj4-p9c9-8fp8 and 6 more.

Is CVE-2025-1097 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free