Vulnerabilities in pkg:npm/@theia/messages
PACKAGECVE-2021-28162 is a MODERATE (CVSS 6.1) command injection vulnerability (CWE-829: Inclusion of Functionality from Untrusted Control Sphere) affecting @theia/messages libraries in the npm ecosystem. The issue involves command injection in @theia/messages. Remediation is available by upgrading affected packages to version 1.0.0.
pkg:npm/@theia/messages
Vulnerability advisories affecting package pkg:npm/@theia/messages. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-c94v-8fff-73ph | CVE-2021-28162 | MODERATE | Command Injection in @theia/messages |
CVE-2021-28162 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2021-28162
To remediate this vulnerability, upgrade all affected @theia/messages dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @theia/messages@1.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @theia/messages
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-28162, inspect your project dependencies using npm:
npm ls @theia/messages
Analyze the terminal output to locate any version of @theia/messages in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0), your application is affected.
Note: The npm ls @theia/messages command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere, where the product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere. In @theia/messages, 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-2021-28162 Affected @theia/messages Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@theia/messages
|
npm |
< 1.0.0
|
1.0.0
|
References
Frequently Asked Questions
What is CVE-2021-28162?
Which @theia/messages versions are affected?
What version fixes CVE-2021-28162?
Is @theia/messages affected?
What is the CVSS score of CVE-2021-28162?
What CWE is associated with CVE-2021-28162?
How can I check npm dependencies for CVE-2021-28162?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c94v-8fff-73ph",
"modified" : "2021-05-07T17:57:37Z",
"published" : "2021-05-10T15:36:55Z",
"aliases" : [ "CVE-2021-28162" ],
"summary" : "Command Injection in @theia/messages",
"details" : "In Eclipse Theia versions up to and including 0.16.0, in the notification messages there is no HTML escaping, so Javascript code can run.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@theia/messages"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-28162"
}, {
"type" : "WEB",
"url" : "https://github.com/eclipse-theia/theia/issues/7283"
}, {
"type" : "WEB",
"url" : "https://github.com/eclipse-theia/theia/pull/7289"
}, {
"type" : "WEB",
"url" : "https://github.com/eclipse-theia/theia/blob/master/CHANGELOG.md#v100---26032020"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-829" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-07T17:57:37Z",
"nvd_published_at" : "2021-03-12T22:15:00Z"
}
}