Skip to main content

CVE-2026-34767

MEDIUM
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74)
2026-04-03 https://github.com/electron/electron GHSA-4p4r-m79c-wq3v
6.5
CVSS 3.1 · NVD
View

Vulnerability 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

npm electron fix: 38.8.6, 39.8.3, 40.8.3, 41.0.3

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

NVD PRIMARY 6.5 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Red Hat 5.9 MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

Lifecycle Timeline

3
CVSS changed
Jul 24, 2026 - 22:23 NVD
5.9 (MEDIUM) 6.5 (MEDIUM)
Patch released
Apr 03, 2026 - 08:30 nvd
Patch available
CVE Published
Apr 03, 2026 - 02:37 nvd
MEDIUM 5.9

DescriptionNVD

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.3
  • 40.8.3
  • 39.8.3
  • 38.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

EPSS Score
0.0%
Top 92% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Affected Products (CPE)NVD

pkg:npm/electron
pkg:npm/electron
pkg:npm/electron
pkg:npm/electron

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy