Back to Blog
critical SEVERITY3 min read

Updater.parseUpdate() CWE-494: Unsigned Metadata Download

The parseUpdate function in the Updater component extracted download URLs from remote server responses without cryptographic verification, enabling supply chain attacks via compromised or spoofed update servers. The fix adds strict URL validation requiring HTTPS and a trusted hostname before accepting any update metadata.

O
By Orbis AppSec
•Published September 26, 2026•Reviewed September 26, 2026

Answer Summary

First-party code in the Updater utility's parseUpdate function accepted arbitrary update URLs from unsigned server responses. An attacker with MITM capabilities or a compromised update server could redirect users to malicious executables during auto-update. Fixed by adding isTrustedUrl() validation requiring HTTPS protocol and codedead.com hostname. CWE-494 (Download of Code Without Integrity Check).

Vulnerability at a Glance

cweCWE-494
fixAdded isTrustedUrl() validation enforcing HTTPS and trusted hostname
riskCritical — attacker-controlled code execution via malicious update
languageJavaScript
root causeparseUpdate extracted downloadUrl and infoUrl from unsigned server responses without cryptographic verification
vulnerabilityDownload of Code Without Integrity Check (CWE-494)

Affected Versions

Affected not applicable (first-party code)
Fixed in not applicable (first-party code) — see PR for fix commit
Ecosystem JavaScript (Node.js/Electron)
CVE / GHSA not assigned
CWE CWE-494: Download of Code Without Integrity Check

The Vulnerability Explained

The parseUpdate function in the Updater component accepted server responses containing arbitrary downloadUrl and infoUrl values without any cryptographic verification. The original implementation extracted these URLs directly from the JSON response:

return {
  updateUrl: sortedReleases[0].downloadUrl,
  infoUrl: sortedReleases[0].infoUrl,
  version: sortedReleases[0].semver,
  updateAvailable:
    semverCompare(currentVersion, sortedReleases[0].semver) < 0,
};

The vulnerability lies in the complete absence of integrity verification. An attacker who compromised the update server, poisoned DNS, or positioned themselves as a man-in-the-middle could return a response pointing downloadUrl to https://evil.com/malware.exe. The application would then download and potentially execute this payload during the auto-update flow.

The regression test demonstrates the attack precisely: payloads like { updateUrl: 'https://evil.com/malware.exe', infoUrl: 'https://evil.com', version: '9.9.9' } would have been accepted and processed. Even a payload with a checksum field or empty signature passed through without verification—the code simply never checked these fields.

The Fix

The remediation adds an isTrustedUrl helper that validates both protocol and hostname before accepting any URL from the server response:

const isTrustedUrl = (url) => {
  try {
    const parsed = new URL(url);
    return (
      parsed.protocol === 'https:' && parsed.hostname === 'codedead.com'
    );
  } catch {
    return false;
  }
};

if (!isTrustedUrl(downloadUrl) || !isTrustedUrl(infoUrl)) {
  throw new Error('Update metadata contains an untrusted URL');
}

This change transforms the function from passive extraction to active validation. The destructured downloadUrl and infoUrl from sortedReleases[0] now undergo mandatory scrutiny. The fix addresses the root cause by ensuring that even if an attacker compromises the transport layer or the update server itself, the application will only accept updates from the explicitly trusted origin.

Note that this is a partial fix—true supply chain security requires cryptographic signature verification of the downloaded executable itself, not just transport-layer and origin validation. However, this change eliminates the trivial MITM and server compromise vectors.

Key Takeaways

  • Destructured values from remote responses are attacker-controlled until proven otherwise: The pattern const { downloadUrl, infoUrl } = sortedReleases[0] assumes trust in data that crossed a network boundary. Always validate before use.

  • new URL() parsing with protocol and hostname checks prevents origin confusion: The isTrustedUrl implementation uses the WHATWG URL standard to parse, then validates both scheme and host. This is more robust than string prefix matching which can be bypassed with https://attacker.com@codedead.com or similar tricks.

  • Auto-update mechanisms are critical security boundaries requiring defense in depth: Transport security (TLS) alone is insufficient. This fix layers origin validation on top of HTTPS, reducing the attack surface even if certificates are compromised.

  • Empty or present-but-unverified integrity fields provide no security: The original code likely had checksum or signature fields in the response schema, but since they were never verified, their presence created false confidence. Either verify cryptographically or reject.

