7.1high
SwiftTerm vulnerable to arbitrary command execution
- Severity
- 7.1high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.47% (higher than 42% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-jq43-q8mx-r7mq
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| migueldeicaza SwiftTerm | < a94e6b24d24ce9680ad79884992e1dff8e150a31 | CVE List |
| github.com/migueldeicaza/SwiftTerm (SwiftURL) | before 1.2.0 | GitHub Advisory Database |
| swiftterm_project swiftterm | before 2022-12-02 | NVD |
All scores
| GitHub_M | 7.1high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
| GitHub | 7.1high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N |
| NVD | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Impact
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.
Credit
These bugs were found and disclosed by David Leadbeater dgl@dgl.cx (@dgl at Github.com)
Patches
Fixed in version ce596e0dc8cdb288bc7ed5c6a59011ee3a8dc171
Workarounds
There are no workarounds available
References
Similar exploits to this existed in the past, for terminal emulators:
https://nvd.nist.gov/vuln/detail/CVE-2003-0063 https://nvd.nist.gov/vuln/detail/CVE-2008-2383
Additional background and information is also available:
https://marc.info/?l=bugtraq&m=104612710031920&w=2 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510030
NVD (es)
SwiftTerm es un emulador de terminal Xterm/VT100. Antes del commit a94e6b24d24ce9680ad79884992e1dff8e150a31, un atacante podría modificar el título de la ventana mediante una determinada secuencia de escape de caracteres y luego insertarlo nuevamente en la línea de comando en la terminal del usuario, por ejemplo, cuando el usuario ve un archivo que contiene la secuencia maliciosa, lo que podría permitir al atacante ejecutar comandos arbitrarios. La versión a94e6b24d24ce9680ad79884992e1dff8e150a31 contiene un parche para este problema. No se conocen workarounds disponibles.
References
| https://github.com/migueldeicaza/SwiftTerm/security/advisories/GHSA-jq43-q8mx-r7mq | third-party-advisory, web | |
| https://github.com/migueldeicaza/SwiftTerm/commit/a94e6b24d24ce9680ad79884992e1dff8e150a31 | patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-23465 | advisory | |
| https://github.com/migueldeicaza/SwiftTerm | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-23465 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jq43-q8mx-r7mq changed 2024-02-09 | CC-BY-4.0 |
| NVD | CVE-2022-23465 changed 2026-06-17 | Public domain |