CWEweakness

CWE-494 Download of Code Without Integrity Check

Medium Official page ↗
Abstraction
Base
Structure
Simple
Status
Draft
Likelihood of exploit
Medium
Languages
Not Language-Specific
CWE version
5.0

Description

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.

Common consequences

• Integrity, Availability, Confidentiality, Other: Execute Unauthorized Code or Commands, Alter Execution Logic, Other — An attacker can execute malicious code by compromising the host server, performing DNS spoofing, or modifying the code in transit. Executing untrusted code could compromise the control flow of the program. The untrusted code could execute attacker-controlled commands, read or modify sensitive resources, or prevent the software from functioning correctly for legitimate users.

Potential 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. • [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 signatures for the code and modify the download clients to verify the signatures. Ensure that the implementation does not contain CWE-295, CWE-320, CWE-347, and related weaknesses. • Use code signing technologies such as Authenticode. See references [REF-454] [REF-455] [REF-456]. • [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 administrator, especially in day-to-day operations. • [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. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.

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.)

Observed 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 (AITM) compromise with a malicious firmware image (CWE-494). • 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

Attack pattern · CAPEC (12)

  • CAPEC-184 Software Integrity Attack attack pattern
  • CAPEC-185 Malicious Software Download attack pattern
  • CAPEC-186 Malicious Software Update attack pattern
  • CAPEC-187 Malicious Automated Software Update via Redirection attack pattern
  • CAPEC-533 Malicious Manual Software Update attack pattern
  • CAPEC-538 Open-Source Library Manipulation attack pattern
  • CAPEC-657 Malicious Automated Software Update via Spoofing attack pattern
  • CAPEC-662 Adversary in the Browser (AiTB) attack pattern
  • CAPEC-691 Spoof Open-Source Software Metadata attack pattern
  • CAPEC-692 Spoof Version Control System Commit Metadata attack pattern
  • CAPEC-693 StarJacking attack pattern
  • CAPEC-695 Repo Jacking attack pattern

Observed example · CVE (6)

  • CVE-2021-22909 A vulnerability found in EdgeMAX EdgeRouter V2.0.9 and earlier could allow a malicious actor to execute a man-in-the-middle (MitM) attack… vulnerability
  • CVE-2019-9534 The Cobham EXPLORER 710, firmware version 1.07, does not validate its firmware image. vulnerability
  • CVE-2008-3324 The PartyGaming PartyPoker client program 121/120 does not properly verify the authenticity of updates, which allows remote… vulnerability
  • CVE-2008-3438 Apple Mac OS X does not properly verify the authenticity of updates, which allows man-in-the-middle attackers to execute arbitrary code via… vulnerability
  • CVE-2002-0671 Pingtel xpressa SIP-based voice-over-IP phone 1.2.5 through 1.2.7.4 downloads phone applications from a web site but can not verify the… vulnerability
  • CVE-2001-1125 Symantec LiveUpdate before 1.6 does not use cryptography to ensure the integrity of download files, which allows remote attackers to… vulnerability

Child of · CWE (2)

  • CWE-345 Insufficient Verification of Data Authenticity weakness
  • CWE-669 Incorrect Resource Transfer Between Spheres weakness

Referenced by CAPEC · weakness (12)

  • CAPEC-184 Software Integrity Attack attack pattern
  • CAPEC-185 Malicious Software Download attack pattern
  • CAPEC-186 Malicious Software Update attack pattern
  • CAPEC-187 Malicious Automated Software Update via Redirection attack pattern
  • CAPEC-533 Malicious Manual Software Update attack pattern
  • CAPEC-538 Open-Source Library Manipulation attack pattern
  • CAPEC-657 Malicious Automated Software Update via Spoofing attack pattern
  • CAPEC-662 Adversary in the Browser (AiTB) attack pattern
  • CAPEC-691 Spoof Open-Source Software Metadata attack pattern
  • CAPEC-692 Spoof Version Control System Commit Metadata attack pattern
  • CAPEC-693 StarJacking attack pattern
  • CAPEC-695 Repo Jacking attack pattern

Referenced by CVE · weakness (254)

  • CVE-2026-113717 virtualenv is a tool for creating isolated virtual python environments. vulnerability
  • CVE-2026-105036 EnergizeLab AI Station firmware, EilikO Linux robot firmware v2.1_20260617182218_release, and the EnergizeLab Windows desktop app 3.1.2… vulnerability
  • CVE-2026-93649 In the Eclipse Adoptium website (adoptium.net), in every deployment built from commit 0b24ea1 (2025-06-18) up to the fix in commit cbb53cf… vulnerability
  • CVE-2026-110102 Powerlevel10k through 1.20.0 contains an insecure download vulnerability in the gitstatus/install script that disables TLS certificate… vulnerability
  • CVE-2026-86063 Claude Code is an agentic coding tool. vulnerability
  • CVE-2026-107812 Nginx UI is a web user interface for the Nginx web server. vulnerability
  • CVE-2026-108160 AstronRPA through 1.1.6 contains a download of code without integrity check vulnerability that allows network attackers to deliver… vulnerability
  • CVE-2026-29797 No authentication is required when updating firmware or bootloader, making it easy for malicious files to be pushed to the device. vulnerability
  • CVE-2026-104805 DigitalCanion has discovered a vulnerability in the backup restoration functionality that allows an attacker with access to the configured… vulnerability
  • CVE-2026-104809 DigitalCanion has discovered a vulnerability that allows an attacker to cause the system to load an attacker-controlled .so file instead of… vulnerability
  • CVE-2026-105295 GitAhead 2.5.0 through 2.7.1 contains an insecure update mechanism that installs downloaded updates without integrity or signature… vulnerability
  • CVE-2026-105137 A vulnerability was found in Laradock up to 20.4. vulnerability
  • CVE-2026-55251 NetBox Device Type Library is a collection of community-sourced device type definitions for import into NetBox. vulnerability
  • CVE-2026-100265 In JetBrains Rider before 2026.2.1 aI Assistant could auto-update third-party skills without user confirmation vulnerability
  • CVE-2026-102930 virtualenv is a tool for creating isolated virtual python environments. vulnerability
  • CVE-2026-73595 Dell Secure Connect Gateway (SCG) Policy Manager, versions prior to 5.34.00.16, Versions prior to 5.36, contains a Download of Code Without… vulnerability
  • CVE-2026-96455 The Reachy Mini daemon exposes an HTTP API for managing the robot. vulnerability
  • CVE-2026-49450 Joplin is an open source note-taking and to-do application that organises notes and lists into notebooks. vulnerability
  • CVE-2026-7006 Sublime Text for Windows through Build 4192 (Sublime Text 4) and Build 3207 (Sublime Text 3) contains a local privilege escalation… vulnerability
  • CVE-2026-93534 A vulnerability was identified in spatie Scotty up to 1.4.2. vulnerability
  • CVE-2026-92128 Jenkins Script Security Plugin 1415.v9a_f9b_3a_c253d and earlier downloads a JAR file specified by URL twice, confirming the approval of… vulnerability
  • CVE-2026-63696 Dell SmartFabric OS10 Software, versions prior to 10.6.1.3, contains a Download of Code Without Integrity Check vulnerability. vulnerability
  • CVE-2026-81052 Dell ThinOS 10, versions prior to 2605_10.2616, contain a Download of Code Without Integrity Check vulnerability. vulnerability
  • CVE-2026-79963 Dell SCG 5.0 Appliance versions prior to 5.36.00.16 and Dell SCG 5.0 Application versions prior to 5.36.00.00, contains a Download of Code… vulnerability
  • CVE-2026-62654 A vulnerability has been identified in Reyrolle 7SR5 (All versions < V2.70). vulnerability
  • CVE-2026-85427 MOOS essential-moos pAntler through 10.0.1 contains a remote code execution vulnerability that allows unauthenticated attackers to execute… vulnerability
  • CVE-2026-84664 Jenkins GitLab Plugin 1.9.16 and earlier allows overwriting the global GitLab connection configuration through Stapler data binding,… vulnerability
  • CVE-2026-84666 Jenkins Job Configuration History Plugin 1367.vc8fa_b_15101dc and earlier allows overwriting the plugin's history recording configuration… vulnerability
  • CVE-2026-80047 A vulnerability in Hugging Face Transformers (versions 4.57.0 to 5.16.1) allows remote Python files to be written to local disk without… vulnerability
  • CVE-2026-82021 Hermes Agent 0.18.2 prior to 0.19.0 contains a supply chain vulnerability in its bundled MCP catalog that allows a remote attacker to… vulnerability
Show all 254 ›

Referenced by CWE · can precede (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

Referenced by CWE · has member (1)

Referenced by OWASP · mapped cwe (2)

  • A08:2025 Software or Data Integrity Failures Top 10 2025
  • A08:2021 Software and Data Integrity Failures Top 10 2021