Repository navigation
committee/security-responseDenotes an issue or PR intended to be handled by the product security committee.Denotes an issue or PR intended to be handled by the product security committee.
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.
official-cve-feedIssues or PRs related to CVEs officially announced by Security Response Committee (SRC)Issues or PRs related to CVEs officially announced by Security Response Committee (SRC)
priority/critical-urgentHighest priority. Must be actively worked on as someone's top priority right now.Highest priority. Must be actively worked on as someone's top priority right now.
triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Description
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 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.
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
- \<v1.2.0
Fixed Versions
- v1.2.0-beta.0
- v1.2.0
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
Activity
- cjcullenadded kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.on Apr 22, 2022
- k8s-ci-robotadded needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.needs-priorityIndicates a PR lacks a `priority/foo` label and requires one.Indicates a PR lacks a `priority/foo` label and requires one.on Apr 22, 2022
- cjcullenchanged the title ~~[-]Placeholder[/-]~~ [+]CVE-2021-25746: Ingress-nginx directive injection via annotations[/+] on Apr 22, 2022
- pgvishnuramadded 2 commits that reference this issue on Apr 22, 2022
-
strongjz commentedon Apr 22, 2022 MemberMore actions /triage accepted
/priority critical-urgent - k8s-ci-robotadded triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.priority/critical-urgentHighest priority. Must be actively worked on as someone's top priority right now.Highest priority. Must be actively worked on as someone's top priority right now. and removed needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.needs-priorityIndicates a PR lacks a `priority/foo` label and requires one.Indicates a PR lacks a `priority/foo` label and requires one.on Apr 22, 2022
-
bmv126 commentedon Apr 22, 2022 More actions The issue talks about injection via annotation.
The deepInpect added in 1.2.0 does not check for annotation.
Not sure how is this fixed in 1.2.0
Reacted by Keddy Shen -
longwuyuan commentedon Apr 23, 2022 More actions @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--set controller.image.chroot=true, and now I am trying to create a ingress with a annotation that will demo this vulnerability. Do you have any thoughts on what annotation I can configure in a ingress to experience this exploit. I think the idea is to get access to a serviceaccount by breaking out of the nginx process with a clever annotation but I can't think of a good annotation (both key and value) to try. I think a publicly visible demo with the nginx process jailed/chrooted, will help make progress. -
foxylion commentedon Apr 25, 2022 More actions We were recently notified about this CVE. I see this seems to be fixed in v1.2.0.
Is there anything except from updating to the latest version required to mitgate this type of exploit? -
yinfuqian commentedon Apr 27, 2022 More actions Is there any way to reproduce this problem
-
longwuyuan commentedon Apr 28, 2022 More actions 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.
-
yinfuqian commentedon Apr 28, 2022 More actions 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
-
longwuyuan commentedon Apr 28, 2022 More actions
-
rikatz commentedon May 10, 2022 MemberMore actions This was fixed in v1.2.0 We plan to add more rules to the inspection /close
-
k8s-ci-robot commentedon May 10, 2022 ContributorMore actions @rikatz: Closing this issue.
Details In response to this:
This was fixed in v1.2.0 We plan to add more rules to the inspection /close 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.
16. k8s-ci-robotclosed this as completedon May 10, 2022
17. ### cji commentedon Aug 20, 2024 MemberMore actions /transfer kubernetes
18. k8s-ci-robotadded needs-sigIndicates an issue or PR lacks a `sig/foo` label and requires one.Indicates an issue or PR lacks a `sig/foo` label and requires one.on Aug 20, 2024
19. k8s-ci-robottransferred this issue fromkubernetes/ingress-nginxon Aug 20, 2024
20. ### cji commentedon Aug 20, 2024 MemberMore actions /area security
/kind bug
/committee security-response
/triage accepted
/lifecycle frozen
/label official-cve-feed
21. k8s-ci-robotadded lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.committee/security-responseDenotes an issue or PR intended to be handled by the product security committee.Denotes an issue or PR intended to be handled by the product security committee.official-cve-feedIssues or PRs related to CVEs officially announced by Security Response Committee (SRC)Issues or PRs related to CVEs officially announced by Security Response Committee (SRC) and removed needs-sigIndicates an issue or PR lacks a `sig/foo` label and requires one.Indicates an issue or PR lacks a `sig/foo` label and requires one.on Aug 20, 2024
Metadata
Metadata
Assignees
Labels
committee/security-responseDenotes an issue or PR intended to be handled by the product security committee.Denotes an issue or PR intended to be handled by the product security committee.
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates that an issue or PR should not be auto-closed due to staleness.
official-cve-feedIssues or PRs related to CVEs officially announced by Security Response Committee (SRC)Issues or PRs related to CVEs officially announced by Security Response Committee (SRC)
priority/critical-urgentHighest priority. Must be actively worked on as someone's top priority right now.Highest priority. Must be actively worked on as someone's top priority right now.
triage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.