Ingress-nginx path can be pointed to service account token file
Description
A security issue was discovered in ingress-nginx where a user that can create or update ingress objects can use the spec.rules[].http.paths[].path field of an Ingress object (in the networking.k8s.io or extensions API group) to obtain the credentials of the ingress-nginx controller. In the default configuration, that credential has access to all secrets in the cluster.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In ingress-nginx, a user able to create or update Ingress objects can use the path field to obtain the controller's service account token, which in default configurations grants access to all cluster secrets.
Vulnerability
A security issue exists in ingress-nginx where a user who can create or update Ingress objects (in the networking.k8s.io or extensions API group) can use the spec.rules[].http.paths[].path field to point to the service account token file of the ingress-nginx controller [1][3][4]. This affects ingress-nginx versions prior to v1.2.0 [3][4]. In the default configuration, the controller's service account token has access to all secrets in the cluster [1][3][4].
Exploitation
An attacker with the ability to create or update Ingress objects (requires at least create or update permissions on the Ingress resource) can set the spec.rules[].http.paths[].path field to a value that references the controller's service account token file path [3][4]. This is a network-accessible attack that does not require user interaction beyond the attacker's own authenticated API request (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L) [3][4]. Multitenant environments where non-admin users have permissions to create Ingress objects are most affected [3][4].
Impact
Successful exploitation allows the attacker to read the service account token of the ingress-nginx controller [3][4]. Since in the default configuration this token has access to all secrets in the Kubernetes cluster, the attacker can then read any secret, leading to a high confidentiality impact [1][3][4]. The attacker may also gain limited integrity and availability impact (CVSS sub-scores indicate low impact on those axes) [3][4].
Mitigation
The vulnerability is fixed in ingress-nginx versions v1.2.0-rc.0 and v1.2.0 [3][4]. Users unable to upgrade immediately can implement an admission policy that restricts the spec.rules[].http.paths[].path field on the networking.k8s.io/Ingress resource to known safe characters, for example by using an admission webhook or the annotation-value-word-blocklist approach [3][4]. There is no known exploitation as of the advisory's publication date.
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
k8s.io/ingress-nginxGo | < 1.2.0 | 1.2.0 |
Affected products
18- osv-coords17 versionspkg:apk/chainguard/ingress-nginx-controllerpkg:apk/chainguard/ingress-nginx-controller-1.9pkg:apk/chainguard/ingress-nginx-controller-compatpkg:apk/chainguard/ingress-nginx-controller-compat-1.9pkg:apk/chainguard/ingress-nginx-controller-compat-fips-1.9pkg:apk/chainguard/ingress-nginx-controller-fipspkg:apk/chainguard/ingress-nginx-controller-fips-1.9pkg:apk/chainguard/ingress-nginx-controller-fips-compatpkg:apk/chainguard/kube-webhook-certgenpkg:apk/chainguard/kube-webhook-certgen-1.9pkg:apk/chainguard/kube-webhook-certgen-fipspkg:apk/chainguard/kube-webhook-certgen-fips-1.9pkg:apk/wolfi/ingress-nginx-controllerpkg:apk/wolfi/ingress-nginx-controller-compatpkg:apk/wolfi/kube-webhook-certgenpkg:golang/k8s.io/ingress-nginxpkg:rpm/opensuse/rke&distro=openSUSE%20Tumbleweed
< 0+ 16 more
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 1.2.0
- (no CPE)range: < 1.3.10-1.1
- Kubernetes/Kubernetes ingress-nginxv5Range: unspecified
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
6- github.com/advisories/GHSA-pvmg-xgmx-9mxhghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-25745ghsaADVISORY
- github.com/kubernetes/ingress-nginx/issues/8502ghsax_refsource_MISCWEB
- groups.google.com/g/kubernetes-security-announce/c/7vQrpDZeBlcghsax_refsource_MISCWEB
- security.netapp.com/advisory/ntap-20220609-0006ghsaWEB
- security.netapp.com/advisory/ntap-20220609-0006/mitrex_refsource_CONFIRM
News mentions
0No linked articles in our index yet.