| Impact | Details |
|---|---|
|
Execute Unauthorized Code or Commands; Alter Execution Logic; Other |
Scope: Integrity, Availability, Confidentiality, Other
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.
|
| Phase(s) | Mitigation |
|---|---|
|
Implementation |
Perform proper forward and reverse DNS lookups to detect DNS spoofing.
Note:
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 |
Strategy: 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.
|
|
Architecture and Design; Operation |
Strategy: 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.
|
|
Architecture and Design; Operation |
Strategy: Sandbox or Jail 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. Effectiveness: Limited Note:
The effectiveness of this mitigation depends on the prevention capabilities of the specific sandbox or jail being used and might only help to reduce the scope of an attack, such as restricting the attacker to certain system calls or limiting the portion of the file system that can be accessed.
|
| Nature | Type | ID | Name |
|---|---|---|---|
| ChildOf | Class Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource. | 345 | Insufficient Verification of Data Authenticity |
| ChildOf | Class Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource. | 669 | Incorrect Resource Transfer Between Spheres |
| CanFollow | Base Base - a weakness that is still mostly independent of a resource or technology, but with sufficient details to provide specific methods for detection and prevention. Base level weaknesses typically describe issues in terms of 2 or 3 of the following dimensions: behavior, property, technology, language, and resource. | 79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') |
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | Category Category - a CWE entry that contains a set of other entries that share a common characteristic. | 1214 | Data Integrity Issues |
| Nature | Type | ID | Name |
|---|---|---|---|
| ChildOf | Class Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource. | 669 | Incorrect Resource Transfer Between Spheres |
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | Category Category - a CWE entry that contains a set of other entries that share a common characteristic. | 1020 | Verify Message Integrity |
| Phase | Note |
|---|---|
| Architecture and Design | OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase. |
| Implementation |
Class: Not Language-Specific (Undetermined Prevalence)
Example 1
This example loads an external class from a local subdirectory.
This code does not ensure that the class loaded is the intended one, for example by verifying the class's checksum. An attacker may be able to modify the class file to execute malicious code.
Example 2
This code includes an external script to get database credentials, then authenticates a user against the database, allowing access to the application.
This code does not verify that the external domain accessed is the intended one. An attacker may somehow cause the external domain name to resolve to an attack server, which would provide the information for a false database. The attacker may then steal the usernames and encrypted passwords from real user login attempts, or simply allow themself to access the application without a real user account.
This example is also vulnerable to an Adversary-in-the-Middle AITM (CWE-300) attack.
Note: this is a curated list of examples for users to understand the variety of ways in which this weakness can be introduced. It is not a complete list of all CVEs that are related to this CWE entry.
| Reference | Description |
|---|---|
|
Satellite phone does not validate its firmware image.
|
|
|
OS does not verify authenticity of its own updates.
|
|
|
online poker client does not verify authenticity of its own updates.
|
|
|
anti-virus product does not verify automatic updates for itself.
|
|
|
VOIP phone downloads applications from web sites without verifying integrity.
|
| Method | Details |
|---|---|
|
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.)
Effectiveness: High |
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 752 | 2009 Top 25 - Risky Resource Management |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 802 | 2010 Top 25 - Risky Resource Management |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 859 | The CERT Oracle Secure Coding Standard for Java (2011) Chapter 16 - Platform Security (SEC) |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 865 | 2011 Top 25 - Risky Resource Management |
| MemberOf | ViewView - a subset of CWE entries that provides a way of examining CWE content. The two main view structures are Slices (flat lists) and Graphs (containing relationships between entries). | 884 | CWE Cross-section |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 991 | SFP Secondary Cluster: Tainted Input to Environment |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1354 | OWASP Top Ten 2021 Category A08:2021 - Software and Data Integrity Failures |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1364 | ICS Communications: Zone Boundary Failures |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1411 | Comprehensive Categorization: Insufficient Verification of Data Authenticity |
Rationale
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.Comments
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.Research Gap
| Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
|---|---|---|---|
| CLASP | Invoking untrusted mobile code | ||
| The CERT Oracle Secure Coding Standard for Java (2011) | SEC06-J | Do not rely on the default automatic signature verification provided by URLClassLoader and java.util.jar | |
| Software Fault Patterns | SFP27 | Tainted input to environment |
| CAPEC-ID | Attack Pattern Name |
|---|---|
| CAPEC-184 | Software Integrity Attack |
| CAPEC-185 | Malicious Software Download |
| CAPEC-186 | Malicious Software Update |
| CAPEC-187 | Malicious Automated Software Update via Redirection |
| CAPEC-533 | Malicious Manual Software Update |
| CAPEC-538 | Open-Source Library Manipulation |
| CAPEC-657 | Malicious Automated Software Update via Spoofing |
| CAPEC-662 | Adversary in the Browser (AiTB) |
| CAPEC-691 | Spoof Open-Source Software Metadata |
| CAPEC-692 | Spoof Version Control System Commit Metadata |
| CAPEC-693 | StarJacking |
| CAPEC-695 | Repo Jacking |
| Submissions | |||
|---|---|---|---|
| Submission Date | Submitter | Organization | |
|
2006年07月19日
(CWE Draft 3, 2006年07月19日) |
CLASP | ||
| Modifications | |||
| Modification Date | Modifier | Organization | |
|
2025年09月09日
(CWE 4.18, 2025年09月09日) |
CWE Content Team | MITRE | |
| updated Potential_Mitigations, References | |||
|
2024年02月29日
(CWE 4.14, 2024年02月29日) |
CWE Content Team | MITRE | |
| updated Demonstrative_Examples, Relationships | |||
| 2023年06月29日 | CWE Content Team | MITRE | |
| updated Mapping_Notes | |||
| 2023年04月27日 | CWE Content Team | MITRE | |
| updated Detection_Factors, References, Relationships | |||
| 2023年01月31日 | CWE Content Team | MITRE | |
| updated Related_Attack_Patterns | |||
| 2022年10月13日 | CWE Content Team | MITRE | |
| updated References, Related_Attack_Patterns | |||
| 2021年10月28日 | CWE Content Team | MITRE | |
| updated Observed_Examples, Relationships | |||
| 2021年07月20日 | CWE Content Team | MITRE | |
| updated Demonstrative_Examples | |||
| 2021年03月15日 | CWE Content Team | MITRE | |
| updated References, Related_Attack_Patterns | |||
| 2020年12月10日 | CWE Content Team | MITRE | |
| updated Demonstrative_Examples | |||
| 2020年08月20日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2020年02月24日 | CWE Content Team | MITRE | |
| updated Demonstrative_Examples, Relationships | |||
| 2019年06月20日 | CWE Content Team | MITRE | |
| updated Related_Attack_Patterns, Relationships | |||
| 2019年01月03日 | CWE Content Team | MITRE | |
| updated Taxonomy_Mappings | |||
| 2017年11月08日 | CWE Content Team | MITRE | |
| updated Modes_of_Introduction, References, Relationships | |||
| 2014年07月30日 | CWE Content Team | MITRE | |
| updated Relationships, Taxonomy_Mappings | |||
| 2012年10月30日 | CWE Content Team | MITRE | |
| updated Potential_Mitigations | |||
| 2012年05月11日 | CWE Content Team | MITRE | |
| updated References, Relationships, Taxonomy_Mappings | |||
| 2011年09月13日 | CWE Content Team | MITRE | |
| updated Potential_Mitigations, References | |||
| 2011年06月27日 | CWE Content Team | MITRE | |
| updated Relationships | |||
| 2011年06月01日 | CWE Content Team | MITRE | |
| updated Common_Consequences, Relationships, Taxonomy_Mappings | |||
| 2011年03月29日 | CWE Content Team | MITRE | |
| updated Demonstrative_Examples | |||
| 2010年12月13日 | CWE Content Team | MITRE | |
| updated Potential_Mitigations | |||
| 2010年09月27日 | CWE Content Team | MITRE | |
| updated Potential_Mitigations, References | |||
| 2010年06月21日 | CWE Content Team | MITRE | |
| updated Common_Consequences, Detection_Factors, Potential_Mitigations, References | |||
| 2010年04月05日 | CWE Content Team | MITRE | |
| updated Applicable_Platforms | |||
| 2010年02月16日 | CWE Content Team | MITRE | |
| updated Detection_Factors, References, Relationships | |||
| 2009年07月27日 | CWE Content Team | MITRE | |
| updated Description, Observed_Examples, Related_Attack_Patterns | |||
| 2009年03月10日 | CWE Content Team | MITRE | |
| updated Potential_Mitigations | |||
| 2009年01月12日 | CWE Content Team | MITRE | |
| updated Applicable_Platforms, Common_Consequences, Description, Name, Other_Notes, Potential_Mitigations, References, Relationships, Research_Gaps, Type | |||
| 2008年09月08日 | CWE Content Team | MITRE | |
| updated Relationships, Other_Notes, Taxonomy_Mappings | |||
| 2008年07月01日 | Eric Dalci | Cigital | |
| updated Time_of_Introduction | |||
| Previous Entry Names | |||
| Change Date | Previous Entry Name | ||
| 2008年04月11日 | Mobile Code: Invoking Untrusted Mobile Code | ||
| 2009年01月12日 | Download of Untrusted Mobile Code Without Integrity Check | ||
Use of the Common Weakness Enumeration (CWE™) and the associated references from this website are subject to the Terms of Use. CWE is sponsored by the U.S. Department of Homeland Security (DHS) Cybersecurity and Infrastructure Security Agency (CISA) and managed by the Homeland Security Systems Engineering and Development Institute (HSSEDI) which is operated by The MITRE Corporation (MITRE). Copyright © 2006–2025, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation.