CVE-2022-23465: Github.com/migueldeicaza/SwiftTerm SwiftTerm Code Injection Vulnerability Vulnerability
HIGHCVE-2022-23465 is a HIGH (CVSS 7.1) swiftterm code injection vulnerability vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Github.com/migueldeicaza/SwiftTerm libraries in the SwiftURL ecosystem. The issue involves swiftterm code injection vulnerability. Remediation is available by upgrading affected packages to version 1.2.0.
CVE-2022-23465 at a Glance
Security Impact
CVSS: 7.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N).
How to Fix CVE-2022-23465
To remediate this vulnerability, upgrade all affected Github.com/migueldeicaza/SwiftTerm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/migueldeicaza/SwiftTerm to 1.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/migueldeicaza/SwiftTerm
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-23465, inspect your project dependencies for Github.com/migueldeicaza/SwiftTerm:
inspect dependencies for github.com/migueldeicaza/SwiftTerm
Analyze the terminal output to locate any version of Github.com/migueldeicaza/SwiftTerm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Github.com/migueldeicaza/SwiftTerm, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-23465 Affected Github.com/migueldeicaza/SwiftTerm Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/migueldeicaza/SwiftTerm
|
SwiftURL |
< 1.2.0
|
1.2.0
|
References
Frequently Asked Questions
What is CVE-2022-23465?
Which Github.com/migueldeicaza/SwiftTerm versions are affected?
What version fixes CVE-2022-23465?
Is github.com/migueldeicaza/SwiftTerm affected?
What is the CVSS score of CVE-2022-23465?
What CWE is associated with CVE-2022-23465?
How can I check SwiftURL dependencies for CVE-2022-23465?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jq43-q8mx-r7mq",
"modified" : "2024-02-09T00:34:39Z",
"published" : "2023-07-14T21:58:43Z",
"aliases" : [ "CVE-2022-23465" ],
"summary" : "SwiftTerm Code Injection vulnerability",
"details" : "### Impact\n\nAttacker 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.\n\n### Credit\nThese bugs were found and disclosed by David Leadbeater <dgl@dgl.cx> (@dgl at Github.com)\n\n### Patches\n\nFixed in version ce596e0dc8cdb288bc7ed5c6a59011ee3a8dc171\n\n### Workarounds\n\nThere are no workarounds available\n\n### References\n\nSimilar exploits to this existed in the past, for terminal emulators:\n\nhttps://nvd.nist.gov/vuln/detail/CVE-2003-0063\nhttps://nvd.nist.gov/vuln/detail/CVE-2008-2383\n\nAdditional background and information is also available:\n\nhttps://marc.info/?l=bugtraq&m=104612710031920&w=2\nhttps://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510030\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "SwiftURL",
"name" : "github.com/migueldeicaza/SwiftTerm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/migueldeicaza/SwiftTerm/security/advisories/GHSA-jq43-q8mx-r7mq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-23465"
}, {
"type" : "WEB",
"url" : "https://github.com/migueldeicaza/SwiftTerm/commit/a94e6b24d24ce9680ad79884992e1dff8e150a31"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/migueldeicaza/SwiftTerm"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-14T21:58:43Z",
"nvd_published_at" : "2022-12-02T23:15:16Z"
}
}