Back to Blog
critical SEVERITY5 min read

How credential header disclosure happens in electron-updater and how to fix it

A critical vulnerability in electron-updater (CVE-2026-54673) allowed OAuth tokens and API credentials to leak when HTTP redirects occurred during application updates. The fix upgrades electron-updater from version 6.3.0 to 6.8.9, which properly strips sensitive authorization headers before following redirects to external domains.

O
By Orbis AppSec
Published August 1, 2026Reviewed August 1, 2026

Answer Summary

CVE-2026-54673 is a credential disclosure vulnerability in electron-updater (part of electron-builder) where authorization headers containing OAuth tokens or API keys are not stripped when following HTTP redirects, potentially leaking credentials to untrusted third-party servers. The fix involves upgrading electron-updater to version 6.8.9 or later, which implements proper header sanitization during redirect handling. This is classified as CWE-522 (Insufficiently Protected Credentials) and affects Electron desktop applications using the auto-update feature.

Vulnerability at a Glance

cweCWE-522
fixUpgrade electron-updater from 6.3.0 to 6.8.9
riskOAuth tokens and API keys leaked to third-party servers during auto-updates
languageJavaScript/TypeScript (Electron)
root causeelectron-updater failed to strip Authorization headers when following redirects
vulnerabilityCredential Header Disclosure via HTTP Redirects

Introduction

The package-lock.json file in this Electron application specified electron-updater version 6.3.0, a dependency used to handle automatic application updates. However, this version contained a critical flaw in how it processed HTTP redirects during update checks and downloads.

When the auto-updater made requests to fetch update manifests or binaries, it included authorization headers for authentication. The vulnerability (CVE-2026-54673) meant that if the update server responded with a redirect—whether intentional or through a man-in-the-middle attack—those credential headers would follow the redirect to the new destination without being stripped.

This matters significantly because Electron applications often handle sensitive operations, and in this codebase, OAuth tokens and API keys are already stored in the local filesystem. Having those same credentials potentially leak during routine update checks compounds the risk dramatically.

The Vulnerability Explained

What Happens During a Normal Update Check

When an Electron app using electron-updater checks for updates, it typically:

  1. Sends an HTTP request to the configured update server
  2. Includes authentication headers if the update feed requires authorization
  3. Receives a response with update metadata or a redirect to the actual download location

The Redirect Problem

The vulnerable versions of builder-util-runtime (used internally by electron-updater) didn't distinguish between same-origin and cross-origin redirects when preserving HTTP headers. Here's the problematic flow:

Application → Update Server (with Authorization: Bearer <token>)
                    ↓
              302 Redirect to attacker.com
                    ↓
Application → attacker.com (with Authorization: Bearer <token>)  ← LEAKED!

Real Attack Scenario

Consider this attack against the affected application:

  1. An attacker compromises the DNS or performs a MITM attack on the update check request
  2. They respond with a 302 redirect to https://attacker-controlled-server.com/fake-update
  3. The electron-updater follows the redirect, sending the original Authorization header
  4. The attacker captures OAuth tokens or API keys from the Authorization header
  5. These credentials can now be used to impersonate the user or access protected resources

The vulnerable dependency chain in package-lock.json was:

"electron-updater": "^6.3.0"

This version pulled in a vulnerable builder-util-runtime that didn't implement header stripping on redirects.

The Fix

The fix upgrades electron-updater to version 6.8.9, which includes a patched builder-util-runtime (9.7.0) that properly sanitizes headers during redirect handling.

Before (Vulnerable)

{
  "electron-updater": "^6.3.0"
}

After (Fixed)

{
  "electron-updater": "^6.8.9"
}

What Changed Internally

The updated builder-util-runtime 9.7.0 implements redirect handling that:

  1. Detects cross-origin redirects: Compares the original request URL with the redirect target
  2. Strips sensitive headers: Removes Authorization, Cookie, and other credential-bearing headers before following cross-origin redirects
  3. Preserves functionality: Same-origin redirects continue to work normally with headers intact

The diff also shows cleanup of nested debug dependencies that were previously duplicated:

-    "node_modules/@electron/get/node_modules/debug": {
-      "version": "4.4.3",
-      ...
-    },
-    "node_modules/@electron/notarize/node_modules/debug": {
-      "version": "4.4.3",
-      ...
-    },

This consolidation is a side effect of the dependency resolution with the newer electron-updater version, resulting in a cleaner and more maintainable dependency tree.

