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

high

How Quadratic CPU Consumption Vulnerabilities Happen in JavaScript YAML Parsers and How to Fix Them

A high-severity denial-of-service vulnerability in js-yaml versions 3.x and 4.x allowed attackers to trigger quadratic CPU consumption through specially crafted YAML documents using the !!omap tag. This fix upgrades js-yaml from 4.1.1 to 4.3.1 and from 3.14.2 to 3.15.1, eliminating the algorithmic complexity attack vector that could freeze Node.js applications processing untrusted YAML input.

high

How javascript.lang.security.detect-child-process.detect-child-process happens in Node.js and how to fix it

A high-severity command injection vulnerability was discovered in `scripts/build.js` where `execSync` was called with string-interpolated arguments (`sourceDir` and `outputPath`) inside a shell command. By replacing `execSync` with `spawnSync` using an argument array (no shell), the fix eliminates the possibility of shell metacharacter injection while preserving identical build behavior.

high

How Command Injection happens in Node.js child_process and how to fix it

A command injection vulnerability in nix.js's Release class allowed potentially malicious input through the `arch` parameter to be executed via shell commands. The fix replaced `execSync()` with `execFileSync()`, eliminating shell interpretation and preventing command injection by passing arguments as an array instead of a concatenated string.

critical

How Sensitive Data Exposure in Error Logging happens in TypeScript/Deno and how to fix it

A critical vulnerability in Supabase Edge Functions allowed sensitive authentication errors and API credentials to leak through verbose error logging. The `cancel-subscription/index.ts` function logged full error objects to the console, potentially exposing Paddle API keys and auth tokens in deployment logs. The fix sanitizes all error messages to log only safe error text while preserving debugging capability.

critical

How HTTP Header Injection Happens in Go and How to Fix It

A critical vulnerability in the file upload handler allowed attackers to inject CRLF sequences into HTTP response headers through crafted filenames. The fix sanitizes user-supplied filenames before using them in Content-Disposition headers, preventing header injection attacks that could lead to cache poisoning, session fixation, or XSS.

high

How Path Traversal and Security Policy Bypass Happens in Node.js Dependencies and How to Fix It

A high-severity vulnerability in the fast-uri package (CVE-2026-6321) allowed attackers to bypass security policies through improper Unicode hostname canonicalization and path traversal. This issue affected the @apralabs/apra-fleet project through its dependency tree, and was resolved by upgrading fast-uri from version 3.1.0 to 4.1.2 using npm overrides.