CVE-2022-31087 Incorrect Default Permissions in ldap-account-manager

High 7.8 Published Updated

An attacker with file write access can upload a PHP web shell to the tmp directory, leading to remote code execution on the host.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-31087?

CVE-2022-31087 is a high-severity vulnerability in Debian Debian Linux, published on 27 Jun 2022. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

LDAP Account Manager (LAM) is a webfrontend for managing entries (e.g. users, groups, DHCP settings) stored in an LDAP directory. In versions prior to 8.0 the tmp directory, which is accessible by /lam/tmp/, allows interpretation of .php (and .php5/.php4/.phpt/etc) files. An attacker capable of writing files under www-data privileges can write a web-shell into this directory, and gain a Code Execution on the host. This issue has been fixed in version 8.0. Users unable to upgrade should disallow executing PHP scripts in (/var/lib/ldap-account-manager/)tmp directory.

Weakness: CWE-863, CWE-74

Which versions are affected by CVE-2022-31087?

It affects 2 products.

Products include Debian Debian Linux, Ldap-Account-Manager Ldap Account Manager.

How do I fix CVE-2022-31087?

Upgrade to a fixed version.

Is CVE-2022-31087 being exploited?

There is no known exploitation of CVE-2022-31087 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-31087, GHSA-q8g5-45m4-q95p, UBUNTU-CVE-2022-31087.

Is CVE-2022-31087 in your software?

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

Check your SBOMs for free