What is CWE-22?
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin" to access unexpected files. This is referred to as absolute path traversal.
CWE-22 is a base-level weakness in MITRE’s Common Weakness Enumeration, with a MITRE likelihood of exploit of High. Applicable platforms: Language: Not Language-Specific; Technology: AI/ML.
Source: MITRE CWE (CWE-22 definition, reproduced verbatim). Counts and linkage below are Threadlinqs data.
Consequences
- Integrity, Confidentiality, Availability — Execute Unauthorized Code or Commands. The attacker may be able to create or overwrite critical files that are used to execute code, such as programs or libraries.
- Integrity — Modify Files or Directories. The attacker may be able to overwrite or create critical files, such as programs, libraries, or important data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, appending a new account at the end of a password file may allow an attacker to bypass authentication.
- Confidentiality — Read Files or Directories. The attacker may be able read the contents of unexpected files and expose sensitive data. If the targeted file is used for a security mechanism, then the attacker may be able to bypass that mechanism. For example, by reading a password file, the attacker could conduct brute force password guessing attacks in order to break into an account on the system.
- Availability — DoS: Crash, Exit, or Restart. The attacker may be able to overwrite, delete, or corrupt unexpected critical files such as programs, libraries, or important data. This may prevent the product from working at all and in the case of protection mechanisms such as authentication, it has the potential to lock out product users.
Source: MITRE CWE, common consequences.
How CWE-22 is exploited in the wild
Threadlinqs maps 211 CVEs to CWE-22, published between 2017-08-07 and 2026-11-05. 38 are listed in CISA’s Known Exploited Vulnerabilities catalog, the authoritative record of exploitation in the wild, and 20 are tied to ransomware campaigns. By CVSS v3 severity the set splits into 48 critical, 87 high, 52 medium, 5 low. The highest EPSS score in the set is 99.9% (CVE-2023-32315), the modelled probability of exploitation in the next 30 days. 203 tracked threats reference CWE-22 directly or through a CVE it covers; the most recent is “Multi-vendor vulnerability roundup: Node2Shell Brotli RCE (CVE-2026-111497, actively exploited, CISA KEV), WatchGuard CVE-2026-98432 (CVSS 9.8) and AuthPoint Gateway flaws, Cisco UCS Central CVE-2026-76506, SonicWall GMS CVE-2026-109593/109594 unpatched (EOL)” (2026-11-06). Affected products concentrate in IBM (12), Solarwinds (8), Microsoft (7), among 129 vendors in total.
Vulnerabilities (CVEs)
Showing 40 of 211 CVEs mapped to CWE-22, CISA KEV first, then by CVSS score.
- CVE-2026-48282 — CISA KEV · CVSS 10 critical · EPSS 28.5% · published 2026-06-30
- CVE-2026-34909 — CISA KEV · CVSS 10 critical · EPSS 1.7% · published 2026-05-22
- CVE-2026-85706 — CISA KEV · CVSS 10 critical · EPSS 1.1% · published 2026-09-12
- CVE-2019-11510 — CISA KEV · CVSS 9.9 critical · EPSS 99.9% · published 2019-05-08
- CVE-2019-19781 — CISA KEV · CVSS 9.8 critical · EPSS 99.9% · published 2019-12-27
- CVE-2020-5902 — CISA KEV · CVSS 9.8 critical · EPSS 99.9% · published 2020-07-01
- CVE-2022-29464 — CISA KEV · CVSS 9.8 critical · EPSS 99.9% · published 2022-04-18
- CVE-2024-23897 — CISA KEV · CVSS 9.8 critical · EPSS 99.9% · published 2024-01-24
- CVE-2023-47246 — CISA KEV · CVSS 9.8 critical · EPSS 98.8% · published 2023-11-10
- CVE-2022-41352 — CISA KEV · CVSS 9.8 critical · EPSS 95.4% · published 2022-09-26
- CVE-2022-37042 — CISA KEV · CVSS 9.8 critical · EPSS 91.8% · published 2022-08-11
- CVE-2021-3199 — CISA KEV · CVSS 9.8 critical · EPSS 14.5% · published 2021-01-22
- CVE-2026-59310 — CISA KEV · CVSS 9.8 critical · EPSS 2.5% · published 2026-07-30
- CVE-2026-93616 — CISA KEV · CVSS 9.8 critical · EPSS 2.4% · published 2026-09-22
- CVE-2026-104286 — CISA KEV · CVSS 9.8 critical · published 2026-10-01
- CVE-2024-8963 — CISA KEV · CVSS 9.4 critical · EPSS 98.6% · published 2024-09-19
- CVE-2018-13379 — CISA KEV · CVSS 9.1 critical · EPSS 99.9% · published 2019-06-04
- CVE-2021-40444 — CISA KEV · CVSS 8.8 high · EPSS 97.4% · published 2021-09-15
- CVE-2023-32315 — CISA KEV · CVSS 8.6 high · EPSS 99.9% · published 2023-05-26
- CVE-2024-1708 — CISA KEV · CVSS 8.4 high · EPSS 95.4% · published 2024-02-21
- CVE-2023-41266 — CISA KEV · CVSS 8.2 high · EPSS 84.8% · published 2023-08-29
- CVE-2021-27065 — CISA KEV · CVSS 7.8 high · EPSS 99.8% · published 2021-03-03
- CVE-2025-6218 — CISA KEV · CVSS 7.8 high · EPSS 90.4% · published 2025-06-21
- CVE-2022-20775 — CISA KEV · CVSS 7.8 high · EPSS 12.4% · published 2022-09-30
- CVE-2024-7262 — CISA KEV · CVSS 7.8 high · EPSS 2.9% · published 2024-08-15
- CVE-2021-41773 — CISA KEV · CVSS 7.5 high · EPSS 99.9% · published 2021-10-05
- CVE-2025-61884 — CISA KEV · CVSS 7.5 high · EPSS 97.5% · published 2025-10-12
- CVE-2024-57727 — CISA KEV · CVSS 7.5 high · EPSS 96.5% · published 2025-01-15
- CVE-2017-12637 — CISA KEV · CVSS 7.5 high · EPSS 95.1% · published 2017-08-07
- CVE-2021-43798 — CISA KEV · CVSS 7.5 high · EPSS 88.5% · published 2021-12-07
- CVE-2024-27199 — CISA KEV · CVSS 7.3 high · EPSS 99.9% · published 2024-03-04
- CVE-2022-27925 — CISA KEV · CVSS 7.2 high · EPSS 98.1% · published 2022-04-20
- CVE-2024-57728 — CISA KEV · CVSS 7.2 high · EPSS 64.6% · published 2025-01-15
- CVE-2023-35081 — CISA KEV · CVSS 7.2 high · EPSS 63.5% · published 2023-08-03
- CVE-2022-41328 — CISA KEV · CVSS 6.7 medium · EPSS 10.6% · published 2023-03-07
- CVE-2026-20262 — CISA KEV · CVSS 6.5 medium · EPSS 28.1% · published 2026-06-15
- CVE-2025-61624 — CISA KEV · CVSS 5.4 medium · EPSS 1.3% · published 2026-04-14
- CVE-2021-26086 — CISA KEV · CVSS 5.3 medium · EPSS 99.9% · published 2021-08-16
- CVE-2026-25592 — CVSS 10 critical · EPSS 2.3% · published 2026-02-06
- CVE-2026-70200 — CVSS 10 critical · EPSS 0.5% · published 2026-09-17
Affected vendors
Threat activity
203 tracked threats cite CWE-22; the 25 most recent are listed.
- Multi-vendor vulnerability roundup: Node2Shell Brotli RCE (CVE-2026-111497, actively exploited, CISA KEV), WatchGuard CVE-2026-98432 (CVSS 9.8) and AuthPoint Gateway flaws, Cisco UCS Central CVE-2026-76506, SonicWall GMS CVE-2026-109593/109594 unpatched (EOL)CRITICAL
- Multiple Vulnerabilities in Cisco Products (ISE, ISE-PIC, UCS Central, Unified CM/SME) - CVE-2026-20241, CVE-2026-76419, CVE-2026-76506HIGH
- October 2026 CVE Landscape: PHP2Shell (CVE-2026-109618/109619) + Fragnesia (CVE-2026-46300) chain, Longlegs/Storm-2603 SharePoint exploitation, and other actively exploited CVEsCRITICAL
- Multiple Vulnerabilities in Fortigate NGFW Before V7.4.1 on Siemens RUGGEDCOM APE1808 Devices (SSA-366067)CRITICAL
- Reachy Mini AI Robot Unauthenticated HTTP RCE Chain (CVE-2026-96455, CVE-2026-96456, CVE-2026-55419, CVE-2026-62661, CVE-2026-53605)HIGH
- Dell PowerProtect Data Domain multiple vulnerabilities fixed (DSA-2026-416, NCSC-2026-0460)CRITICAL
- Microsoft Edge Logic-Bug Full Exploit Chain Enables Code Execution Without Memory Corruption (Pwn2Own Berlin 2026, Orange Tsai; CVE-2026-45495)HIGH
- Microsoft Edge Logic-Bug Full Chain: UXSS, Immersive Reader File Write and protocols.json Hijack Escape Sandbox to Windows Code Execution (Pwn2Own Berlin 2026)HIGH
- AI-Driven Red-Team Chain Against AWS CI/CD: TeamCity CVE-2024-27198 Auth Bypass to IMDS Credential Theft and Cloud Pivot (ProjectDiscovery Neo)HIGH
- ProjectDiscovery Neo disclosure: 22 CVEs across 13 open-source projects (incl. Crawl4AI CVE-2026-26216 unauthenticated RCE, CVSS 9.8-10.0)CRITICAL
- GreyNoise: Attack Surges Against Network Infrastructure Vendors Precede CVE Disclosure by a Median of 11 Days (Cisco CVE-2026-20127, Fortinet CVE-2026-24858, SonicWall CVE-2026-0400)MEDIUM
- Szafir software vulnerabilities: XXE (CVE-2026-93570), path traversal (CVE-2026-93571), improper certificate validation (CVE-2026-106036)HIGH
- Helm Chart Template Injection via Unescaped .Values (YAML Injection in Kubernetes Manifests)MEDIUM
- Wing FTP Server Path Traversal (CWE-22) in User Base Folder Handling - CVE-2026-105420CRITICAL
- Cisco Catalyst SD-WAN Authentication Bypass (CVE-2026-20127) Exploited by UAT-8616 and Tied to Volt Typhoon's 'Silent Train' Network; UAT-11473 KeyDrift/PolyFlame/LittleFilch ToolsetCRITICAL
- Adobe, Veeam, Juniper Networks Patch Critical Vulnerabilities (Campaign Classic APSB26-162, Connect APSB26-182, Veeam B365 8.6 / B&R 13.1.2, Juniper Session Smart Router JSA112183)CRITICAL
- Veeam Backup & Replication Authorization Bypass (CVE-2026-108142) and Three Related Vulnerabilities PatchedCRITICAL
- Doorway Botnet: Large-Scale IoT and Network Device Compromise Campaign (MikroTik RouterOS CVE-2023-30799, Openfire CVE-2023-32315, ActiveMQ CVE-2023-46604, Jenkins, Cameras, ONUs)HIGH
- Eclypsium InfraTrust Pulse (Oct 2026): Actively Exploited Flaws Across Network Infrastructure Appliances (NetScaler CVE-2026-88771, Ivanti CVE-2026-104935, Check Point CVE-2026-93616, Cisco, Arista VeloCloud, FortiMail, F5 BIG-IP APM, PAN-OS, PHP2Shell, Linux Copy Fail)CRITICAL
- Volt Typhoon 'Silent Train' Relay Framework Used to Conceal Zero-Day Exploitation (CVE-2026-16812, CVE-2026-20127, CVE-2025-8875, CVE-2025-8876, CVE-2024-39717)CRITICAL
- KeyDrift: UAT-11473 Activity on Cisco SD-WAN (CVE-2026-20127)CRITICAL
- September 2026 Major Cyber Attacks: ShinyHunters FBIJobs/PeopleSoft (CVE-2026-35273), Clop Leak Site Grav CMS Hijack (CVE-2026-42608), PaperCut AI-Agent Campaign, BlueMoon Zero-Day Chain, NetScaler C2 (CVE-2026-88771)CRITICAL
- Nefilim and Hive Ransomware Affiliate Artem Stryzhak Sentenced to 70 MonthsMEDIUM
- Emperador Ransomware Group Claims 3.9GB Data Theft from AB InBev (Budweiser, Corona Maker) - Unverified $1M Bitcoin ExtortionMEDIUM
- CVE-2026-21659 - Johnson Controls Frick Controls Quantum HD Unauthenticated Local File Inclusion Leading to Remote Code ExecutionHIGH
Mitigations
- Implementation / Input Validation: 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…
- 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.
- Implementation / Input Validation: Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked. 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). This includes: realpath() in C getCanonicalPath() in Java GetFullPath() in ASP.NET realpath() or abs_path() in Perl realpath() in PHP
- 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].
- Operation / Firewall: Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
- 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.
- Architecture and Design / Enforcement by Conversion: When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, 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 [REF-185] provide this capability.
- Architecture and Design, Operation / 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…
- Architecture and Design, Operation / Attack Surface Reduction: Store library, include, and utility files outside of the web document root, if possible. Otherwise, store them in a separate directory and use the web server's access control capabilities to prevent attackers from directly requesting them. One common practice is to define a fixed constant in each calling program, then check for the existence of the constant in the library/include file; if the constant does not exist, then the file was directly requested, and it can exit immediately. This significantly reduces the chance of an attacker being able to bypass any protection mechanisms that are in the base program but not in the include files. It will also reduce the attack surface.
- Implementation: Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to…
Source: MITRE CWE, potential mitigations.
Detection methods (MITRE CWE)
- Automated Static Analysis (effectiveness: High): Automated techniques can find areas where path traversal weaknesses exist. However, tuning or customization may be required to remove or de-prioritize path-traversal problems that are only exploitable by the product's administrator - or other privileged users - and thus potentially valid behavior or, at worst, a bug instead of a vulnerability.
- Manual Static Analysis (effectiveness: High): Manual white box techniques may be able to provide sufficient code coverage and reduction of false positives if all file access operations can be assessed within limited time constraints.
- Automated Static Analysis - Binary or Bytecode (effectiveness: High): According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: Bytecode Weakness Analysis - including disassembler + source code weakness analysis Cost effective for partial coverage: Binary Weakness Analysis - including disassembler + source code weakness analysis
- Manual Static Analysis - Binary or Bytecode (effectiveness: SOAR Partial): According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies
- Dynamic Analysis with Automated Results Interpretation (effectiveness: High): According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: Web Application Scanner Web Services Scanner Database Scanners
- Dynamic Analysis with Manual Results Interpretation (effectiveness: High): According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: Fuzz Tester Framework-based Fuzzer
- Manual Static Analysis - Source Code (effectiveness: High): According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: Manual Source Code Review (not inspections) Cost effective for partial coverage: Focused Manual Spotcheck - Focused manual analysis of source
- Automated Static Analysis - Source Code (effectiveness: High): According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer
Source: MITRE CWE, detection methods. Threadlinqs detection rules for the threats above are Blue tier and higher.