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

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

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Mar 2025
- **Updated:** 26 Feb 2026
- **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, MINI-hw9p-7pr7-46x9, MINI-jwq8-5gx8-x58f, MINI-m7fg-wxwp-xh5j, MINI-mxv2-9r37-769m, MINI-q33q-m362-5qg8, MINI-rp77-j343-6r84

## 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 (Improper Input Validation)

## Which versions are affected by CVE-2025-1097?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `k8s.io/ingress-nginx` | Go | All versions | None |
| `k8s.io/ingress-nginx` | Go | All versions | 1.11.5 |
| `k8s.io/ingress-nginx` | Go | All versions | 1.11.5 |
| `k8s.io/ingress-nginx` | Go | From 1.12.0-beta.0 | 1.12.1 |
| `k8s.io/ingress-nginx` | Go | From 1.12.0-beta.0 | 1.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.

## 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:

- This is a PoC code to exploit the IngressNightmare vulnerabilities (CVE-2025-1097, CVE-2025-1098, CVE-2025-24514, and CVE-2025-1974). (github_poc): https://github.com/hakaioffsec/IngressNightmare-PoC
- IngressNightmare-PoC： (CVE-2025-1097, CVE-2025-1098, CVE-2025-24514, CVE-2025-1974)  PoC ，One-click script 。 一键脚本  (github_poc): https://github.com/lufeirider/IngressNightmare-PoC
- Ingress-NGINX Admission Controller v1.11.1 - FD Injection to RCE (exploitdb)
- Ingress-Nginx Controller - Configuration Injection via Unsanitized `auth-tls-match-cn` Annotation (nuclei): http/cves/2025/CVE-2025-1097.yaml

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-1097 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-1097 exists.

Affected packages and fixed versions:
- k8s.io/ingress-nginx (Go): affected all versions; no fix listed
- k8s.io/ingress-nginx (Go): affected all versions; fixed in 1.11.5
- k8s.io/ingress-nginx (Go): affected all versions; fixed in 1.11.5
- k8s.io/ingress-nginx (Go): affected from 1.12.0-beta.0; fixed in 1.12.1
- k8s.io/ingress-nginx (Go): affected from 1.12.0-beta.0; fixed in 1.12.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-1097/ (Markdown: https://insights.sbomify.com/CVE-2025-1097/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-1097
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-1097
- OSV: https://osv.dev/vulnerability/CVE-2025-1097

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-1097/
Summaries are generated and may contain mistakes; the official description above is the record.
