# CVE-2022-39986: RaspAP - RCE

> Live exploitation tracking for CVE-2022-39986 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-2022-39986

## Key facts

- **Exploitation phase:** Limited Exploitation. The vulnerability is known but shows very limited attacker interest or exploitation activity.
- **CVSS score:** 9.8
- **Public exploit available:** Yes
- **Affected products:** RaspAP
- **Weaknesses:** CWE-77 (Improper Neutralization of Special Elements used in a Command ('Command Injection'))

## Description

A Command injection vulnerability in RaspAP 2.8.0 thru 2.8.7 allows unauthenticated attackers to execute arbitrary commands via the cfg_id parameter in /ajax/openvpn/activate_ovpncfg.php and /ajax/openvpn/del_ovpncfg.php.

## CrowdSec analysis

[CVE-2022-39986](https://euvd.enisa.europa.eu/vulnerability/CVE-2022-39986) is a critical command injection vulnerability in RaspAP versions 2.8.0 through 2.8.7, allowing unauthenticated attackers to execute arbitrary system commands via the cfg_id parameter in specific OpenVPN-related endpoints. This flaw could be exploited remotely to gain full control over the affected device, leading to data theft, system compromise, or service disruption.

CrowdSec has been tracking this vulnerability and its exploits since 5th of August 2025.

CrowdSec has not observed any significant exploitation activity targeting CVE-2022-39986 across its network. As a result, no community-driven trend analysis is available for this vulnerability at this time.

Attackers exploit the `cfg_id` parameter in `/ajax/openvpn/activate_ovpncfg.php` and `/ajax/openvpn/del_ovpncfg.php` to inject shell commands, leading to unauthenticated remote code execution on vulnerable RaspAP installations.

## Timeline

- 2023-08-01: CVE Published. CVE-2022-39986 is published to NVD.
- 2025-08-05: Rule Released. CrowdSec releases a rule to detect CVE-2022-39986 exploitation attempts against the CrowdSec Network.

## References

- https://medium.com/%40ismael0x00/multiple-vulnerabilities-in-raspap-3c35e78809f2
- http://packetstormsecurity.com/files/174190/RaspAP-2.8.7-Unauthenticated-Command-Injection.html
- https://github.com/RaspAP/raspap-webgui/blob/master/ajax/openvpn/activate_ovpncfg.php
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2022/CVE-2022-39986.yaml

## Live exploitation data

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