How Orbis AppSec Detected This

Source: The downloadUrl and infoUrl fields from the remote server response in the Updater's parseUpdate function

Sink: The return statement that passes these URLs to the caller for subsequent download and execution

Missing control: No cryptographic signature verification, checksum validation, or URL origin restrictions on attacker-controlled update metadata

CWE: CWE-494 — Download of Code Without Integrity Check

Fix: Added isTrustedUrl validation requiring HTTPS protocol and codedead.com hostname before accepting any update metadata

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

The parseUpdate vulnerability illustrates how auto-update mechanisms become critical supply chain attack vectors when they trust remote metadata without verification. The fix demonstrates practical defense in depth: combining transport security with explicit origin allowlisting. Developers implementing similar functionality should consider this a minimum bar—full cryptographic verification of downloaded binaries remains essential for complete protection.

Prevention and further reading

Frequently Asked Questions

Why does parseValidate now reject update metadata with valid HTTPS URLs from hosts other than codedead.com?

The fix implements defense-in-depth: even with HTTPS, certificate compromise or DNS hijacking could redirect to attacker-controlled origins. Hardcoding the expected hostname eliminates this entire attack class for this update channel.

Does the isTrustedUrl validation occur before or after semver comparison in parseUpdate?

The check occurs after sorting releases by semver but before returning any URL to the caller. This ensures even "newer" versions from untrusted origins are rejected, preventing downgrade or substitution attacks.

What happens to the downloadUrl and infoUrl destructured from sortedReleases[0] if isTrustedUrl returns false?

The function throws "Update metadata contains an untrusted URL" immediately, preventing the caller from ever receiving untrusted URLs. No partial extraction or fallback occurs.

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #79

Related Articles

high

brace-expansion DoS: Exponential Backtracking in Nested Brace Patterns

A critical vulnerability in brace-expansion allows attackers to cause denial of service by submitting specially crafted patterns with nested braces. The exponential-time complexity in pattern expansion creates a computationally expensive path that can freeze applications processing user-controlled input.

high

CVE-2026-67213: nanoid customAlphabet Infinite Loop Fix

nanoid, a widely-used ID generator pulled in transitively through postcss and vitepress, had an infinite-loop bug in its `customAlphabet` code path before version 5.1.6. This PR pins the entire dependency tree to nanoid 5.1.16 via a pnpm override so no transitive consumer can resolve back to the vulnerable 3.3.16 release.

high

KNX Project Extractor ZIP Bomb: Unbounded Decompression Before Size

The KNX project extractor used `@zip.js/zip.js` to decompress .knxproj files without enforcing maximum entry sizes, total archive sizes, or compression ratios. This allowed attackers to upload ZIP bombs that expanded exponentially—like the famous 42.zip producing 4.5PB from 42KB—consuming all available memory before the existing `Checked` validation could trigger. The fix introduces three hard limits: 512MB per entry, 1GB total per archive, and a 100:1 compression ratio ceiling.

high

Spring Boot Actuator Wildcard Exposure in 2021.04 Provisioning

A misconfigured Spring Boot Actuator in the ArkCase 2021.04 provisioning template exposed all management endpoints through wildcard inclusion. The fix narrows exposure to health and info endpoints only, eliminating unauthenticated access to sensitive runtime data.

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.

critical

POST /api/generate Lacks Authentication, Allowing Unauthenticated

A resume generation endpoint in a Node.js backend accepted requests from any caller with network access, allowing attackers to consume OpenAI API quota without restriction. The vulnerability stemmed from missing authentication middleware on a cost-bearing endpoint. The fix adds mandatory API key validation via HTTP headers before processing any generation requests.