CVE-2023-31210
High · 7.8CVSS
7.8
EPSS
0.5%
Published
Dec 13, 2023
CISA due date
—
Cloudanix analysis
A monitoring tool flaw lets users with limited access trick the software into running their own code, giving them much greater control over the system.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Privilege Escalation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw permits a local Checkmk site user to control LD_LIBRARY_PATH for the agent process, causing the dynamic linker to load attacker-supplied shared libraries and execute arbitrary code with elevated privileges.
Why it matters to the business
Compromise of the monitoring system can expose infrastructure telemetry, allow lateral movement, and disrupt operational visibility across managed environments.
How an attack unfolds
An attacker with site-user access crafts a malicious library, sets LD_LIBRARY_PATH to reference it, and triggers the Checkmk agent so the library is loaded at startup, resulting in privilege escalation on the host.
How to fix it
Upgrade Checkmk to a version later than 2.2.0p16 that removes or sanitizes the user-controlled LD_LIBRARY_PATH environment variable before loading libraries; restrict site-user shell access where possible.
How to confirm the fix worked
Review agent startup scripts and binary for LD_LIBRARY_PATH handling; confirm the process environment no longer inherits untrusted library paths; test by attempting library injection after upgrade.
Typical attack path
- Obtain Checkmk site user credentials or access
- Place a malicious shared library in a writable directory
- Export LD_LIBRARY_PATH pointing to that directory
- Invoke or wait for the Checkmk agent to start
- Execute code with the agent's elevated privileges
How to detect it
Search process execution logs and audit trails for Checkmk agent startups that include non-standard LD_LIBRARY_PATH values; inspect file system for unexpected shared libraries in user-writable paths loaded by the agent.
- LD_LIBRARY_PATH=.* in checkmk agent environment
- Unexpected .so files loaded by checkmk-agent process
- Agent process spawning from user-controlled directories
What your security team should do
- Prioritize upgrade of all Checkmk 2.2.0p10–p16 installations
- Limit site-user accounts to the minimum required privileges
- Harden agent launch environment to ignore LD_LIBRARY_PATH
- Audit logs for unexpected library loads in agent processes
The record
Usage of user controlled LD_LIBRARY_PATH in agent in Checkmk 2.2.0p10 up to 2.2.0p16 allows malicious Checkmk site user to escalate rights via injection of malicious libraries
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:18.04:LTS | check-mk | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | check-mk | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | check-mk | 0 | No fix |
Related vulnerabilities
- CVE-2024-47094 Insertion of Sensitive Information into Log File in Checkmk GmbH's Checkmk versions… Also affects check-mk
- CVE-2024-38863 Exposure of CSRF tokens in query parameters on specific requests in Checkmk GmbH's… Also affects check-mk
- CVE-2024-38862 Insertion of Sensitive Information into Log File in Checkmk GmbH's Checkmk versions… Also affects check-mk
- CVE-2024-6747 Information leakage in mknotifyd in Checkmk before 2.3.0p18, 2.2.0p36, 2.1.0p49 and in… Also affects check-mk
- CVE-2024-8606 Bypass of two factor authentication in RestAPI in Checkmk < 2.3.0p16 and < 2.2.0p34… Also affects check-mk
- CVE-2024-38860 Improper neutralization of input in Checkmk before versions 2.3.0p16 and 2.2.0p34 allows… Also affects check-mk
- CVE-2024-38858 Improper neutralization of input in Checkmk before version 2.3.0p14 allows attackers to… Also affects check-mk
- CVE-2024-38859 XSS in the view page with the SLA column configured in Checkmk versions prior to… Also affects check-mk