Checkmk Robotmk Turned Monitoring Output Into a File Write Primitive

Monitoring agents are usually treated as data producers. CVE-2026-120495 shows that a monitoring server can give those producers too much influence over where output is written. In the Robotmk synthetic monitoring service, an attacker who controlled a monitored host's agent output could craft robot output that selected both the contents and location of a generated HTML log.

The published advisory describes path traversal that leads to arbitrary file write and code execution as the site user. The vulnerable versions are Checkmk before 2.5.0p19, before 2.4.0p40 and the end-of-life 2.3.0 line.

Why agent output is a trust boundary

Synthetic monitoring often runs a test on a managed host and returns structured results to the central server. The central service then renders reports, stores artifacts and may open the HTML in a browser. If the host is compromised, the agent already serves an attacker. The remaining question is how far that attacker can move through the monitoring server.

This flaw crosses that boundary. A crafted result was not limited to text in an alert. It influenced a filesystem path used for generated HTML. The advisory says the resulting write could become code execution as the site user. The exact payload path is less important than the privilege held by the monitoring service and the web process.

Remediation

Upgrade Checkmk to 2.5.0p19 or later, or 2.4.0p40 or later. The 2.3.0 release is end of life, so remaining installations need a supported upgrade rather than a workaround-only plan.

Restrict what the Robotmk service can write. Give the site user a dedicated filesystem root and remove write access to application code, startup directories and other site configuration. Mount generated reports on a separate volume. Run the rendering step in a worker that cannot reach the Checkmk configuration database or monitoring credentials.

Review agent enrollment and host ownership. A monitored host that is not under the same administrative control as the Checkmk server should not be able to submit synthetic results. Use network policy to limit which hosts can reach the agent input paths. Treat remote-site monitoring as distributed trust, not as a trusted local feed.

Investigation

Look for generated HTML files outside the normal reporting path. Review file creation events around the site user, web access logs, shell process ancestry and scheduled tasks. Check whether the monitoring interface served a new or modified artifact. Preserve the Checkmk site directory and the relevant agent output before cleanup.

If the site user could write into a CGI, PHP, Python or template directory, a single uploaded page may leave little obvious trace after execution. Compare the site tree with a known build or package list, not only file names visible in the monitoring UI.

Verification

After upgrading, submit a test result containing parent-directory components and an absolute output path. Confirm the service rejects it and that no file appears outside the intended artifact directory. Verify the worker cannot write to the application tree even if a future parser accepts a malformed path.

References