CVE-2024-12987: DrayTek Vigor Routers OS Command Injection Vulnerability
Affects DrayTek Vigor RoutersSource CISA KEV
Exploited in the wild · KEV due 5 Jun 2025 · public detection template (Nuclei) · 98% EPSS : apply the vendor's fix or mitigations to DrayTek Vigor Routers now.
Data as of 10/24/2026, 22:15:59 UTC
- Exploitation
Actively exploited – in CISA KEV since 05/15/2025
- KEV deadline
- 06/05/2025 US federal agencies must patch by this date; a sensible deadline for everyone else.
- EPSS
- 98.1% chance of exploitation in 30 days – higher than 99% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Public exploits
- a Nuclei detection templatePublic attack or detection tooling exists; see Public exploits below.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:NWhat to do
CISA required action
Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
- fw.draytek.com.tw/Vigor2960/Firmware/v1.5.1.5/DrayTek_Vigor2960_V1.5.1.5_01release-note.pdf (opens in a new tab)
- fw.draytek.com.tw/Vigor300B/Firmware/v1.5.1.5/DrayTek_Vigor300B_V1.5.1.5_01release-note.pdf (opens in a new tab)
- fw.draytek.com.tw/Vigor3900/Firmware/v1.5.1.5/DrayTek_Vigor3900_V1.5.1.5_01release-note.pdf (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2024-12987 (opens in a new tab)
Check the firmware or software version for DrayTek Vigor Routers in the device's admin interface against the vendor advisory.
Public exploits and detection
Nuclei detection templates
Public tooling indexed from Metasploit Framework, Exploit-DB and ProjectDiscovery nuclei-templates. Its existence raises the odds of exploitation; it does not confirm attacks.
Description
DrayTek Vigor2960, Vigor300B, and Vigor3900 routers contain an OS command injection vulnerability due to an unknown function of the file /cgi-bin/mainfunction.cgi/apmcfgupload of the component web management interface.
Weaknesses
- CWE-78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (opens in a new tab)
Base weaknessLikelihood of exploit: HighCWE Top 25 (2025): #9OWASP Top 10 A05:2025: Injection (opens in a new tab)
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.
References
- fw.draytek.com.tw/Vigor2960/Firmware/v1.5.1.5/DrayTek_Vigor2960_V1.5.1.5_01release-note.pdf (opens in a new tab)
- fw.draytek.com.tw/Vigor300B/Firmware/v1.5.1.5/DrayTek_Vigor300B_V1.5.1.5_01release-note.pdf (opens in a new tab)
- fw.draytek.com.tw/Vigor3900/Firmware/v1.5.1.5/DrayTek_Vigor3900_V1.5.1.5_01release-note.pdf (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2024-12987 (opens in a new tab)
- cisa.gov/known-exploited-vulnerabilities-catalog?search=CVE-2024-12987 (opens in a new tab)