Cloudanix VulnDB

CVE-2023-31210

High · 7.8

CVSS

7.8

EPSS

0.5%

Published

Dec 13, 2023

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

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

  1. Obtain Checkmk site user credentials or access
  2. Place a malicious shared library in a writable directory
  3. Export LD_LIBRARY_PATH pointing to that directory
  4. Invoke or wait for the Checkmk agent to start
  5. 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