{"id":"CVE-2022-31087","summary":"Incorrect Default Permissions in ldap-account-manager","details":"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.","aliases":["GHSA-q8g5-45m4-q95p"],"modified":"2026-04-02T08:00:27.100359Z","published":"2022-06-27T20:50:11Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-74"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31087.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31087.json"},{"type":"ADVISORY","url":"https://github.com/LDAPAccountManager/lam/security/advisories/GHSA-q8g5-45m4-q95p"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31087"},{"type":"ADVISORY","url":"https://www.debian.org/security/2022/dsa-5177"},{"type":"FIX","url":"https://github.com/LDAPAccountManager/lam/commit/f1d5d04952f39a1b4ea203d3964fa88e1429dfd4"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/ldapaccountmanager/lam","events":[{"introduced":"0"},{"fixed":"cb97baae7b1aadffd1b54d0bbcb487a5ca769823"}]}],"versions":["lam_5_4","lam_5_4_RC1","lam_5_5","lam_5_5_RC1","lam_5_6","lam_5_6_RC1","lam_5_7","lam_5_7_RC1","lam_6_0","lam_6_0_1","lam_6_0_RC1","lam_6_0_RC2","lam_6_1","lam_6_1_RC1","lam_6_2","lam_6_2_1","lam_6_2_RC1","lam_6_3","lam_6_3_RC1","lam_6_4","lam_6_4_RC1","lam_6_5","lam_6_5_RC1","lam_6_6","lam_6_6_RC1","lam_6_7","lam_6_7_RC1","lam_6_8","lam_6_8_RC1","lam_6_9","lam_6_9_RC1","lam_7_0","lam_7_0_RC1","lam_7_1","lam_7_1_RC1","lam_7_2","lam_7_2_RC1","lam_7_3","lam_7_3_RC1","lam_7_4","lam_7_4_RC1","lam_7_5","lam_7_5_RC1","lam_7_6","lam_7_6_RC1","lam_7_7","lam_7_7_RC1","lam_7_8","lam_7_8_RC1","lam_7_9","lam_7_9_1","lam_7_9_RC1","lam_8_0_RC1","origin/tags/after_0_6_merge","origin/tags/before_0_6_merge","origin/tags/lam_0_4_10","origin/tags/lam_0_4_7","origin/tags/lam_0_4_8","origin/tags/lam_0_4_9","origin/tags/lam_0_5_0","origin/tags/lam_0_5_1","origin/tags/lam_0_5_2","origin/tags/lam_0_5_3","origin/tags/lam_0_5_alpha1","origin/tags/lam_0_5_alpha2","origin/tags/lam_0_5_rc1","origin/tags/lam_0_5_rc2","origin/tags/lam_0_5_rc3","origin/tags/lam_1_0_0","origin/tags/lam_1_0_1","origin/tags/lam_1_0_2","origin/tags/lam_1_0_3","origin/tags/lam_1_0_4","origin/tags/lam_1_0_4RC1","origin/tags/lam_1_0_rc1","origin/tags/lam_1_0_rc2","origin/tags/lam_1_1_0","origin/tags/lam_1_1_0_RC1","origin/tags/lam_1_1_1","origin/tags/lam_1_1_1_rc1","origin/tags/lam_1_2_0","origin/tags/lam_1_2_0_RC1","origin/tags/lam_1_3_0","origin/tags/lam_1_3_0_RC1","origin/tags/lam_2_0_0","origin/tags/lam_2_0_0_RC1","origin/tags/lam_2_1_0","origin/tags/lam_2_1_0_RC1","origin/tags/lam_2_2_0","origin/tags/lam_2_2_0_RC1","origin/tags/lam_2_3_0","origin/tags/lam_2_3_0RC1","origin/tags/lam_2_4_0","origin/tags/lam_2_5_0","origin/tags/lam_2_5_0_RC1","origin/tags/lam_2_6_0","origin/tags/lam_2_6_0_RC1","origin/tags/lam_2_7_0","origin/tags/lam_2_7_0_RC1","origin/tags/lam_2_8_0","origin/tags/lam_2_8_0_RC1","origin/tags/lam_2_9_0","origin/tags/lam_2_9_0_RC1","origin/tags/lam_3_0_0","origin/tags/lam_3_0_0_RC1","origin/tags/lam_3_1_0","origin/tags/lam_3_1_0_RC1","origin/tags/lam_3_1_1","origin/tags/lam_3_2_0","origin/tags/lam_3_2_0_RC1","origin/tags/lam_3_3_0","origin/tags/lam_3_3_0_RC1","origin/tags/lam_3_4_0","origin/tags/lam_3_4_0_RC1","origin/tags/lam_3_5_0","origin/tags/lam_3_5_0_RC1","origin/tags/lam_3_6","origin/tags/lam_3_6_1","origin/tags/lam_3_6_RC1","origin/tags/lam_3_7","origin/tags/lam_3_7_RC1","origin/tags/lam_3_8","origin/tags/lam_3_8_RC1","origin/tags/lam_3_9","origin/tags/lam_3_9_RC1","origin/tags/lam_4_0","origin/tags/lam_4_0_1","origin/tags/lam_4_0_RC1","origin/tags/lam_4_1_RC1","origin/tags/start","origin/tags/trunk","untagged-0f11e4b04e249cac51c5"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-31087.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}