CVE-2021-25743 ANSI escape characters in kubectl output are not being filtered
kubectl fails to filter ANSI escape sequences, allowing attackers to manipulate terminal output and potentially hide malicious activity.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-25743?
CVE-2021-25743 is a low-severity vulnerability in Kubernetes Kubernetes, published on 7 Jan 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
kubectl does not neutralize escape, meta or control sequences contained in the raw data it outputs to a terminal. This includes but is not limited to the unstructured string fields in objects such as Events.
Weakness: CWE-150
Which versions are affected by CVE-2021-25743?
3 open source packages ship an affected version, including k8s.io/kubernetes. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
k8s.io/kubernetes Go | All versions | 1.26.0-alpha.3 |
k8s.io/kubernetes Go | All versions | 1.26.0-alpha.3 |
k8s.io/kubernetes Go | All versions | 1.26.0-alpha.3 |
Linux distribution packages (10)
kubernetes1.23 SUSE:Linux Enterprise Module for Containers 15 SP5 | All versions | 1.23.17-150500.3.15.1 |
kubernetes1.24 SUSE:Linux Enterprise Module for Containers 15 SP5 | All versions | 1.24.17-150500.3.19.1 |
kubernetes1.25 SUSE:Linux Enterprise Module for Containers 15 SP5 | All versions | 1.25.16-150400.9.10.1 |
kubernetes1.25 SUSE:Linux Enterprise Module for Containers 15 SP6 | All versions | 1.25.16-150400.9.10.1 |
kubernetes1.23 openSUSE:Leap 15.5 | All versions | 1.23.17-150500.3.15.1 |
kubernetes1.24 openSUSE:Leap 15.5 | All versions | 1.24.17-150500.3.19.1 |
kubernetes1.25 openSUSE:Leap 15.5 | All versions | 1.25.16-150400.9.10.1 |
kubernetes1.23 openSUSE:Leap 15.6 | All versions | 1.23.17-150500.3.15.1 |
kubernetes1.24 openSUSE:Leap 15.6 | All versions | 1.24.17-150500.3.19.1 |
kubernetes1.25 openSUSE:Leap 15.6 | All versions | 1.25.16-150400.9.10.1 |
Products include Kubernetes Kubernetes.
How do I fix CVE-2021-25743?
Upgrade k8s.io/kubernetes to 1.26.0-alpha.3 or later.
Is CVE-2021-25743 being exploited?
There is no known exploitation of CVE-2021-25743 in the wild and no public exploit code.
Other vulnerabilities in Kubernetes Kubernetes
- CVE-2018-1002105 Privilege Escalation in Kubernetes
- CVE-2017-1000056 Kubernetes Privilege Escalation
- CVE-2016-1906 Authorization bypass in Openshift
- CVE-2023-3676 Kubernetes - Windows nodes - Insufficient input sanitization leads to privilege escalation
- CVE-2023-3955 Kubernetes - Windows nodes - Insufficient input sanitization leads to privilege escalation
Sources
Also known as DEBIAN-CVE-2021-25743, GHSA-f9jg-8p32-2f55, GO-2022-0983, OESA-2022-2132, OESA-2023-1020, SUSE-SU-2024:2858-1 and 2 more.