CVE-2023-1523 Command injection in snapd
A malicious snap can inject commands into the controlling terminal on virtual consoles, allowing arbitrary code execution outside the sandbox.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-1523?
CVE-2023-1523 is a critical command injection vulnerability in Canonical Ubuntu Linux, published on 1 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Using the TIOCLINUX ioctl request, a malicious snap could inject contents into the input of the controlling terminal which could allow it to cause arbitrary commands to be executed outside of the snap sandbox after the snap exits. Graphical terminal emulators like xterm, gnome-terminal and others are not affected - this can only be exploited when snaps are run on a virtual console.
Weakness: CWE-74
Which versions are affected by CVE-2023-1523?
It affects 2 products.
Products include Canonical Snapd, Canonical Ubuntu Linux.
How do I fix CVE-2023-1523?
Apply the vendor's patch.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2023-1523 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-1523 exists.
Other vulnerabilities in Canonical Ubuntu Linux
- CVE-2020-27352 Privilege escalation in snapd
- CVE-2019-7304 Local privilege escalation via snapd socket
- CVE-2021-4120 snapd could be made to bypass intended access restrictions through snap content interfaces and layout paths
- CVE-2024-5138 CVE-2024-5138: snapd snapctl auth bypass
- CVE-2022-3328 snapd Race Condition vulnerability
Sources
Also known as DEBIAN-CVE-2023-1523, GHSA-55wx-23fj-c2v5, UBUNTU-CVE-2023-1523, USN-6125-1.