Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
MediumCISA KEVExploited in the wildPublic exploit

OS Command Injection in DrayTek Vigor2960/Vigor300B Web Management Interface

IdentifiersCVE-2024-12987CWE-78· Improper Neutralization of Special…

CVE-2024-12987 is a critical OS command injection vulnerability affecting DrayTek Vigor2960 and Vigor300B devices running firmware 1.5.1.4. The flaw is present in the Web Management Interface, specifically the /cgi-bin/mainfunction.cgi/apmcfgupload endpoint, where manipulation of the session argument can cause attacker-controlled input to be passed to the underlying operating system command context. Successful exploitation allows remote execution of arbitrary OS commands on the device. Public reporting indicates the issue has been disclosed publicly and exploit details are available.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can result in remote arbitrary command execution on the affected router, which can lead to full device compromise. An attacker may be able to alter configuration, disrupt routing or security functions, deploy malware or botnet payloads, establish persistence, pivot into adjacent networks, and use the device for follow-on activity such as DDoS operations or further intrusion. The vulnerability has also been reported as actively exploited and included in CISA's KEV catalog.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, restrict access to the Web Management Interface to trusted administrative networks only, disable public Internet exposure of the management interface, and require access through a VPN or other controlled management path. Place the device behind filtering controls that limit access to the CGI management endpoints, enforce strong authentication for administrative access, and monitor management and network logs for suspicious requests to /cgi-bin/mainfunction.cgi/apmcfgupload, unexpected command execution, configuration changes, outbound callbacks, or anomalous DoH/DDoS-related traffic.

Remediation

Patch, then assume compromise.

Upgrade affected DrayTek Vigor2960 and Vigor300B devices from firmware 1.5.1.4 to firmware version 1.5.1.5 or later, as vendor reporting indicates version 1.5.1.5 addresses the issue. After upgrading, verify the installed firmware version and confirm normal device functionality. Review device configuration and logs for signs of prior compromise, especially if the management interface was exposed to untrusted networks.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
DraytekVigor2960 Firmwareoperating_system
DraytekVigor300b Firmwareoperating_system

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware1

Malware families riding this exploit, with evidence and IOCs.

Detection signatures2

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity10

Community discussion across Reddit, Mastodon, and other social sources.