CriticalCVE-2024-12987

    DrayTek Vigor2960/Vigor300B Web Management Interface apmcfgupload os command injection (CVE-2024-12987)

    Published In CISA KEV since Sources: CVE.org, pwn.watch

    Share

    What is affected, what to do

    A vulnerability, which was classified as critical, was found in DrayTek Vigor2960 and Vigor300B 1.5.1.4. Affected is an unknown function of the file /cgi-bin/mainfunction.cgi/apmcfgupload of the component Web Management Interface.

    The vulnerability is being actively exploited; treat it as a priority. The available sources name no fixed version. Check the vendor guidance in the references below. Immediate actions, mitigation and detection rules are in the runbook below.

    Affected
    • DrayTek Vigor2960 eq 1.5.1.4..1.5.1.4
    • DrayTek Vigor300B eq 1.5.1.4..1.5.1.4

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    9.8

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: NVD, CVSS v3

    7.3

    CVSS v3

    Severity High on the scale from 0 to 10.

    Source: CVE.org, pwn.watch

    98.2 %

    EPSS score

    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.

    Source: FIRST EPSS, percentile 99.91

    Show all metrics
    Severity
    Critical
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    223.62 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    actively exploited
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    9.8 Methodology
    CVSS v3

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    7.3
    CVSS v4

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    6.9
    EPSS score

    The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.

    Read in glossary
    98.2 %
    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
    EPSS percentile

    The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.

    Read in glossary
    99.91
    Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    Actively exploited
    Published
    In CISA KEV since

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    CISA assessment (SSVC)
    Exploitation: active · automatable · Technical impact: total
    Source: CISA Vulnrichment, as of 17 May 2025
    CWE

    CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.

    Read in glossary
    CWE-78, CWE-77

    Response and mitigation

    Why act now?

    Prioritisation rationale

    This is an unauthenticated, network-reachable command injection that requires no user interaction and gives full device takeover. A public exploit exists, and the bug sits among the CVEs most likely to be exploited. Edge routers like the Vigor line are mass-scanned by automated campaigns that recruit them into botnets and residential-proxy pools or use them as a foothold into internal networks. CISA does not flag known ransomware use, but that should not lower urgency. Treat any unit with an internet-exposed management UI as P1 with a 24-hour remediation target; internally-only reachable units can be patched in the next short-cycle maintenance window.

    1. Runbook step 1

      Immediate response (0-24 h)

      • Build the inventory: Locate every DrayTek Vigor2960, Vigor300B and Vigor3900 and record its firmware version. NVD lists firmware 1.5.1.4 as affected on Vigor2960/Vigor300B. The context gives no version for Vigor3900, so look it up in the vendor advisory.
      • Patch: Upgrade Vigor2960 and Vigor300B to firmware 1.5.1.5. For Vigor3900, a patch may be available from the vendor; look up the version in the vendor advisory. Where no fixed firmware exists or the model is end-of-life, schedule decommissioning or replacement.
      • Pull the management interface off the internet now: Disable WAN-side access to the web management UI (HTTP/HTTPS, including any non-default admin ports). The flaw is reachable over the network without authentication. Confirm with an external scan or Shodan/Censys that /cgi-bin/mainfunction.cgi is no longer reachable.
      • Triage for compromise before patching: Export the running config, user accounts, routing/NAT/VPN settings and scheduled tasks, then diff them against a known-good baseline. Patching first can destroy evidence.
      • Rotate secrets: On any unit that ran with an exposed management UI, rotate admin passwords, VPN PSKs, certificates, RADIUS/LDAP bind secrets and SNMP communities.
      • If indicators are found: Isolate the device, factory-reset it, flash the fixed firmware and rebuild the config by hand (do not restore the backup). Assess NIS2 reporting obligations, including the 24 h early warning.
    2. Runbook step 2

      Mitigation layers

      • Network segmentation: Expose the management UI only to a dedicated management VLAN or jump host. Enforce the on-device management access ACL so only the admin subnet is allowed.
      • IPS/WAF rule: Add a Suricata/Snort signature for HTTP requests where uri contains /cgi-bin/mainfunction.cgi/apmcfgupload AND the session parameter carries shell metacharacters (;, |, `, $(, &&, %3B, %7C, %60). Set it to drop in front of exposed units.
      • Egress filtering: Restrict traffic originating from the router's management plane to NTP, DNS, vendor update servers and your syslog collector. This blocks payload retrieval (wget/curl/tftp) and reverse shells.
      • Remote administration: Allow admin access only via VPN with MFA. Disable unused services (Telnet, WAN-side SSH, TR-069, UPnP).
      • Lifecycle: Record EoL units without a fixed firmware as an accepted-but-untreatable risk in the ISMS (ISO 27001 A.8.8) and fast-track their replacement.
    3. Runbook step 3

      Detection rules

      • Network telemetry (Zeek/Suricata): Flag HTTP requests to apmcfgupload from non-admin sources. Example on Zeek http.log: uri contains "/cgi-bin/mainfunction.cgi/apmcfgupload" and id.orig_h not in <admin_nets>.
      • Router syslog (forward to SIEM): Alert on unexpected admin logins, config changes, new users, reboots or firmware events outside maintenance windows. SPL: index=network sourcetype=draytek* ("config" OR "user add" OR "reboot") | stats count by host, src.
      • Router-originated outbound traffic: In firewall/NetFlow data, look for connections sourced from the router management IP to unknown destinations on HTTP/HTTPS, TFTP (69/udp) or high ports. These are classic signs of payload download or botnet C2.
      • Sigma shape (proxy/web logs): cs-uri-stem|contains: '/mainfunction.cgi/apmcfgupload' AND cs-uri-query|contains|any: [';', '|', '$(', '', 'wget', 'curl', 'busybox']→ levelcritical`.
      • Behavioural anomalies: Changed DNS servers, new port forwards, unknown VPN profiles, or sustained CPU load without matching traffic all suggest the router has been enrolled in a proxy network or botnet.

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    Description

    A vulnerability, which was classified as critical, was found in DrayTek Vigor2960 and Vigor300B 1.5.1.4. Affected is an unknown function of the file /cgi-bin/mainfunction.cgi/apmcfgupload of the component Web Management Interface. The manipulation of the argument session leads to os command injection. It is possible to launch the attack remotely. The exploit has been disclosed to the public and may be used. Upgrading to version 1.5.1.5 is able to address this issue. It is recommended to upgrade the affected component.

    Source: cvelistv5, pwn.watch, NVD (NIST), CISA KEV Catalog, CVE.org (MITRE)

    Affected products

    The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.

    Affected products
    Affected versionsFixed in
    DrayTekVigor2960
    • 1.5.1.4
    • —
    DrayTekVigor300B
    • 1.5.1.4
    • —

    Vendors and products

    Affected operating systems

    Affected operating systems
    Otherdraytekvigor2960_firmware1.5.1.4
    Otherdraytekvigor300b_firmware1.5.1.4

    Weakness classes (CWE)

    • CWE-78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

      Base

      The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

      Entry at MITRE CWE-78
    • CWE-77Improper Neutralization of Special Elements used in a Command ('Command Injection')

      Class

      The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.

      Entry at MITRE CWE-77

    Public exploit references

    Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.

    Public exploit references
    CISA KEV CatalogCISA Known Exploited Vulnerability (opens in a new tab)cisa.govactively exploited

    References & sources

    • vuldb.comVDB-289380 | DrayTek Vigor2960/Vigor300B Web Management Interface apmcfgupload os command injectionVulnerability database, Technical description, Third-party advisory, Vulnerability database
    • vuldb.comVDB-289380 | CTI Indicators (IOB, IOC, TTP, IOA)signature, Permissions required, Permissions required, Vulnerability database
    • vuldb.comSubmit #468795 | DrayTek Vigor2960, Vigor300B 1.5.1.4 Command InjectionThird-party advisory, Third-party advisory, Vulnerability database
    • netsecfish.notion.siteCommand-Injection-in-apmcfgupload-endpoint-for-DrayTek-Gateway-…Exploit, Exploit, Third-party advisory
    • cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2024-12987government-resource, US government resource
    • fw.draytek.com.twDrayTek advisory: DrayTek Vigor RoutersNot applicable, pwn-watch
    • fw.draytek.com.twDrayTek advisory: DrayTek Vigor RoutersRelease notes, pwn-watch
    • fw.draytek.com.twDrayTek advisory: DrayTek Vigor RoutersRelease notes, pwn-watch
    • pwn.watchpwn.watch: DrayTek Vigor Routers: Vigor Routers OS Command Injection Vulnerabilitypwn-watch
    • NVD (NIST)NVD: CVE-2024-12987pwn-watch
    • cisa.govCISA Known Exploited Vulnerabilities Catalogpwn-watch
    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2024-12987
    <a href="https://intel.neosec.eu/en/cve/CVE-2024-12987"><img src="https://intel.neosec.eu/badge/cve/CVE-2024-12987.svg?lang=en" alt="CVE-2024-12987 – NEOSEC Intel" height="20"></a>