Electron: shell.openPath path validation bypass via embedded null byte
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 39.8.6, 40.9.0, 41.1.1, 42.0.0-beta.1
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.6, 40.9.0, 41.1.1, and 42.0.0-beta.1, 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. This issue is fixed in versions 39.8.6, 40.9.0, 41.1.1, and 42.0.0-beta.1.
Timeline
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- CVE published
- Record last updated
Affected versions
- electron electron
fixed in 39.8.6; From 40.0.0-alpha.1 · fixed in 40.9.0; From 41.0.0-alpha.1 · fixed in 41.1.1; From 42.0.0-alpha.1 · fixed in 42.0.0-beta.1
- electronnpm
From 42.0.0-alpha.1 · fixed in 42.0.0-beta.1
- electronnpm
From 41.0.0-alpha.1 · fixed in 41.1.1
- electronnpm
From 40.0.0-alpha.1 · fixed in 40.9.0
- electronnpm
fixed in 39.8.6