CVE-2026-34767
MEDIUMVulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
|
| Impact | This vulnerability presents moderate real-world risk despite a moderate CVSS score of 5.9. The CVSS vector (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:N) indicates network attack vector, high complexity (requiring specific application configuration and user interaction), no privileges required, and high integrity impact with low confidentiality impact. The high complexity rating reflects that only applications explicitly using custom protocol handlers or webRequest header modification are vulnerable; applications not reflecting external input into headers are unaffected. The high integrity impact is meaningful-attackers can inject HSTS headers to force HTTPS downgrade, modify Set-Cookie headers to hijack sessions, or inject CSP directives to exfiltrate data. The required user interaction and high attack complexity reduce the likelihood of mass exploitation. Patch availability across four maintained release branches (38, 39, 40, 41) indicates vendor responsiveness. This is a real priority for Electron application developers who use these specific APIs with untrusted input, but not a critical emergency for applications following input validation best practices. |
| Exploit ScenarioDerived | An attacker targets a Desktop application built with vulnerable Electron that registers a custom protocol handler (e.g., 'myapp://') and accepts query parameters that are reflected into response headers without validation. The attacker sends the victim a link like 'myapp://callback?token=value%0dSet-Cookie:%20admin=true'. When the application processes this and reflects the token parameter into a response header without sanitization, the injected newlines cause the application to send an additional Set-Cookie header, allowing session hijacking. User interaction is required-the victim must click the link or the application must automatically process attacker-controlled URLs. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 03, 2026
HTTP response header injection in Electron allows remote attackers to inject malicious headers via crafted input reflected in response headers when custom protocol handlers or webRequest.onHeadersReceived are used. An attacker can manipulate cookies, content security policy, or cross-origin access controls in affected applications. This affects Electron 41.x before 41.0.3, 40.x before 40.8.3, 39.x before 39.8.3, and 38.x before 38.8.6; no public exploit code is documented at time of analysis.
RemediationAI
Upgrade to patched versions: Electron 41.0.3 or later, 40.8.3 or later, 39.8.3 or later, or 38.8.6 or later. As a workaround, validate and sanitize all untrusted input before including it in response header names or values; specifically, reject or escape input containing newline characters (CR/LF) and other HTTP header delimiters. For applications using webRequest.onHeadersReceived, implement strict allowlisting of header values and sanitize any dynamic content. Refer to the GitHub Security Advisory at https://github.com/electron/electron/security/advisories/GHSA-4p4r-m79c-wq3v for additional context.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability exists in Electron's protocol handling and web request interception mechanisms. When applications register custom protocol handlers via protocol.handle() or protocol.registerSchemesAsPrivileged(), or modify response headers via webRequest.onHeadersReceived event handlers, unsanitized external input can be directly injected into HTTP response header names or values. This is a classic header injection vulnerability (CWE-74: Improper Neutralization of Special Elements used in an HTTP Header) where newline characters or header-delimiter syntax in attacker-controlled data allow injection of additional headers. The root cause is insufficient input validation before headers are constructed and sent to clients. The vulnerability is specific to Electron npm packages across multiple major versions.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionNVD
Impact
Apps that register custom protocol handlers via protocol.handle() / protocol.registerSchemesAsPrivileged() or modify response headers via webRequest.onHeadersReceived may be vulnerable to HTTP response header injection if attacker-controlled input is reflected into a response header name or value.
An attacker who can influence a header value may be able to inject additional response headers, affecting cookies, content security policy, or cross-origin access controls.
Apps that do not reflect external input into response headers are not affected.
Workarounds
Validate or sanitize any untrusted input before including it in a response header name or value.
Fixed Versions
41.0.340.8.339.8.338.8.6
For more information
If there are any questions or comments about this advisory, send an email to [security@electronjs.org](mailto:security@electronjs.org)
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
GHSA-4p4r-m79c-wq3v
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB