CVE-2024-12987
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.
do firstApply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Can a WAF block it? Partly. The attack is performed remotely by sending a specially crafted HTTP request to the web management interface, manipulating the session parameter to inject OS commands. This unusual manipulation of a specific parameter in a known CGI endpoint can be detected and blocked by a WAF. A WAF rule can match manipulation of the session argument in /cgi-bin/mainfunction.cgi/apmcfgupload. No tracked WAF vendor has published a rule for this CVE yet, so you would write it yourself.
What a custom rule would match: manipulation of the session argument in /cgi-bin/mainfunction.cgi/apmcfgupload
Also consider: patch · custom WAF rule · input validation · RASP · shlex/execve-style APIs
Based on an AI reading of the CVE description, and no vendor rule found yet. We check Cloudflare, AWS, Google Cloud Armor and Azure; for Akamai, Imperva, Fastly, F5, ask your vendor.
Is CVE-2024-12987 being exploited?
Yes. CVE-2024-12987 appears in CISA's Known Exploited Vulnerabilities catalog, which means exploitation in the wild has been confirmed and reported. Treat it as active rather than theoretical, and patch it ahead of higher-scoring vulnerabilities that carry no exploitation evidence.
How severe is CVE-2024-12987?
CVE-2024-12987 is rated High with a CVSS score of 7.3. Severity describes how bad exploitation would be, not how likely it is: pair it with exploitation evidence before deciding what to patch first.
Is there a patch for CVE-2024-12987?
Yes. A fix has been recorded for CVE-2024-12987. The vendor advisory is the authority on the exact fixed version — apply it from there rather than from a summary.
What does CVE-2024-12987 affect?
CVE-2024-12987 affects draytek:vigor300b_firmware, draytek:vigor2960_firmware. Confirm the exact affected versions against the vendor advisory before deciding you are exposed.
Exploitation status reflects CISA's KEV catalog as we last synced it. Check the catalog directly.
- affected1.5.1.4
- affected1.5.1.4
As published in the CVE Program record. A version outside these ranges is not a statement that it is unaffected — vendors sometimes understate a range, and distribution-backported builds carry upstream numbers that do not reflect what was patched into them.
public exploits
Detection templates only, no public exploit found: 1 Nuclei template
- DrayTek Vigor - Command Injection · detection template · critical
Listed so you can judge urgency, not as a recommendation to run anything. GitHub “proofs of concept” are unvetted: some are fake or carry malware. Exploit-DB marks the entries its staff verified.
cisa ssvc
- exploitation
- active
- automatable
- yes
- technical impact
- total
Assessed by CISA 17 May 2025 (SSVC 2.0.3).
timeline
- 27 Dec 2024Published
- 15 May 2025Added to CISA KEV (exploited in the wild) · 138 days (about 5 months) later
- 17 May 2025CISA SSVC assessment: exploitation active · 2 days later
- 5 Jun 2025CISA remediation due date (US federal agencies) · 19 days later
- 21 Oct 2025CVE record last updated · 139 days (about 5 months) later
- 2 Nov 2026Analysed by vulneraibility.com · 377 days (about 1 year) later
- Advisoryvuldb.com /?submit.468795
- Exploitnetsecfish.notion.site /Command-Injection-in-apmcfgupload-endpoint-for-DrayTek-Gateway-Devices-1676b683
- Linkvuldb.com /?id.289380
- Linkvuldb.com /?ctiid.289380
- Linkcisa.gov /known-exploited-vulnerabilities-catalog?field_cve=CVE-2024-12987
- Linkfw.draytek.com.tw /Vigor3900/Firmware/v1.5.1.5/DrayTek_Vigor3900_V1.5.1.5_01release-note.pdf
- Linkfw.draytek.com.tw /Vigor2960/Firmware/v1.5.1.5/DrayTek_Vigor2960_V1.5.1.5_01release-note.pdf
- Linkfw.draytek.com.tw /Vigor300B/Firmware/v1.5.1.5/DrayTek_Vigor300B_V1.5.1.5_01release-note.pdf
sources
- CVE List (CVE.org): description, affected versions, references; CVE Terms of Use
- NVD: CVSS and CPE data
- CISA KEV catalog: exploitation, date added, due date
- CISA Vulnrichment (ADP): SSVC decision points
- FIRST EPSS: exploit probability and percentile
- Nuclei templates: detection templates
- Summary, impact and triage tags: written by our AI analysis pipeline from the sources above. Check them against the sources.