Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🛡️
CISA KEV · ACTIVELY EXPLOITED
HIGH severity

CVE-2024-12987 — Vigor300b Firmware

HIGH

CVE-2024-12987 is a high-severity (CVSS 7.3) CWE-77 vulnerability in draytek vigor300b firmware. It is in CISA's Known Exploited Vulnerabilities catalog (added 2025-05-15) — treat it as actively exploited and patch now. No vendor fix is recorded yet; mitigation options are listed below.

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…

Published
Updated
Affected
2 products
Patched
See advisory
Exploits
None indexed
Exploitation data as of Oct 22, 2026 · OSV.dev, NVD, CISA KEV, FIRST.org (EPSS)

Exploitation Status

Actively exploited in the wild

  • Confirmed by CISA's Known Exploited Vulnerabilities catalog on 2025-05-15. Federal agencies were required to remediate by 2025-06-05.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA (KEV catalog and SSVC triage) for CVE-2024-12987.

EPSS Exploitation Probability

via FIRST.org ↗
98.2%probability of exploitation in next 30 days
Very High Risk+0.08%
Lower risk than most CVEs100th percentile — riskier than 100% of all scored CVEsHighest risk
73.2%82.2%91.1%100.0%79.5%98.2%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2024-12987 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).

Where this sits among everything scored

Of 394,803 CVEs with a current EPSS score, this one falls in the ≥ 90% band (highlighted). Counts from FIRST.org, log-scaled.

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.

Affected Products

2 products · 2 configurations
OS
vigor300b firmwaredraytek
1 version
1.5.1.4
OS
vigor2960 firmwaredraytek
1 version
1.5.1.4

Detection & mitigation playbook

Vendor / appliance
  1. Detect

    Inventory every draytek vigor300b firmware deployment and check each version against the affected-products list above.

  2. Remediation status

    No patch has shipped for CVE-2024-12987 yet — track the draytek vigor300b firmware advisory for a fixed release and apply the workarounds below in the meantime.

  3. Mitigate without a patch

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does. Alongside that, restrict the management interface to trusted networks and apply the vendor's recommended configuration mitigations.

How to detect CVE-2024-12987

A community-maintained Nuclei template exists for this CVE. You can scan for it directly:

nuclei -id cve-2024-12987 -u https://target
Template
DrayTek Vigor - Command Injection
Severity
critical
Impact
Unauthenticated attackers can inject arbitrary system commands through the session parameter in the apmcfgupload endpoint to execute commands on DrayTek routers, enabling complete device compromise and network infiltration.
Remediation
Update the firmware to the latest version provided by DrayTek. If no update is available, consider implementing network segmentation to restrict access to the device's management interface.

Template by ProjectDiscovery nuclei-templates (ritikchaddha), MIT licensed. View the full template. Scan only systems you are authorised to test.

Frequently Asked Questions

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.
O3 Security · Runtime Protection

Is CVE-2024-12987 being exploited in your environment?

Detect and block the exploit chain at execution, on systems you cannot patch yet.

CVE-2024-12987: Vigor300b Firmware (High 7.3, KEV)