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.

Prevention & Best Practices

1. Keep Auto-Update Dependencies Current

Electron's update ecosystem receives regular security patches. Configure automated dependency scanning:

# Example: Dependabot configuration
version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
    allow:
      - dependency-name: "electron-updater"
      - dependency-name: "electron-builder"

2. Implement Update Server Validation

Don't rely solely on the updater's security. Add certificate pinning or signature verification:

// In your Electron main process
autoUpdater.on('update-downloaded', (info) => {
  // Verify the update signature before installing
  if (!verifyUpdateSignature(info.files)) {
    autoUpdater.logger.error('Update signature verification failed');
    return;
  }
  autoUpdater.quitAndInstall();
});

3. Use Code Signing

Always sign your Electron applications and updates. This prevents attackers from substituting malicious updates even if they intercept the connection.

4. Audit Your Credential Storage

The vulnerability description mentions OAuth tokens stored in plaintext. Consider encrypting stored credentials using the available PBKDF2 implementation in your Rust dependencies:

// Example: Using PBKDF2 for credential encryption
use pbkdf2::{pbkdf2_hmac};
use sha2::Sha256;

fn derive_encryption_key(password: &[u8], salt: &[u8]) -> [u8; 32] {
    let mut key = [0u8; 32];
    pbkdf2_hmac::<Sha256>(password, salt, 100_000, &mut key);
    key
}

5. Scan Dependencies Regularly

Use tools like Trivy, npm audit, or Snyk to catch vulnerable dependencies:

# Run Trivy on your project
trivy fs --scanners vuln .

# Or use npm's built-in audit
npm audit

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.

References

Frequently Asked Questions

What is credential header disclosure in HTTP redirects?

When an HTTP client follows a redirect from one domain to another while preserving sensitive headers like Authorization, credentials intended for the original server get sent to the redirect target, potentially exposing OAuth tokens or API keys to untrusted parties.

How do you prevent credential header disclosure in Electron apps?

Keep electron-updater and builder-util-runtime updated to versions that strip sensitive headers before following cross-origin redirects, and implement additional validation in your update server configuration.

What CWE is credential header disclosure?

CWE-522 (Insufficiently Protected Credentials) covers scenarios where credentials are transmitted or stored without adequate protection, including disclosure via HTTP redirects.

Is HTTPS enough to prevent credential header disclosure?

No, HTTPS only encrypts data in transit. If your application follows a redirect to a malicious server, that server receives your credentials even over HTTPS—the encryption just prevents eavesdroppers from seeing the leaked credentials.

Can static analysis detect credential header disclosure?

Yes, tools like Trivy can identify vulnerable dependency versions in package-lock.json, and SAST tools can flag HTTP client configurations that don't sanitize headers on redirects.

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #86

Related Articles

critical

How missing authentication checks happen in React route handlers and how to fix it

A critical vulnerability in ManageMembers.jsx and Settings.jsx allowed any user with network access to perform privileged operations like adding, editing, and deleting members without authentication. The fix implements route-level authentication checks using React Router's Navigate component to redirect unauthenticated users to the login page.

high

How denial of service via malformed HTTP header decoding happens in Node.js OpenTelemetry and how to fix it

A high-severity denial of service vulnerability (CVE-2026-59892) was discovered in the @opentelemetry/propagator-jaeger package, where malformed HTTP headers could crash Node.js applications. The fix involved upgrading from version 2.8.0 to 2.9.0, which includes proper input validation for Jaeger trace context headers.

high

How API key exposure and ReDoS happens in Node.js and how to fix it

A critical vulnerability in `roll/openai.js` could expose OpenAI API keys to client-side JavaScript bundles, allowing attackers to extract secrets from browser developer tools. Additionally, a Regular Expression Denial of Service (ReDoS) pattern in the `generateErrorMessage()` method could crash the process. Both issues were fixed with targeted, minimal code changes.

medium

How OAuth token audience bypass happens in Node.js serverless functions and how to fix it

A critical OAuth authentication vulnerability in a Netlify serverless function allowed any valid Google OAuth token—even those issued to completely different applications—to authenticate successfully. The fix adds proper audience (aud) claim verification using Google's tokeninfo endpoint to ensure only tokens issued specifically for this application are accepted.

high

How signature verification bypass happens in Node.js crypto and how to fix it

A high-severity signature verification bypass was discovered in `apps/panel/panel.js` where the `JMkey` variable was passed directly to `Buffer.from(JMkey, 'hex')` without validating its format. An attacker could supply a malformed hex string to cause silent failures or unexpected behavior in the RSA-SHA256 verification process, potentially bypassing signature checks entirely. The fix adds strict hex format validation before processing.

critical

How shell metacharacter injection happens in Node.js SSH provisioning and how to fix it

A critical command injection vulnerability was discovered in `services/onuProvisionService.js`, where the `sanitizeCliInput` function only stripped newlines and carriage returns from user input before passing it to SSH shell streams. Attackers could inject shell metacharacters like semicolons, pipes, and backticks to execute arbitrary commands on network infrastructure devices such as ONU/ONT hardware. The fix expands the sanitization regex to strip all dangerous shell metacharacters, closing th