High
Security advisory
The unofficial SwiftFormat extension before 1.3.7 for Visual Studio Code allows remote attackers to execute arbitrary code by constructing a malicious workspace with a crafted swiftformat.path configuration value that triggers execution upon opening the workspace.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-28791
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 11:15 UTC · Revision 1
Source evidence
The unofficial SwiftFormat extension before 1.3.7 for Visual Studio Code allows remote attackers to execute arbitrary code by constructing a malicious workspace with a crafted swiftformat.path configuration value that triggers execution upon opening the workspace.
osv:CVE-2021-28791
Complete source record
{
"id": "a57e3735c8176340d8d999d1fa011ddc937ed97dbf6875e13c6f42471ff00a69",
"url": "https://osv.dev/vulnerability/CVE-2021-28791",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-28791",
"summary": "The unofficial SwiftFormat extension before 1.3.7 for Visual Studio Code allows remote attackers to execute arbitrary code by constructing a malicious workspace with a crafted swiftformat.path configuration value that triggers execution upon opening the workspace.",
"evidence": "osv:CVE-2021-28791",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2021-28791",
"aliases": [
"CVE-2021-28791"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/vknabel/vscode-swiftformat",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "0e950047009ca8fcac3b448468cf7c459aade083"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:swiftformat_project:swiftformat:*:*:*:*:*:visual_studio_code:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.3.7"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "0e950047009ca8fcac3b448468cf7c459aade083"
}
],
"source": "REFERENCES_TAG",
"original_tag": "1.3.7"
}
]
}
}
],
"versions": [
"1.3.6",
"1.3.5",
"1.3.4",
"1.3.3",
"1.3.2",
"1.3.1",
"1.3.0",
"1.2.2",
"1.2.1",
"1.2.0",
"1.1.3",
"1.1.2",
"1.1.1",
"1.1.0",
"1.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-28791.json"
}
}
],
"modified": "2026-10-20T10:53:42.527942264Z",
"provider": "osv",
"references": [
"https://github.com/vknabel/vscode-swiftformat/releases/tag/1.3.7",
"https://vuln.ryotak.me/advisories/13"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-28791",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 384521,
"published_at": "2021-03-18T16:15:14.933+00:00"
}