Key Takeaways

  • electron-updater versions before 6.8.9 leak credentials on HTTP redirects — any Electron app using auto-updates with authentication is potentially affected
  • Dependency upgrades aren't just about features — this single version bump from 6.3.0 to 6.8.9 closes a critical credential disclosure vector
  • Defense in depth matters — even with this fix, the plaintext credential storage in plugins/auth-oauth2/src/store.ts should be addressed using the available PBKDF2 encryption
  • Trivy correctly identified this CVE in package-lock.json — automated scanning caught what manual review might miss
  • The fix is minimal but impactful — only package.json and package-lock.json changed, demonstrating that security fixes don't always require code rewrites

How Orbis AppSec Detected This

  • Source: HTTP requests made by electron-updater during update checks, containing Authorization headers with OAuth tokens
  • Sink: builder-util-runtime's HTTP redirect handling, which forwarded headers to redirect destinations without sanitization
  • Missing control: No header stripping logic for cross-origin redirects in builder-util-runtime versions prior to 9.7.0
  • CWE: CWE-522 (Insufficiently Protected Credentials)
  • Fix: Upgraded electron-updater from 6.3.0 to 6.8.9, which includes builder-util-runtime 9.7.0 with proper credential header handling

Orbis AppSec automatically detected this vulnerability and opened a pull request with the fix. Try Orbis AppSec on your repositories to find and fix issues like this automatically.

Conclusion

CVE-2026-54673 demonstrates how a subtle flaw in HTTP redirect handling can expose sensitive credentials. The electron-updater library is widely used in Electron applications, making this vulnerability particularly impactful across the desktop application ecosystem.

The fix was straightforward—a dependency version bump—but the implications of leaving it unpatched could have been severe. OAuth tokens leaked during routine update checks could grant attackers persistent access to user accounts and protected resources.

For developers maintaining Electron applications: audit your electron-updater version today, enable automated dependency scanning, and consider implementing additional layers of protection like code signing and certificate pinning. Security is built through multiple overlapping defenses, not single points of protection.

Prevention and further reading

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #86

Related Articles

critical

deleteNestedProperty Prototype Pollution via Dot-Notation Path

The `deleteNestedProperty` function in propertyUtils.ts allowed attackers to manipulate JavaScript object prototypes by passing specially crafted dot-notation paths like `__proto__.polluted`. A fix now blocks dangerous keys before processing, preventing prototype pollution attacks that could affect all objects in the application.

high

How Denial of Service via Infinite Loop Happens in JavaScript Dependencies and How to Fix It

CVE-2026-67213 is a high-severity denial of service vulnerability in nanoid before version 5.1.6 that triggers an infinite loop during random ID generation when processing specially crafted input. We upgraded nanoid across the entire dependency tree to patch this flaw and prevent attackers from freezing application threads. This fix ensures that ID generation remains resilient even when handling adversarial input patterns.

high

How Sensitive Data Exposure happens in Zotero plugins and how to fix it

A high-severity data exposure vulnerability in `Zotero.ts` automatically transmitted complete document metadata—including private notes, attachment paths, and tags—to external LLM services without user consent. The fix replaces broad `item.toJSON()` serialization with explicit field selection, sending only essential bibliographic data.

high

How missing dependency update cooldowns happen in GitHub Dependabot configurations and how to fix it

A semgrep scan flagged `.github/dependabot.yml` for lacking a cooldown period, meaning Dependabot would immediately propose updates to brand-new package versions across npm, Bundler, and Docker ecosystems. The fix adds a `cooldown: default-days: 7` block to every `package-ecosystem` entry, forcing a one-week waiting period before newly published releases are considered — reducing exposure to malicious or unstable package drops.

high

How Path Traversal Happens in TensorFlow's Data Service and How to Fix It

TensorFlow's data service dispatcher validated dataset IDs against forward-slash traversal attacks but overlooked backslash characters on non-Windows platforms, allowing attackers to escape the root directory. A targeted fix adds explicit backslash validation across all platforms, closing a high-severity path traversal vulnerability in the snapshot management system.

critical

How Unbounded WebSocket Message Handling Causes Resource Exhaustion in Node.js and How to Fix It

The WebSocketCrossServerAdapter class in a popular Node.js WebSocket library lacked any rate limiting on inbound messages, allowing attackers to flood Redis nodes and WebSocket servers with high-volume traffic. The fix introduces a configurable `rateLimit` option that caps messages per connection per second, preventing resource exhaustion while preserving legitimate functionality.