CVE-2022-39986 RaspAP Command Injection vulnerability

Critical 9.8 Published Updated

Unauthenticated attackers can execute arbitrary commands via the cfg_id parameter in RaspAP's OpenVPN configuration scripts.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-39986?

CVE-2022-39986 is a critical command injection vulnerability in n/a, published on 1 Aug 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-77

Which versions are affected by CVE-2022-39986?

2 open source packages ship an affected version, including billz/raspap-webgui. It affects 1 product.

PackageAffectedFixed in
billz/raspap-webgui PackagistFrom 2.8.02.8.8
billz/raspap-webgui PackagistFrom 2.8.02.8.8

Products include Raspap Raspap.

How do I fix CVE-2022-39986?

Upgrade billz/raspap-webgui to 2.8.8 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2022-39986 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-39986 exists.

Public exploit code: 1 Metasploit module, 1 Nuclei template and 1 proofs of concept on GitHub.

Sources

Also known as GHSA-7c28-wg7r-pg6f.

Is CVE-2022-39986 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free