CVE-2022-39987 RaspAP Command Injection vulnerability

High 8.8 Published Updated

Authenticated attackers can execute arbitrary OS commands as root via the get_wgkey.php endpoint in RaspAP.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-39987?

CVE-2022-39987 is a high-severity command injection vulnerability in n/a, published on 1 Aug 2023. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A Command injection vulnerability in RaspAP 2.8.0 thru 2.9.2 allows an authenticated attacker to execute arbitrary OS commands as root via the "entity" POST parameters in /ajax/networking/get_wgkey.php.

Weakness: CWE-77

Which versions are affected by CVE-2022-39987?

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.9.5
billz/raspap-webgui PackagistFrom 2.8.02.9.5

Products include Raspap Raspap.

How do I fix CVE-2022-39987?

Upgrade billz/raspap-webgui to 2.9.5 or later.

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

Is CVE-2022-39987 being exploited?

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

Sources

Also known as GHSA-7r88-wjhj-jr8m.

Is CVE-2022-39987 in your software?

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

Check your SBOMs for free