cve.bz

CAPEC-17

Using Malicious Files

Very High severityHigh likelihoodStandard pattern

An attack of this type exploits a system's configuration that allows an adversary to either directly access an executable file, for example through shell access; or in a possible worst case allows an adversary to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.

On this page

Ask an AI about this attack pattern

Show the promptExplain the attack pattern CAPEC-17: Using Malicious Files: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/17.html and https://cve.bz/cve/capec/17?via=ask-ai-copy, which lists recent CVEs with the weaknesses it exploits. Cite the sources.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this attack pattern's id and public links.

How the attack unfolds

  1. Explore

    The attacker looks for a way in.

    1. [Determine File/Directory Configuration] The adversary looks for misconfigured files or directories on a system that might give executable access to an overly broad group of users.

      1 technique
      • Through shell access to a system, use the command "ls -l" to view permissions for files and directories.
  2. Experiment

    They probe what they found.

    1. [Upload Malicious Files] If the adversary discovers a directory that has executable permissions, they will attempt to upload a malicious file to execute.

      1 technique
      • Upload a malicious file through a misconfigured FTP server.
  3. Exploit

    They carry out the attack.

    1. [Execute Malicious File] The adversary either executes the uploaded malicious file, or executes an existing file that has been misconfigured to allow executable access to the adversary.

Prerequisites

  • System's configuration must allow an attacker to directly access executable files or upload files to execute. This means that any access control system that is supposed to mediate communications between the subject and the object is set incorrectly or assumes a benign environment.

Skills required

  • Low skill

    To identify and execute against an over-privileged system interface

Resources required

  • Ability to communicate synchronously or asynchronously with server that publishes an over-privileged directory, program, or interface. Optionally, ability to capture output directly through synchronous communication or other method such as FTP.

Consequences

What a successful attack can lead to
ImpactAffectsNote
Execute Unauthorized CommandsConfidentiality, Integrity, AvailabilityRun Arbitrary Code
Modify DataIntegrity
Read DataConfidentiality
Gain PrivilegesConfidentiality, Access Control, Authorization

Mitigations

  • Design: Enforce principle of least privilege

  • Design: Run server interfaces with a non-root account and/or utilize chroot jails or other configuration techniques to constrain privileges even if attacker gains some limited access to commands.

  • Implementation: Perform testing such as pen-testing and vulnerability scanning to identify directories, programs, and interfaces that grant direct access to executables.

Weaknesses it exploits

  • CWE-59 Improper Link Resolution Before File Access
  • CWE-270 Privilege Context Switching Error
  • CWE-272 Least Privilege Violation
  • CWE-282 Improper Ownership Management
  • CWE-285 Improper Authorization
  • CWE-693 Protection Mechanism Failure
  • CWE-732 Incorrect Permission Assignment for Critical Resource

Recent CVEs with these weaknesses

  1. 5.3CVE-2026-140130

    A flaw has been found in jobic10 student-management-using-django up to 066dcaeffc52fe52e9279d93e2a00c15909544ae. This affects the function get_students/save_attendance/get_student_attendance/update_attendance of the file main_app/staff_vie…

  2. 3.8CVE-2026-121477

    A flaw was found in openpgp-cert-d. When reading a certificate, the component opens and reads the certificate file without verifying whether it is a symbolic link. In an environment where a certificate directory is shared between users, a …

  3. 3.8CVE-2026-121476

    A flaw was found in openpgp-cert-d. When updating a certificate, the application opens the certificate file for writing without checking for symbolic links (symlinks). In environments where a certificate directory is shared between users, …

  4. 3.8CVE-2026-121475

    A flaw was found in openpgp-cert-d. When acquiring a write lock, the application opens and truncates the lock file without verifying whether it is a symbolic link (a reference pointing to another file). In environments where a certificate …

  5. 3.3CVE-2026-121474

    A flaw was found in sequoia-net. When inserting a certificate into a Web Key Directory (WKD) or creating a policy file, the application opens and writes to destination files without checking for symbolic links. In environments where certif…

  6. 6.5CVE-2026-115423

    A flaw was found in FreeIPA. An access control instruction (ACI) intended to allow presence-checking on password and Kerberos principal-key attributes grants unrestricted SEARCH rights on userPassword and krbPrincipalKey to all authenticat…

  7. 4.8CVE-2026-139892

    A flaw has been found in MervinPraison PraisonAI up to 4.7.24. This issue affects the function _load_rules of the file praisonaiagents/permissions/manager.py of the component Permission Manager. This manipulation causes improper authorizat…

  8. 1.9CVE-2026-139891

    A security vulnerability has been detected in KunAgent Kun up to 0.4.5. This affects the function launchResumeTurn of the file kun/src/loop/interrupted-turn-coordinator.ts of the component Turn Resume. The manipulation leads to incorrect a…

The newest records naming one of them. Each weakness's page lists them all.

Part of
Can lead to
More specific patterns
  • CAPEC-177 Create files with the same name as files protected with a higher classification
  • CAPEC-263 Force Use of Corrupted Files
  • CAPEC-562 Modify Shared File
  • CAPEC-563 Add Malicious File to Shared Webroot
  • CAPEC-642 Replace Binaries
  • CAPEC-650 Upload a Web Shell to a Web Server

Examples

Consider a directory on a web server with the following permissions

Consider a directory on a web server with the following permissions

drwxrwxrwx 5 admin public 170 Nov 17 01:08 webroot

This could allow an attacker to both execute and upload and execute programs' on the web server. This one vulnerability can be exploited by a threat to probe the system and identify additional vulnerabilities to exploit.

MITRE's words, unchanged: CAPEC-17 at MITRE. CAPEC is Copyright © 2007–2026, The MITRE Corporation, used under the CAPEC terms of use: “The MITRE Corporation (MITRE) hereby grants you a non-exclusive, royalty-free license to use Common Attack Pattern Enumeration and Classification (CAPEC™) for research, development, and commercial purposes. Any copy you make for such purposes is authorized provided that you reproduce MITRE’s copyright designation and this license in any such copy.” CAPEC and the CAPEC logo are trademarks of The MITRE Corporation. Credits. All attack patterns.