Skip to content
OpenAdvisories

Weakness (CWE)

CWE-494: Download of Code Without Integrity Check

Base Draft

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.

How to prevent it (5 mitigations)
  1. Implementation

    Perform proper forward and reverse DNS lookups to detect DNS spoofing.

  2. Architecture and Design, Operation

    Encrypt the code with a reliable encryption scheme before transmitting.

  3. 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].

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

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

Source: MITRE CWE-494

11 results · Clear filters · Feed

  • Low 3.1

    Vikunja before 2.7.1 Supply Chain Risk via Unpinned xgo Release Toolchain

    Vikunja before 2.7.1 contains a supply chain vulnerability in its mage release targets that fetch the xgo module and Docker image by mutable latest references. Attackers who compromise the upstream xgo module, image, or registry can inject malicious code into…

  • Low 3.1

    nvm install --offline installs a cached tarball that previously failed checksum verification

    Node Version Manager (nvm) is a POSIX-compliant shell function for managing multiple node.js versions. In versions 0.40.5 through 0.40.8, `nvm_download_artifact` downloads a release archive directly to its final path in `$NVM_DIR/.cache` and verifies its chec…

  • Low 2.3

    virtualenv: Pip seeding with download omits wheel digest verification

    virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, PipInvoke.get_pip_install_cmd() handles --seeder pip --download by calling get_wheel(download=False) and then allowing pip to consult the configured index, bypassing vir…

  • Low 3.3

    Denial of service (DoS) vulnerability in the office service. Impact: Successful exploitation of this vulnerability may …

  • Low 3.3

    Denial of service (DoS) vulnerability in the office service. Impact: Successful exploitation of this vulnerability may …

  • Low 3.3

    Denial of service (DoS) vulnerability in the office service. Impact: Successful exploitation of this vulnerability may …

  • Low 3.3

    Denial of service (DoS) vulnerability in the office service. Impact: Successful exploitation of this vulnerability may …

  • Low 2.0

    Vulnerability in PointCloudLibrary PCL

    Vulnerability in PointCloudLibrary PCL (surface/src/3rdparty/opennurbs modules). This vulnerability is associated with program files crc32.C. This vulnerability is only relevant if the PCL version is older than 1.14.0 or the user specifically requests to not …

  • Low 2.5

    HCL BigFix Patch Download Plug-ins are affected by an arbitrary file download vulnerability

    BigFix Patch Download Plug-ins are affected by an arbitrary file download vulnerability. It could allow a malicious operator to download files from arbitrary URLs without any proper validation or allowlist controls.

  • Low 2.1

    Lack of integrity check on the downloaded FRP client in Gradio

    Gradio is an open-source Python package designed for quick prototyping. This vulnerability is a **lack of integrity check** on the downloaded FRP client, which could potentially allow attackers to introduce malicious code. If an attacker gains access to the r…

  • Low 3.3
    CVE-2021-44168 Exploited Public exploit

    A download of code without integrity check vulnerability in the "execute restore src-vis" command of FortiOS before 7.0…

    KEV Dec 10, 2021