CVE-2021-28791 Command injection in n/a

High 7.8 Published Updated

Remote attackers can execute arbitrary code by tricking users into opening a malicious workspace with a crafted configuration value in the SwiftFormat extension.

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
None listed

What is CVE-2021-28791?

CVE-2021-28791 is a high-severity command injection vulnerability in n/a, published on 18 Mar 2021. 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

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.

Weakness: CWE-863

Which versions are affected by CVE-2021-28791?

It affects 1 product.

Products include Swiftformat Project Swiftformat.

How do I fix CVE-2021-28791?

No fix has been published for CVE-2021-28791 yet. Limit exposure of the affected software until one is available.

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

Is CVE-2021-28791 being exploited?

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

Sources

Also known as GHSA-q58h-4hfv-p9c7.

Is CVE-2021-28791 in your software?

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

Check your SBOMs for free