# CVE-2024-23333: LAM vulnerable to Authenticated Remote Code Execution

> Authenticated attackers with master password access can inject PHP code into log files for remote code execution if web server write permissions are misconfigured.

- **Severity:** High 7.9 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Mar 2024
- **Updated:** 21 Aug 2024
- **Also known as:** DEBIAN-CVE-2024-23333, GHSA-fm9w-7m7v-wxqv, UBUNTU-CVE-2024-23333

## What is CVE-2024-23333?

CVE-2024-23333 is a high-severity code injection vulnerability in LDAPAccountManager lam, published on 18 Mar 2024. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

LDAP Account Manager (LAM) is a webfrontend for managing entries stored in an LDAP directory. LAM's log configuration allows to specify arbitrary paths for log files. Prior to version 8.7, an attacker could exploit this by creating a PHP file and cause LAM to log some PHP code to this file. When the file is then accessed via web the code would be executed. The issue is mitigated by the following: An attacker needs to know LAM's master configuration password to be able to change the main settings; and the webserver needs write access to a directory that is accessible via web. LAM itself does not provide any such directories. The issue has been fixed in 8.7. As a workaround, limit access to LAM configuration pages to authorized users.

Weakness: CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component)

## Which versions are affected by CVE-2024-23333?

It affects 1 product.


Products: Ldap-Account-Manager Ldap Account Manager.

## How do I fix CVE-2024-23333?

Upgrade to a fixed version.

## Is CVE-2024-23333 being exploited?

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

## Other vulnerabilities in LDAPAccountManager lam

- [CVE-2026-27894](https://insights.sbomify.com/CVE-2026-27894/): LAM has Authenticated Local File Inclusion (LFI) in PDF export (high 8.8)
- [CVE-2026-27895](https://insights.sbomify.com/CVE-2026-27895/): LAM has incorrect regular expression in PDF export component that allows user to upload files of any type (medium 4.3)
- [CVE-2013-4453](https://insights.sbomify.com/CVE-2013-4453/): Cross-site scripting in n/a (medium 4.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-23333 and fix it if it is affected.

What it is: CVE-2024-23333 is a high-severity code injection vulnerability in LDAPAccountManager lam, published on 18 Mar 2024. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-23333 in the wild and no public exploit code.

Affected product: LDAPAccountManager lam. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-23333/ (Markdown: https://insights.sbomify.com/CVE-2024-23333/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-23333
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-23333
- OSV: https://osv.dev/vulnerability/CVE-2024-23333

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-23333/
Summaries are generated and may contain mistakes; the official description above is the record.
