Skip to content
OpenAdvisories

Weakness (CWE)

CWE-73: External Control of File Name or Path

Base Draft

The product allows user input to control or influence paths or file names that are used in filesystem operations.

How to prevent it (8 mitigations)
  1. Architecture and Design

    When the set of filenames is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames, and reject all other inputs. For example, ID 1 could map to "inbox.txt" and ID 2 could map to "profile.txt". Features such as the ESAPI AccessReferenceMap provide this capability.

  2. Architecture and Design, Operation

    Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict all access to files within a particular directory.

    Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection.

    This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise.

    Be careful to avoid CWE-243 and other weaknesses related to jails.

  3. Architecture and Design

    For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

  4. Implementation

    Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

    When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."

    Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

    When validating filenames, use stringent allowlists that limit the character set to be used. If feasible, only allow a single "." character in the filename to avoid weaknesses such as CWE-23, and exclude directory separators such as "/" to avoid CWE-36. Use a list of allowable file extensions, which will help to avoid CWE-434.

    Do not rely exclusively on a filtering mechanism that removes potentially dangerous characters. This is equivalent to a denylist, which may be incomplete (CWE-184). For example, filtering "/" is insufficient protection if the filesystem also supports the use of "\" as a directory separator. Another possible error could occur when the filtering is applied in a way that still produces dangerous data (CWE-182). For example, if "../" sequences are removed from the ".../...//" string in a sequential fashion, two instances of "../" would be removed from the original string, but the remaining characters would still form the "../" string.

  5. Implementation

    Use a built-in path canonicalization function (such as realpath() in C) that produces the canonical version of the pathname, which effectively removes ".." sequences and symbolic links (CWE-23, CWE-59).

  6. Installation, Operation

    Use OS-level permissions and run as a low-privileged user to limit the scope of any successful attack.

  7. Operation, Implementation

    If you are using PHP, configure your application so that it does not use register_globals. During implementation, develop your application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.

  8. Testing

    Use 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. These may be more effective than strictly automated techniques. This is especially the case with weaknesses that are related to design and business rules.

Source: MITRE CWE-73

