Open-Source Security Intelligence

Know every vulnerability
before it knows you.

DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.

Search

GHSA-5c9j-mhmv-5xgx

MediumCVSS 6 / 10
Published Aug 5, 2026·Last modified Aug 5, 2026
Affected Components(0)

No affected components available

Description

Impact

shell.openPath() did not reject paths containing embedded null bytes. Apps that perform string-only validation of file paths (for example, checking the file extension) before passing them to shell.openPath() could be bypassed, allowing an attacker-controlled path to open a different file than the one that passed validation.

Apps are only affected if they pass paths derived from untrusted input to shell.openPath() and rely on string-based validation without a filesystem check. Node's fs APIs already reject paths containing null bytes, so apps that call fs.existsSync(), fs.stat(), or similar before shell.openPath() are not affected. Apps that do not call shell.openPath() with untrusted input are not affected.

Workarounds

Reject any path containing a null byte before passing it to shell.openPath():

if (filePath.includes('\0')) throw new Error('invalid path');

Fixed Versions

  • 42.0.0-beta.1
  • 41.1.1
  • 40.9.0
  • 39.8.6

For more information

If you have any questions or comments about this advisory, email us at security@electronjs.org

Risk Scores
Base Score
6.0

The vulnerability requires local access to the device to be exploited. It is difficult for an attacker to exploit this vulnerability and may require special conditions. An attacker needs basic access or low-level privileges. The attacker needs the user to perform some action, like clicking a link. The impact is confined to the system where the vulnerability exists. There is a high impact on the confidentiality of the information. There is a high impact on the integrity of the data.

Threat Intelligence
5.5

Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.

EPSS
0.10%

The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.

Exploit
Not available

We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.

Browse More

Scan your project

Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.

Checkout DevGuard