CWE-494: Download of Code Without Integrity Check

low-risk

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.

Abstraction: Base

Common Consequences

Integrity Execute Unauthorized Code or Commands

Detection Methods

Manual Analysis

This weakness can be detected using tools and techniques that require manual (human) analysis, such as penetration testing, threat modeling, and interactive tools that allow the tester to record and modify an active session. Specifically, manual static analysis is typically required to find the behavior that triggers the download of code, and to determine whether integrity-checking methods are in use.

Black Box

Use monitoring tools that examine the software's process as it interacts with the operating system and the network. This technique is useful in cases when source code is unavailable, if the software was not developed by you, or if you want to verify that the build phase did not introduce any new weaknesses. Examples include debuggers that directly attach to the running process; system-call tracing utilities such as truss (Solaris) and strace (Linux); system activity monitors such as FileMon, RegMon, Process Monitor, and other Sysinternals utilities (Windows); and sniffers and protocol analyzers that monitor network traffic. Attach the monitor to the process and also sniff the network connection. Trigger features related to product updates or plugin installation, which is likely to force a code download. Monitor when files are downloaded and separately executed, or if they are otherwise read back into the process. Look for evidence of cryptographic library calls that use integrity checking.

Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Real-World Examples (10)

CVE CVSS EPSS KEV
CVE-2020-5398 7.5 90.2%
CVE-2026-27180 9.8 47.9%
CVE-2022-40799 8.8 37.1% Y
CVE-2022-40799 8.8 37.1% Y
CVE-2021-45027 7.5 14.2%
CVE-2022-27438 8.1 12.3%
CVE-2022-28944 8.8 10.9%
CVE-2022-24644 8.8 10.8%
CVE-2025-15556 7.5 6.1% Y
CVE-2018-19234 8.8 4.6%
5
/ 100
low-risk
Active Threat 4/50 · Minimal
Exploit Availability 1/50 · Minimal