# CVE-2024-12987: Vigor2960 - RCE

> Live exploitation tracking for CVE-2024-12987 by the CrowdSec Live Exploit Tracker, built from real-world attack data crowdsourced from CrowdSec's global network.

Page: https://tracker.crowdsec.net/cves/CVE-2024-12987

## Key facts

- **Exploitation phase:** Limited Exploitation. The vulnerability is known but shows very limited attacker interest or exploitation activity.
- **CVSS score:** 6.9
- **Public exploit available:** Yes
- **Affected products:** DrayTek Vigor2960, DrayTek Vigor300B
- **Weaknesses:** CWE-77 (Improper Neutralization of Special Elements used in a Command ('Command Injection')); CWE-78 (Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'))
- **Tags:** iot

## 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.

## CrowdSec analysis

[CVE-2024-12987](https://euvd.enisa.europa.eu/vulnerability/CVE-2024-12987) is a vulnerability in DrayTek router management interfaces that allows for remote OS command injection via crafted inputs to a web management endpoint.

CrowdSec has been tracking this vulnerability and its exploits since 11th of June 2025.

CrowdSec network observations suggest that most exploitation of CVE-2024-12987 involves focused reconnaissance to identify viable targets. Attackers typically tailor their campaigns based on system exposure and configuration. It is unlikely that a given attack is accidental.
CrowdSec network telemetry also shows that exploitation of CVE-2024-12987 has significantly declined over the past week. Attack volumes are well below the long-term average, suggesting attackers are rapidly losing interest. The vulnerability appears to be falling out of active use across most threat landscapes.

Exploitation typically involves requests to the `/cgi-bin/mainfunction.cgi/apmcfgupload` URL, with the attack focusing on manipulation of session parameters.

## Timeline

- 2024-12-27: CVE Published. CVE-2024-12987 is published to NVD.
- 2025-05-15: CISA KEV. CVE-2024-12987 is added to the Known Exploited Vulnerabilities catalog by CISA.
- 2025-06-05: CISA Remediation Deadline. Expiration of the CISA remediation deadline as described in [BOD 22-01](https://www.cisa.gov/news-events/directives/bod-22-01-reducing-significant-risk-known-exploited-vulnerabilities).
- 2025-06-11: Rule Released. CrowdSec releases a rule to detect CVE-2024-12987 exploitation attempts against the CrowdSec Network.
- 2025-06-16: CrowdSec First Seen. CrowdSec observes in-the-wild exploitation of CVE-2024-12987 for the first time.

## References

- https://fw.draytek.com.tw/Vigor2960/Firmware/v1.5.1.5/DrayTek_Vigor2960_V1.5.1.5_01release-note.pdf
- https://fw.draytek.com.tw/Vigor3900/Firmware/v1.5.1.5/DrayTek_Vigor3900_V1.5.1.5_01release-note.pdf
- https://vuldb.com/?id.289380
- https://fw.draytek.com.tw/Vigor300B/Firmware/v1.5.1.5/DrayTek_Vigor300B_V1.5.1.5_01release-note.pdf
- https://netsecfish.notion.site/Command-Injection-in-apmcfgupload-endpoint-for-DrayTek-Gateway-Devices-1676b683e67c8040b7f1f0ffe29ce18f?pvs=4
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-12987.yaml
- https://vuldb.com/?submit.468795

## Live exploitation data

The [Live Exploit Tracker page](https://tracker.crowdsec.net/cves/CVE-2024-12987) follows observed exploitation activity for CVE-2024-12987. [Request an API key](https://tracker.crowdsec.net/request-api-key) for full access to its exploitation timeline, attacking IP addresses and blocklists.
