The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2024-12986

CVE-2024-12986: Draytek Vigor300b Firmware RCE Vulnerability

CVE-2024-12986 is a critical remote code execution flaw in Draytek Vigor300b Firmware that enables OS command injection via the web management interface. This article covers technical details, affected versions, and mitigation.

Published: April 8, 2026

CVE-2024-12986 Overview

A critical OS command injection vulnerability has been identified in DrayTek Vigor2960 and Vigor300B enterprise gateway devices. The vulnerability exists in the Web Management Interface, specifically within the /cgi-bin/mainfunction.cgi/apmcfgupptim endpoint. An unauthenticated remote attacker can exploit this flaw by manipulating the session argument, enabling arbitrary operating system command execution on the affected device.

Critical Impact

This vulnerability allows unauthenticated remote attackers to execute arbitrary OS commands on vulnerable DrayTek gateway devices, potentially leading to complete device compromise, network infiltration, and persistent access to enterprise network infrastructure.

Affected Products

  • DrayTek Vigor2960 Firmware versions 1.5.1.3 and 1.5.1.4
  • DrayTek Vigor300B Firmware versions 1.5.1.3 and 1.5.1.4
  • All hardware variants of DrayTek Vigor2960 and Vigor300B running vulnerable firmware

Discovery Timeline

  • 2024-12-27 - CVE-2024-12986 published to NVD
  • 2025-05-28 - Last updated in NVD database

Technical Details for CVE-2024-12986

Vulnerability Analysis

This vulnerability is classified as CWE-77 (Improper Neutralization of Special Elements used in a Command - Command Injection). The flaw resides in the apmcfgupptim endpoint within the DrayTek Web Management Interface, which fails to properly sanitize user-supplied input before incorporating it into OS-level commands.

The attack is network-accessible without requiring prior authentication or user interaction. When exploited, attackers can inject malicious commands through the session parameter, which are then executed with the privileges of the web server process—typically root on embedded devices like these enterprise gateways.

DrayTek Vigor2960 and Vigor300B are multi-WAN load balancing VPN routers commonly deployed in enterprise and SMB environments, making this vulnerability particularly concerning for organizations relying on these devices as network edge security appliances.

Root Cause

The root cause stems from insufficient input validation in the /cgi-bin/mainfunction.cgi/apmcfgupptim handler. The session argument is passed directly to system-level functions without proper sanitization or escaping. This allows special characters and command sequences to be interpreted as shell commands rather than treated as literal data.

The vulnerability follows a classic command injection pattern where user-controllable input is concatenated into a command string that is subsequently executed by the underlying operating system shell.

Attack Vector

The attack can be initiated remotely over the network against the Web Management Interface. Key characteristics of the attack vector include:

  • Network-based exploitation: Attackers can reach the vulnerable endpoint from any network location with access to the management interface
  • No authentication required: The vulnerable endpoint does not require valid credentials
  • No user interaction needed: Exploitation is fully automated without requiring victim interaction
  • Direct command execution: Injected commands execute immediately upon request processing

The exploitation involves crafting HTTP requests to the vulnerable CGI endpoint with specially crafted session parameter values containing OS command injection payloads. For detailed technical analysis of the command injection mechanism, refer to the NetSecFish Command Injection Analysis.

Detection Methods for CVE-2024-12986

Indicators of Compromise

  • Unusual HTTP requests to /cgi-bin/mainfunction.cgi/apmcfgupptim containing shell metacharacters (;, |, $(), backticks) in the session parameter
  • Unexpected outbound network connections from the DrayTek device to external IP addresses
  • Modified system files, unexpected user accounts, or new cron jobs on the affected device
  • Abnormal process activity or resource consumption on the gateway appliance

Detection Strategies

  • Implement web application firewall (WAF) rules to detect and block requests containing command injection patterns targeting the apmcfgupptim endpoint
  • Deploy network intrusion detection signatures matching exploitation attempts against DrayTek CGI endpoints
  • Monitor authentication logs and system logs on DrayTek devices for anomalous activity patterns
  • Utilize SentinelOne Singularity XDR for endpoint-level detection of post-exploitation behavior on connected systems

Monitoring Recommendations

  • Enable comprehensive logging on DrayTek devices and forward logs to a centralized SIEM for correlation and analysis
  • Establish baseline network traffic patterns for management interface access and alert on deviations
  • Implement regular automated scanning to detect vulnerable firmware versions across your DrayTek device inventory
  • Monitor for DNS queries or network connections to known malicious infrastructure from gateway devices

How to Mitigate CVE-2024-12986

Immediate Actions Required

  • Upgrade all DrayTek Vigor2960 and Vigor300B devices to firmware version 1.5.1.5 or later immediately
  • Restrict access to the Web Management Interface to trusted administrative networks only using firewall rules
  • If immediate patching is not possible, disable remote management access until the update can be applied
  • Audit device configurations for signs of compromise and reset to factory defaults if tampering is detected

Patch Information

DrayTek has released firmware version 1.5.1.5 which addresses this command injection vulnerability. Organizations should obtain the updated firmware directly from the official DrayTek support portal and verify firmware integrity before deployment. The upgrade process can typically be performed through the Web Management Interface under System Maintenance > Firmware Upgrade.

Additional technical details and vulnerability tracking information are available through VulDB #289379.

Workarounds

  • Configure access control lists (ACLs) to restrict Web Management Interface access exclusively to trusted administrator IP addresses or subnets
  • Implement network segmentation to isolate management plane traffic from general network access
  • Deploy an upstream firewall or WAF to filter malicious requests targeting the vulnerable endpoint
  • Consider temporarily disabling the Web Management Interface and using console access for administration until patching is complete
bash
# Example: Restrict management access to specific admin subnet
# Configure firewall rules on upstream device or DrayTek ACL
# Allow management access only from 10.0.10.0/24 admin network
iptables -A INPUT -p tcp --dport 443 -s 10.0.10.0/24 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j DROP
iptables -A INPUT -p tcp --dport 80 -s 10.0.10.0/24 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j DROP

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechDraytek

  • SeverityMEDIUM

  • CVSS Score6.9

  • EPSS Probability70.28%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-77
  • Technical References
  • NetSecFish Command Injection Analysis

  • VulDB CTI ID #289379

  • VulDB #289379

  • VulDB Submission #468794
  • Related CVEs
  • CVE-2026-3040: Draytek Vigor300b Firmware RCE Vulnerability

  • CVE-2020-8515: Draytek Vigor2960 Firmware RCE Vulnerability

  • CVE-2020-15415: DrayTek Vigor Firmware RCE Vulnerability

  • CVE-2024-12987: Draytek Vigor300b Firmware RCE Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English