CVE-2022-23465 SwiftTerm vulnerable to arbitrary command execution

High 7.1 Published Updated

Attackers can execute arbitrary commands by injecting malicious escape sequences into terminal window titles, affecting users of the SwiftTerm library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-23465?

CVE-2022-23465 is a high-severity command injection vulnerability in migueldeicaza SwiftTerm, published on 2 Dec 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

SwiftTerm is a Xterm/VT100 Terminal emulator. Prior to commit a94e6b24d24ce9680ad79884992e1dff8e150a31, an attacker could modify the window title via a certain character escape sequence and then insert it back to the command line in the user's terminal, e.g. when the user views a file containing the malicious sequence, which could allow the attacker to execute arbitrary commands. Version a94e6b24d24ce9680ad79884992e1dff8e150a31 contains a patch for this issue. There are no known workarounds available.

Weakness: CWE-94

Which versions are affected by CVE-2022-23465?

2 open source packages ship an affected version, including github.com/migueldeicaza/SwiftTerm. It affects 1 product.

PackageAffectedFixed in
github.com/migueldeicaza/SwiftTerm SwiftURLAll versions1.2.0
github.com/migueldeicaza/SwiftTerm SwiftURLAll versions1.2.0

Products include Swiftterm Project Swiftterm.

How do I fix CVE-2022-23465?

Upgrade github.com/migueldeicaza/SwiftTerm to 1.2.0 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2022-23465 being exploited?

There is no known exploitation of CVE-2022-23465 in the wild and no public exploit code.

Sources

Also known as GHSA-jq43-q8mx-r7mq.

Is CVE-2022-23465 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free