Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-48911 Overview
CVE-2024-48911 affects OpenCanary, a multi-protocol network honeypot maintained by Thinkst. Prior to version 0.9.4, the daemon directly executed commands taken from its configuration file. When the config file resides in an unprivileged user directory while the daemon runs as root, an unprivileged local user can modify the config and escalate privileges when root later executes the daemon. The flaw is tracked as an authorization issue [CWE-863]. Version 0.9.4 contains the fix.
Critical Impact
A local unprivileged user who can write to the OpenCanary configuration file can achieve root-level command execution when the daemon is next launched by a privileged user.
Affected Products
- Thinkst OpenCanary versions prior to 0.9.4
- Deployments where opencanary.conf resides in an unprivileged user-writable directory
- Installations where the OpenCanary daemon is executed by root
Discovery Timeline
- 2024-10-14 - CVE-2024-48911 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-48911
Vulnerability Analysis
OpenCanary reads operational parameters from opencanary.conf and invokes system binaries referenced in that file through subprocess calls. The pre-patch code did not validate the binary path or restrict execution to trusted system locations. An attacker able to write to the configuration file could redirect binary names to attacker-controlled executables or shell aliases.
When a root user later starts the daemon, those attacker-supplied commands execute with root privileges. This converts a file-write primitive in an unprivileged user's home directory into full local privilege escalation. The attack is purely local and requires that the daemon be run by a higher-privileged account after the config is tampered with.
Root Cause
The root cause is improper authorization and trust of configuration-supplied command strings [CWE-863]. The daemon treated binary references in opencanary.conf as trusted input and invoked them via subprocess without constraining the executable search path. Because the config file could live in a lower-privileged user's directory, the trust boundary between the config writer and the daemon runner was violated.
Attack Vector
The attack requires local access with write permission to the OpenCanary configuration file. The attacker modifies values that are later passed to subprocess execution. When an administrator starts the daemon via sudo or as root, the injected binary or alias runs under the privileges of the launching user, yielding privilege escalation.
# Patch excerpt from opencanary/__init__.py introducing safe_exec
import os
import subprocess
__version__ = "0.9.3"
from os import PathLike
from typing import Union
BIN_LOCATIONS = ["/usr/bin", "/bin", "/usr/sbin", "/sbin"]
def _check_file_exists_and_executable(path: Union[PathLike, str]) -> bool:
if not os.path.isfile(path):
return False
else:
return os.access(path, os.X_OK)
def safe_exec(binary_name: str, args: list) -> bytes:
"""
Executes the given binary with the given arguments as a subprocess. What makes this safe is that the binary name
is not executed as an alias, and only binaries that live in trusted system locations are executed. This means that
only system-wide binaries are executable.
"""
exec_path = None
for prefix in BIN_LOCATIONS:
bin_path = os.path.join(prefix, binary_name)
if _check_file_exists_and_executable(os.path.join(prefix, binary_name)):
exec_path = bin_path
break
Source: Thinkst OpenCanary patch commit 2c11575
The patch introduces safe_exec, which resolves binaries only within a fixed list of trusted system directories (/usr/bin, /bin, /usr/sbin, /sbin) and refuses to execute user-supplied aliases or arbitrary paths.
Detection Methods for CVE-2024-48911
Indicators of Compromise
- Unexpected modifications to opencanary.conf by non-administrative users.
- Child processes spawned by the OpenCanary daemon that resolve to binaries outside /usr/bin, /bin, /usr/sbin, or /sbin.
- Shell aliases, relative paths, or user-home paths appearing in command fields of the OpenCanary configuration.
Detection Strategies
- Audit file permissions on opencanary.conf and parent directories. Flag any config writable by non-root users while the daemon runs as root.
- Monitor process creation events where the parent is opencanaryd and the child executable path is outside the trusted BIN_LOCATIONS set.
- Diff running configurations against a known-good baseline and alert on changes to command or binary-name fields.
Monitoring Recommendations
- Enable Linux audit rules (auditd) on opencanary.conf to capture write events and the responsible UID.
- Collect process lineage telemetry from affected hosts and route it to a centralized data lake for correlation with configuration-change events.
- Alert on any execution of the OpenCanary daemon under root immediately following a config file modification by a non-root principal.
How to Mitigate CVE-2024-48911
Immediate Actions Required
- Upgrade OpenCanary to version 0.9.4 or later on all deployments.
- Relocate opencanary.conf to a directory writable only by root (for example /etc/opencanaryd/).
- Review existing config files for suspicious binary names, aliases, or non-standard paths before restarting the daemon.
Patch Information
Thinkst released the fix in OpenCanary v0.9.4. The implementation is documented in GitHub Security Advisory GHSA-pf5v-pqfv-x8jj and introduces the safe_exec helper that restricts execution to binaries in trusted system paths.
Workarounds
- Run the OpenCanary daemon under a dedicated low-privilege service account instead of root where feasible.
- Set strict ownership and permissions on opencanary.conf (chown root:root, chmod 600) to prevent unprivileged writes.
- Monitor the configuration file with host integrity tooling and refuse to start the daemon when unexpected changes are detected.
# Harden OpenCanary configuration file ownership and permissions
sudo mv ~/.opencanary.conf /etc/opencanaryd/opencanary.conf
sudo chown root:root /etc/opencanaryd/opencanary.conf
sudo chmod 600 /etc/opencanaryd/opencanary.conf
# Verify installed version is patched
pip show opencanary | grep -i version
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

