CWE-494 / WEAKNESS
Download of Code Without Integrity Check
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.
- Category
- CWE weaknesses
- Version / scope
- CWE 5.0; release 2026-10-28; publisher status Draft
- Affected / relevant technologies
- Not Language-Specific
- Evidence
- Documentation: pinned-source excerpt checked. Execution: not tested. Editorial: curated reference.
Defensive analysis and explicitly authorized assessment only. This website performs no scans, exploitation, model calls or infrastructure changes. Indicators below are investigation opportunities, not proof of compromise or guaranteed detectors.
Mechanism and prerequisites
Review publisher context and local applicability; this reference is not execution evidence.
Potential impact
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.
Versioned source scope
This record contains normalized, sometimes shortened source excerpts with editorial safety context. Markup and executable example blocks are omitted. Source-field verification does not establish device testing, a working detector or local applicability.
Publisher: MITRE. Release: CWE 5.0. Source checked: 2026-11-26.
Source object: CWE-494. Object modified: 2026-10-28.
Attribution and source terms (© The MITRE Corporation; reproduced with permission)Detection and investigation
- 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. These may be more effective than strictly automated techniques. This is especially the case with weaknesses that are related to design and business rules.
- 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.) High
Preserve source timestamps, asset identity and collection context. Correlate independent evidence before attributing malicious intent. In OT, review passive evidence with the process owner; do not induce failures, replay commands or write to controllers to test a hypothesis.
Mitigation and response
- Implementation Perform proper forward and reverse DNS lookups to detect DNS spoofing. This is only a partial solution since it will not prevent your code from being modified on the hosting site or in transit.
- 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 Libraries or Frameworks 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 Environment Hardening 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.
Apply changes through the asset owner's approved change and recovery process. Documentation review is separate from successful testing or verified production protection.
Related technical context
No protocol-specific mapping is asserted for this entry.
Publisher weakness and attack-pattern relationships
These relationships retain the publisher's source attributes and view context; they do not establish that an attack or weakness applies to a particular system.
- CAPEC-184 → Related_Weakness → CWE-494 Open related reference
- CAPEC-185 → Related_Weakness → CWE-494 Open related reference
- CAPEC-186 → Related_Weakness → CWE-494 Open related reference
- CAPEC-187 → Related_Weakness → CWE-494 Open related reference
- CAPEC-533 → Related_Weakness → CWE-494 Open related reference
- CAPEC-538 → Related_Weakness → CWE-494 Open related reference
- CAPEC-657 → Related_Weakness → CWE-494 Open related reference
- CAPEC-662 → Related_Weakness → CWE-494 Open related reference
- CAPEC-691 → Related_Weakness → CWE-494 Open related reference
- CAPEC-692 → Related_Weakness → CWE-494 Open related reference
- CAPEC-693 → Related_Weakness → CWE-494 Open related reference
- CAPEC-695 → Related_Weakness → CWE-494 Open related reference
- CWE-494 → Related_Attack_Pattern → CAPEC-184 Open related reference
- CWE-494 → Related_Attack_Pattern → CAPEC-185 Open related reference
- CWE-494 → Related_Attack_Pattern → CAPEC-186 Open related reference
- CWE-494 → Related_Attack_Pattern → CAPEC-187 Open related reference
- CWE-494 → Related_Attack_Pattern → CAPEC-533 Open related reference
- CWE-494 → Related_Attack_Pattern → CAPEC-538 Open related reference
- CWE-494 → Related_Attack_Pattern → CAPEC-657 Open related reference
- CWE-494 → Related_Attack_Pattern → CAPEC-662 Open related reference
- CWE-494 → Related_Attack_Pattern → CAPEC-691 Open related reference
- CWE-494 → Related_Attack_Pattern → CAPEC-692 Open related reference
- CWE-494 → Related_Attack_Pattern → CAPEC-693 Open related reference
- CWE-494 → Related_Attack_Pattern → CAPEC-695 Open related reference
- CWE-494 → ChildOf → CWE-345 Open related reference
- CWE-494 → ChildOf → CWE-669 Open related reference
- CWE-494 → ChildOf → CWE-669 Open related reference
- CWE-79 → CanPrecede → CWE-494 Open related reference
Authoritative sources and attribution
Identifiers and source titles belong to OWASP, MITRE, the CVE Program, CISA, NIST or the cited vendor. Source excerpts are attributed and adapted under the linked publisher license; editorial context is separate. This is not an official framework mirror. Review baseline: 2026-11-18. Live documents can change; check exact current applicability.
- https://cwe.mitre.org/data/definitions/494.html — Publisher link; not separately HTTP-checked
- MITRE CWE 5.0 source snapshot — source accessed 2026-11-26
Source review supports bounded reference text. It is not execution evidence, a completeness claim, a CVSS assessment, a compliance certification or verification of production security.
