CVE-2024-41340 Overview
CVE-2024-41340 is an unrestricted file upload vulnerability [CWE-434] affecting a wide range of DrayTek Vigor router models. The flaw allows attackers to upload crafted APP Enforcement modules to affected devices, leading to arbitrary code execution on the router. Impacted models include Vigor 165/166, Vigor 2620/LTE200, Vigor 2860/2925, Vigor 2862/2926, Vigor 2133/2762/2832, Vigor 2135/2765/2766, Vigor 2865/2866/2927, Vigor 2962/3910, and Vigor 3912, each with distinct fixed firmware versions. Successful exploitation compromises confidentiality, integrity, and availability of the device.
Critical Impact
Attackers can achieve arbitrary code execution on affected DrayTek Vigor routers by uploading malicious APP Enforcement modules, potentially gaining full control of the network gateway.
Affected Products
- DrayTek Vigor 165/166 firmware prior to v4.2.6
- DrayTek Vigor 2620/LTE200 firmware prior to v3.9.8.8, Vigor 2860/2925 prior to v3.9.7, Vigor 2862/2926 prior to v3.9.9.4
- DrayTek Vigor 2133/2762/2832 prior to v3.9.8, Vigor 2135/2765/2766 prior to v4.4.5.1, Vigor 2865/2866/2927 prior to v4.4.5.3, Vigor 2962/3910 prior to v4.3.2.7, Vigor 3912 prior to v4.3.5.2
Discovery Timeline
- 2025-02-27 - CVE-2024-41340 published to NVD
- 2026-07-05 - Last updated in NVD database
Technical Details for CVE-2024-41340
Vulnerability Analysis
The vulnerability resides in the APP Enforcement module handling logic of DrayTek Vigor router firmware. APP Enforcement is a feature used by DrayTek devices to control application-layer traffic through signature modules. The affected firmware fails to properly validate uploaded APP Enforcement module files before loading them.
An attacker who can reach the upload interface can supply a crafted module that the router will parse and execute. This results in arbitrary code execution in the context of the router's firmware processes. Because the affected devices act as network perimeter gateways, code execution on these devices provides deep access to internal networks and traversing traffic.
Root Cause
The root cause is an unrestricted file upload weakness classified as [CWE-434]. The firmware trusts the contents and structure of APP Enforcement module files without enforcing integrity checks, signature validation, or type restrictions. This lets attacker-controlled content flow into code execution paths within the router.
Attack Vector
Exploitation requires local access to the device's management interface as characterized by the attack vector metric. No authentication or user interaction is required to trigger the flaw once the interface is reachable. An attacker with network path to the router's administrative service can submit a malicious APP Enforcement module through the file upload mechanism. See the Medium Advisory on DrayTek Vulnerabilities for additional technical context.
Detection Methods for CVE-2024-41340
Indicators of Compromise
- Unexpected modifications to APP Enforcement module files or configurations stored on the router
- Unrecognized processes, listeners, or outbound connections originating from the router management plane
- Firmware or configuration checksum mismatches compared with vendor-known values
Detection Strategies
- Inventory all DrayTek Vigor devices and compare running firmware versions against the fixed versions listed by the vendor
- Review router administrative interface access logs for anomalous file upload activity targeting APP Enforcement endpoints
- Correlate router-originated network flows in a centralized log platform to identify lateral movement or command-and-control patterns
Monitoring Recommendations
- Forward router syslog and administrative audit events to a centralized SIEM or data lake for continuous review
- Monitor for unauthenticated or unexpected connections to router management ports from internal or WAN sources
- Alert on configuration changes and firmware operations occurring outside approved maintenance windows
How to Mitigate CVE-2024-41340
Immediate Actions Required
- Upgrade each affected DrayTek Vigor model to the corresponding fixed firmware version listed by the vendor
- Restrict access to router administrative and management interfaces to trusted management networks only
- Disable remote WAN-side management on Vigor devices unless strictly required and protected by ACLs
Patch Information
DrayTek has released fixed firmware for each affected device family. Administrators should upgrade Vigor 165/166 to v4.2.6 or later, Vigor 2620/LTE200 to v3.9.8.8 or later, Vigor 2860/2925 to v3.9.7 or later, Vigor 2862/2926 to v3.9.9.4 or later, Vigor 2133/2762/2832 to v3.9.8 or later, Vigor 2135/2765/2766 to v4.4.5.1 or later, Vigor 2865/2866/2927 to v4.4.5.3 or later, Vigor 2962/3910 to v4.3.2.7 or later, and Vigor 3912 to v4.3.5.2 or later.
Workarounds
- Segment router management interfaces behind a jump host or bastion accessible only to authorized administrators
- Enforce strong administrative credentials and disable unused management protocols on affected Vigor devices
- Where patching must be delayed, apply firewall rules that block untrusted sources from reaching router management ports
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

