Three new Nginx ingress controller vulnerabilities and the affect on Kubernetes
Three vulnerabilities in the NGINX ingress controller allow an attacker who can control Ingress object configuration to inject arbitrary code or manipulate the path field, thereby stealing the ingress controller's service account token and accessing all Kubernetes secrets. The attacker could then use these credentials to compromise the entire cluster.
armosec.io
Published on armosec.io
Three security issues were reported on October 27th by the Kubernetes security community, all of them related to the popular NGINX ingress component.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the ingress controller fails to properly validate or sanitise user-supplied Ingress annotations and path fields, allowing injection of arbitrary NGINX configuration or path traversal to sensitive files.
Impact
An attacker with Ingress configuration rights could steal the ingress controller's service account token and read all Kubernetes secrets in the cluster, potentially leading to full cluster compromise.
What the attacker needed
Ability to create or modify Ingress objects; multi-tenant cluster or untrusted chart source
The fix
Update NGINX ingress controller to version 1.9.0 and enable annotation validation; for CVE-2022-4886, enable strict path validation or use admission controller policies.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
An ingress controller is like a traffic cop for a Kubernetes cluster, directing incoming web requests to the right services. These bugs let someone who can change the cop's instructions (the Ingress configuration) trick it into revealing its own ID badge (a service account token), which can unlock all the cluster's secrets. This is dangerous because that badge often has broad access.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.