281 results · Clear filters · Feed

  • Medium 5.0

    Zoom Workplace for macOS - External Control of File Name or Path

    External control of file name or path in Zoom Workplace for macOS before version 6.5.10 may allow an authenticated user to conduct a disclosure of information via local access.

  • Medium 6.9

    TEC-IT TBarCode SDK 11.15 Remote File Create

    TEC-IT TBarCode version 11.15 contains a vulnerability in the TBarCode11.ocx ActiveX/OCX control's licensing handling (INI-file based) that can be abused to cause remote creation of files on the host filesystem. Depending on where files can be created and whi…

  • Medium 6.7

    External control of file name or path for some Intel(R) CIP software before version WIN_DCA_2.4.0.11001 within Ring 3: …

  • Medium 6.4

    70mai X200 Init Script file inclusion

    A vulnerability was found in 70mai X200 up to 20251019. This issue affects some unknown processing of the component Init Script Handler. The manipulation results in file inclusion. The attack requires a local approach. A high complexity level is associated wi…

  • Medium 4.9
    CVE-2025-12137 Public exploit

    Import WP – Export and Import CSV and XML files to WordPress <= 2.14.16 - Authenticated (Admin+) Arbitrary File Read

    The Import WP – Export and Import CSV and XML files to WordPress plugin for WordPress is vulnerable to Arbitrary File Read in all versions up to, and including, 2.14.16. This is due to the plugin's REST API endpoint accepting arbitrary absolute file paths wit…

  • Medium 5.3

    External Control of File vulnerability has been discovered in opentext Flipper.

    External Control of File Name or Path vulnerability in opentext Flipper allows Path Traversal.  The vulnerability could allow a user to access files hosted on the server. This issue affects Flipper: 3.1.2.

  • Medium 5.3

    External Control of File path vulnerability has been discovered on Openext Flipper.

    External Control of File Name or Path vulnerability in opentext Flipper allows Path Traversal. The vulnerability could allow a user to submit a stored local file path and then download the specified file from the system by requesting the stored document ID. T…

  • Medium 5.3

    Media Library Assistant <= 3.29 - Unauthenticated Limited File Read

    The Media Library Assistant plugin for WordPress is vulnerable to limited file reading in all versions up to, and including, 3.29 via the mla-stream-image.php file. This makes it possible for unauthenticated attackers to read the contents of arbitrary ai/eps/…

  • Medium 6.5

    BIG-IP Configuration utility and tmsh vulnerability

    A validation vulnerability exists in an undisclosed URL in the Configuration utility.  Note: Software versions which have reached End of Technical Support (EoTS) are not evaluated.

  • Medium 6.5

    NTLM Hash Disclosure Spoofing Vulnerability

    External control of file name or path in Windows Core Shell allows an unauthorized attacker to perform spoofing over a network.

  • Medium 6.5

    NTLM Hash Disclosure Spoofing Vulnerability

    External control of file name or path in Windows Core Shell allows an unauthorized attacker to perform spoofing over a network.

  • Medium 6.4

    Newforma Info Exchange (NIX) arbitrary file read and delete

    Newforma Info Exchange (NIX) accepts requests to '/UserWeb/Common/MarkupServices.ashx' specifying the 'DownloadExportedPDF' command that allow an authenticated user to read and delete arbitrary files with 'NT AUTHORITY\NetworkService' privileges. In Newforma …

  • Medium 4.7

    Campcodes Recruitment Management System index.php include file inclusion

    A security flaw has been discovered in Campcodes Recruitment Management System 1.0. This impacts the function include of the file /admin/index.php. The manipulation of the argument page results in file inclusion. It is possible to launch the attack remotely. …

  • Medium 4.8

    Dpanel has an arbitrary file read vulnerability

    dpanel is an open source server management panel written in Go. In versions 1.2.0 through 1.7.2, dpanel allows authenticated users to read arbitrary files from the server via the /api/app/compose/get-from-uri API endpoint. The vulnerability exists in the GetF…

  • Medium 6.5

    Cisco Evolved Programmable Network Manager and Prime Infrastructure Arbitrary File Download Vulnerability

    A vulnerability in the web-based management interface of Cisco Evolved Programmable Network Manager (EPNM) and Cisco Prime Infrastructure could allow an authenticated, low-privileged, remote attacker to retrieve arbitrary files from the underlying file system…

  • Medium 5.5

    Windows Security App Spoofing Vulnerability

    External control of file name or path in Windows Security App allows an authorized attacker to perform spoofing locally.

  • Medium 6.5

    External control of file name or path issue exists in RICOH Streamline NX V3 PC Client versions 3.5.0 to 3.242.0. If an…

  • Medium 5.6

    CVE-2025-22241 salt advisory

    File contents overwrite the VirtKey class is called when “on-demand pillar” data is requested and uses un-validated input to create paths to the “pki directory”. The functionality is used to auto-accept Minion authentication keys based on a pre-placed “author…

  • Medium 5.5

    Windows Security App Spoofing Vulnerability

    External control of file name or path in Windows Security App allows an authorized attacker to perform spoofing locally.

  • Medium 5.4

    OctoPrint vulnerable to possible file extraction via upload endpoints

    OctoPrint provides a web interface for controlling consumer 3D printers. OctoPrint versions up until and including 1.11.1 contain a vulnerability that allows an attacker with the FILE_UPLOAD permission to exfiltrate files from the host that OctoPrint has read…

  • Medium 6.5

    HAX CMS vulnerable to Local File Inclusion via saveOutline API Location Parameter

    HAX CMS PHP allows users to manage their microsite universe with a PHP backend. Prior to version 11.0.0, an authenticated Local File Inclusion (LFI) vulnerability in the HAXCMS saveOutline endpoint allows a low-privileged user to read arbitrary files on the s…

  • Medium 6.1

    Insecure handling of file paths allows multiple local attacks

    Kea configuration and API directives can be used to overwrite arbitrary files, subject to permissions granted to Kea. Many common configurations run Kea as root, leave the API entry points unsecured by default, and/or place the control sockets in insecure pat…

  • Medium 5.9
    CVE-2025-4602 Public exploit

    eMagicOne Store Manager for WooCommerce <= 1.2.5 - Unauthenticated Arbitrary File Read

    The eMagicOne Store Manager for WooCommerce plugin for WordPress is vulnerable to Arbitrary File Reads in all versions up to, and including, 1.2.5 via the get_file() function. This makes it possible for unauthenticated attackers to read the contents of arbitr…

  • Medium 6.5

    Predictable Filename

    Predictable filename vulnerabilities in ASPECT may expose sensitive information to a potential attacker if administrator credentials become compromisedThis issue affects ASPECT-Enterprise: through 3.*; NEXUS Series: through 3.*; MATRIX Series: through 3.*.

  • Medium 6.7

    Microsoft Defender Elevation of Privilege Vulnerability

    External control of file name or path in Microsoft Defender for Endpoint allows an authorized attacker to elevate privileges locally.

  • Medium 6.1

    Gee-netics, member of AXIS Camera Station Pro Bug Bounty Program, has identified an issue with a specific file that the…

  • Medium 6.2

    Windows Admin Center in Azure Portal Information Disclosure Vulnerability

    External control of file name or path in Azure Portal Windows Admin Center allows an unauthorized attacker to disclose information locally.

  • Medium 6.3

    Legrand SMS PowerView file inclusion

    A vulnerability, which was classified as critical, was found in Legrand SMS PowerView 1.x. Affected is an unknown function. The manipulation of the argument redirect leads to file inclusion. It is possible to launch the attack remotely. The exploit has been d…

  • Medium 6.9

    imFAQ allows local file inclusion in seo.php

    imFAQ is an advanced questions and answers management system for ImpressCMS. Prior to 1.0.1, if the $_GET['seoOp'] parameter is manipulated to include malicious input (e.g., seoOp=php://filter/read=convert.base64-encode/resource=/var/www/html/config.php), the…

  • Medium 6.5
    CVE-2025-24054 Exploited Public exploit EPSS 62%

    NTLM Hash Disclosure Spoofing Vulnerability

    External control of file name or path in Windows NTLM allows an unauthorized attacker to perform spoofing over a network.

    KEV Apr 17, 2025
  • Medium 6.5

    NTLM Hash Disclosure Spoofing Vulnerability

    External control of file name or path in Windows NTLM allows an unauthorized attacker to perform spoofing over a network.

  • Medium 6.5

    Simple Download Counter <= 2.0 - Authenticated (Author+) Arbitrary File Read

    The Simple Download Counter plugin for WordPress is vulnerable to Arbitrary File Read in all versions up to, and including, 2.0 via the 'simple_download_counter_download_handler'. This makes it possible for authenticated attackers, with Author-level access an…

  • Medium 6.5

    The account file upload functionality in Syspass 3.2.x fails to properly handle special characters in filenames. This m…

  • Medium 6.8

    Pebble has Arbitrary Local File Inclusion (LFI) Vulnerability via `include` macro

    Versions of the package io.pebbletemplates:pebble from 0 and before 4.1.0 are vulnerable to External Control of File Name or Path via the include tag. A high privileged attacker can access sensitive local files by crafting malicious notification templates tha…

  • Medium 4.4

    Dependency-Track vulnerable to local file inclusion via custom notification templates

    Dependency-Track is a component analysis platform that allows organizations to identify and reduce risk in the software supply chain. Dependency-Track allows users with the `SYSTEM_CONFIGURATION` permission to customize notification templates. Templates are e…

  • Medium 5.3

    IBM Watson Query on Cloud Pak for Data information disclosure

    IBM Watson Query on Cloud Pak for Data 4.0.0 through 4.0.9, 4.5.0 through 4.5.3, 4.6.0 through 4.6.6, 4.7.0 through 4.7.4, and 4.8.0 through 4.8.7 could allow unauthorized data access from a remote data source object due to improper privilege management.

  • Medium 6.5

    Improper limitation of a pathname to a restricted directory ('Path Traversal') vulnerability in encrypted share umount …

  • Medium 5.9
    CVE-2025-0111 Exploited

    PAN-OS: Authenticated File Read Vulnerability in the Management Web Interface

    An authenticated file read vulnerability in the Palo Alto Networks PAN-OS software enables an authenticated attacker with network access to the management web interface to read files on the PAN-OS filesystem that are readable by the “nobody” user. You can gre…

    KEV Feb 20, 2025
  • Medium 6.5
    CVE-2025-21377 EPSS 40%

    NTLM Hash Disclosure Spoofing Vulnerability

    NTLM Hash Disclosure Spoofing Vulnerability

  • Medium 6.8

    External control of a file name in Ivanti Connect Secure before version 22.7R2.6 and Ivanti Policy Secure before versio…