Incorrect Default Permissions in ldap-account-manager
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2022-31087
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 17:43 UTC · Revision 1
Source evidence
Incorrect Default Permissions in ldap-account-manager
core-osv · Original sourcePublished 27 Jun 2022, 20:50 UTC
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.
osv:CVE-2022-31087
Complete source record
{
"id": "a0bab040da236adacfde812f971932d60db09c01df932e6dfdd91942ffa71b47",
"url": "https://osv.dev/vulnerability/CVE-2022-31087",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Incorrect Default Permissions in ldap-account-manager",
"summary": "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.",
"evidence": "osv:CVE-2022-31087",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2022-31087",
"aliases": [
"CVE-2022-31087",
"GHSA-q8g5-45m4-q95p"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/ldapaccountmanager/lam",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "cb97baae7b1aadffd1b54d0bbcb487a5ca769823"
},
{
"fixed": "f1d5d04952f39a1b4ea203d3964fa88e1429dfd4"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:ldap-account-manager:ldap_account_manager:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "8.0"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "f1d5d04952f39a1b4ea203d3964fa88e1429dfd4"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"lam_8_0_RC1",
"lam_7_9_RC1",
"lam_7_8",
"lam_7_8_RC1",
"lam_7_7",
"lam_7_7_RC1",
"lam_7_6",
"lam_7_6_RC1",
"lam_7_5",
"lam_7_5_RC1",
"lam_7_4",
"lam_7_4_RC1",
"lam_7_3",
"lam_7_2",
"lam_7_2_RC1",
"lam_7_1",
"lam_7_1_RC1",
"lam_7_0",
"lam_7_0_RC1",
"lam_6_9",
"lam_6_9_RC1",
"lam_6_8",
"lam_6_8_RC1",
"lam_6_7",
"lam_6_7_RC1",
"lam_6_6",
"lam_6_6_RC1",
"lam_6_5",
"lam_6_5_RC1",
"untagged-0f11e4b04e249cac51c5",
"lam_6_4",
"lam_6_4_RC1",
"lam_6_3",
"lam_6_3_RC1",
"lam_6_2",
"lam_6_2_RC1",
"lam_6_1",
"lam_6_1_RC1",
"lam_6_0",
"lam_6_0_RC2",
"lam_6_0_RC1",
"lam_5_7",
"lam_5_7_RC1",
"lam_5_6",
"lam_5_6_RC1",
"lam_5_5",
"lam_5_5_RC1",
"lam_5_4",
"lam_5_4_RC1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-31087.json"
}
}
],
"modified": "2026-10-28T02:30:31.262322708Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31087.json",
"https://github.com/LDAPAccountManager/lam/security/advisories/GHSA-q8g5-45m4-q95p",
"https://nvd.nist.gov/vuln/detail/CVE-2022-31087",
"https://www.debian.org/security/2022/dsa-5177",
"https://github.com/LDAPAccountManager/lam/commit/f1d5d04952f39a1b4ea203d3964fa88e1429dfd4"
],
"provider_metadata": {
"cwe_ids": [
"CWE-74"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31087.json"
}
},
"related_cves": [
{
"value": "CVE-2022-31087",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 497969,
"published_at": "2022-06-27T20:50:11+00:00"
}