CVE-2026-112942: launch-editor `fs.existsSync()` Existence Check Can Be Vulnerability
HIGHCVE-2026-112942 is a HIGH `fs.existssync()` existence check can be vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting launch-editor libraries in the npm ecosystem. The issue involves `fs.existssync()` existence check can be bypassed on windows. Remediation is available by upgrading affected packages to version 8.3.3, 8.2.4, 8.1.6, 7.3.7, 6.4.4, 1.1.0, 2.14.2.
CVE-2026-112942 at a Glance
How to Fix CVE-2026-112942
To remediate this vulnerability, upgrade all affected launch-editor 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 vite@8.3.3
npm install vite@8.2.4
npm install vite@8.1.6
npm install vite@7.3.7
npm install vite@6.4.4
npm install vite-plus@1.1.0
npm install launch-editor@2.14.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls vite
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-112942, inspect your project dependencies using npm:
npm ls vite
Analyze the terminal output to locate any version of launch-editor in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.3.3), your application is affected.
Note: The npm ls vite 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-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In launch-editor, 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-2026-112942 Affected launch-editor Versions
7 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vite
|
npm |
≥ 8.3.0
< 8.3.3
|
8.3.3
|
|
vite
|
npm |
≥ 8.2.0
< 8.2.4
|
8.2.4
|
|
vite
|
npm |
≥ 8.0.0
< 8.1.6
|
8.1.6
|
|
vite
|
npm |
≥ 7.0.0
< 7.3.7
|
7.3.7
|
|
vite
|
npm |
< 6.4.4
|
6.4.4
|
|
vite-plus
|
npm |
< 1.1.0
|
1.1.0
|
|
launch-editor
|
npm |
< 2.14.2
|
2.14.2
|
References
Frequently Asked Questions
What is CVE-2026-112942?
Which launch-editor versions are affected?
What version fixes CVE-2026-112942?
Is vite affected?
Is vite-plus affected?
What CWE is associated with CVE-2026-112942?
How can I check npm dependencies for CVE-2026-112942?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-587h-7wmj-h5pm",
"modified" : "2026-10-20T19:48:25Z",
"published" : "2026-10-20T19:48:25Z",
"aliases" : [ "CVE-2026-112942" ],
"summary" : "launch-editor: `fs.existsSync()` existence check can be bypassed on Windows",
"details" : "### Summary\n\n`launch-editor` checked `fs.existsSync(fileName)` before passing a supplied path to an editor command. On Windows, an attacker can bypass this check with a crafted path ending in `\\\\..:line:column`. This removes the requirement that the attacker be able to place a file with a malicious filename.\n\nCombined with the `%` escaping issue described in [GHSA-698v-4r3x-3vcv](https://github.com/vitejs/launch-editor/security/advisories/GHSA-698v-4r3x-3vcv), this bypass can lead to OS command injection when an attacker controls the file argument.\n\n### Impact\n\nOnly apps that runs on Windows is affected.\n\n### Details\n\nThe earlier advisory assumed that `fs.existsSync()` required an attacker-controlled filename to exist. This advisory covers a bypass of that requirement.\n\nA crafted value ending in `\\\\..:1:1` is interpreted differently by `launch-editor-middleware`, `launch-editor`, and Windows:\n\n1. `launch-editor-middleware` calls `path.resolve()` while the final path component is `..:1:1`, so it is not treated as a parent-directory component.\n2. `launch-editor` treats `:1:1` as a line-and-column suffix and removes it, leaving a path ending in `\\\\..`.\n3. On Windows, `fs.existsSync()` accepts the resulting path as the existing parent directory even though the attacker-controlled preceding component does not exist.\n4. Because the existence check passes, the crafted filename reaches the Windows shell command.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "launch-editor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.14.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.14.1"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "vite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.3.0"
}, {
"fixed" : "8.3.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 8.3.2"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "vite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.2.0"
}, {
"fixed" : "8.2.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 8.2.3"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "vite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.1.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 8.1.5"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "vite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.3.7"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 7.3.6"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "vite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.4.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.4.3"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "vite-plus"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.0.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vitejs/launch-editor/security/advisories/GHSA-587h-7wmj-h5pm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-112942"
}, {
"type" : "WEB",
"url" : "https://github.com/vitejs/launch-editor/commit/f13cd835d4b8e860b1d4d080ad8a490cc2463679"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vitejs/launch-editor"
}, {
"type" : "WEB",
"url" : "https://github.com/vitejs/launch-editor/releases/tag/v2.14.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-20T19:48:25Z",
"nvd_published_at" : "2026-10-20T15:17:17Z"
}
}