LIVE NEWSROOM · --:-- · May 25, 2026
A LIBRARY FOR SECURITY RESEARCHERS

CWE WEAKNESSES  /  CWE-494

CWE-494

Download of Code Without Integrity Check

Base EXPLOIT LIKELIHOOD: MEDIUM

What it is

The product downloads source code or an executable from a remote location and executes the code without sufficiently verifying the origin and integrity of the code.

An attacker can execute malicious code by compromising the host server, performing DNS spoofing, or modifying the code in transit.

Impact

Integrity, Availability, Confidentiality, OtherExecute Unauthorized Code or Commands, Alter Execution Logic, Other

Mitigations

  • [Implementation] Perform proper forward and reverse DNS lookups to detect DNS spoofing.
  • [Architecture and Design, Operation]Encrypt the code with a reliable encryption scheme before transmitting.This will only be a partial solution, since it will not detect DNS spoofing and it will not prevent your code from being modified on the hosting site.
  • [Architecture and Design]Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].Speficially, it may be helpful to use tools or frameworks to perform integrity checking on the transmitted code.- When providing the code that is to be downloaded, such as for automatic updates of the software, then use cryptographic signa
  • [Architecture and Design, Operation] Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database ad
  • [Architecture and Design, Operation]Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software.OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. Fo

Real-world CVE examples

  • CVE-2019-9534 — Satellite phone does not validate its firmware image.
  • CVE-2021-22909 — Chain: router's firmware update procedure uses curl with "-k" (insecure) option that disables certificate validation (CWE-295), allowing adversary-in-the-middle
  • CVE-2008-3438 — OS does not verify authenticity of its own updates.
  • CVE-2008-3324 — online poker client does not verify authenticity of its own updates.
  • CVE-2001-1125 — anti-virus product does not verify automatic updates for itself.
  • CVE-2002-0671 — VOIP phone downloads applications from web sites without verifying integrity.

Related weaknesses

Test & detect

Browse all common weaknesses, check related exploited CVEs, or map to ATT&CK techniques.

Source: MITRE CWE. View on cwe.mitre.org →

Scroll to Top