-
Notifications
You must be signed in to change notification settings - Fork 39.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CVE-2021-25746: Ingress-nginx directive injection via annotations #126813
CVE-2021-25746: Ingress-nginx directive injection via annotations #126813
Comments
* cherry-pick release-29 branch * fixes kubernetes/ingress-nginx#8503
* cherry-pick release-29 branch * fixes kubernetes/ingress-nginx#8503
/triage accepted |
The issue talks about injection via annotation. |
@bmv126 the report itself says the CVE applies to release pre v1.2.0 so checking if there is a prescribed demonstrated way to see the exploit in action. On v1.2.0 I installed the helm chart with |
We were recently notified about this CVE. I see this seems to be fixed in v1.2.0. |
Is there any way to reproduce this problem |
Please try to avoid public display of exploit and you can try to enable chroot image while installing the controller v1.2.0 to enable the jailing/chrooting of the nginx process. |
I hope I can see the actual impact of this problem, so I hope to reproduce this problem in the test environment. How can I deal with it |
This was fixed in v1.2.0 We plan to add more rules to the inspection /close |
@rikatz: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/transfer kubernetes |
/area security |
Issue Details
A security issue was discovered in ingress-nginx where a user that can create or update ingress objects can use
.metadata.annotations
in an Ingress object (in thenetworking.k8s.io
orextensions
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.This issue has been rated High (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L), and assigned CVE-2021-25746.
Affected Components and Configurations
This bug affects ingress-nginx. If you do not have ingress-nginx installed on your cluster, you are not affected. You can check this by running
kubectl get po -n ingress-nginx
.Multitenant environments where non-admin users have permissions to create Ingress objects are most affected by this issue.
Affected Versions
Fixed Versions
Mitigation
If you are unable to roll out the fix, this vulnerability can be mitigated by implementing an admission policy that restricts the
metadata.annotations
values to known safe (see the newly added rules, or the suggested value for annotation-value-word-blocklist).Detection
If you find evidence that this vulnerability has been exploited, please contact security@kubernetes.io
Additional Details
See ingress-nginx Issue #8503 for more details.
Acknowledgements
This vulnerability was reported by Anthony Weems, and separately by jeffrey&oliver.
Thank You,
CJ Cullen on behalf of the Kubernetes Security Response Committee
The text was updated successfully, but these errors were encountered: