CVE-2026-18996 in mercury-agent
Summary
by MITRE • 08/06/2026
A vulnerability has been found in cosmicstack-labs mercury-agent up to 1.1.12. This vulnerability affects the function PermissionManager.checkShellCommand of the file src/capabilities/permissions.ts of the component run_command Handler. Such manipulation leads to incorrect privilege assignment. The attack may be performed from remote. The exploit has been disclosed to the public and may be used. The project was informed of the problem early through an issue report but has not responded yet.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 08/06/2026
The vulnerability identified in cosmicstack-labs mercury-agent version 1.1.12 represents a critical privilege escalation issue within the permission management subsystem. This flaw exists in the PermissionManager.checkShellCommand function located in src/capabilities/permissions.ts, specifically affecting the run_command Handler component. The vulnerability stems from improper privilege assignment mechanisms that fail to correctly validate or enforce access controls when executing shell commands through the mercury-agent framework. The affected system operates as a remote monitoring and management tool, making this vulnerability particularly dangerous as it can be exploited from external networks without requiring local system access.
The technical implementation of this vulnerability allows attackers to manipulate the permission checking logic in ways that bypass intended security boundaries. When the PermissionManager.checkShellCommand function processes incoming commands, it fails to properly validate the privilege levels or execute proper access control checks before allowing shell command execution. This misconfiguration creates a path where unauthorized users can escalate their privileges and execute arbitrary commands with elevated permissions. The vulnerability has been publicly disclosed and is actively being exploited, indicating that threat actors have already developed working payloads against this specific flaw. The fact that the project maintainers were informed through an issue report but have not responded suggests either delayed patch development or potential lack of awareness regarding the severity of the exploit.
The operational impact of this vulnerability extends beyond simple privilege escalation to encompass full system compromise capabilities. Attackers exploiting this vulnerability can execute arbitrary shell commands with elevated privileges, potentially gaining complete control over systems running vulnerable mercury-agent versions. This type of vulnerability aligns with CWE-284, which specifically addresses improper access control issues in software systems. The attack vector being remote means that network exposure significantly increases the attack surface, as attackers do not require physical access or prior system compromise to exploit this weakness. Organizations using this agent for remote monitoring and management operations face immediate risk of unauthorized access and potential data breaches.
Mitigation strategies should focus on immediate patching of the mercury-agent software to version 1.1.13 or later where the vulnerability has been addressed. System administrators should implement network segmentation to limit exposure of mercury-agent components to untrusted networks, while also enabling strict firewall rules that restrict remote access to only authorized administrative interfaces. The implementation of principle of least privilege should be enforced across all mercury-agent configurations, ensuring that even if exploitation occurs, attackers cannot escalate privileges beyond the minimum required for legitimate operations. Monitoring and logging should be enhanced to detect anomalous command execution patterns that might indicate exploitation attempts. Organizations should also consider implementing intrusion detection systems specifically configured to identify potential exploitation attempts targeting this known vulnerability pattern. Additionally, regular security assessments of third-party components should be conducted to identify similar privilege management flaws in other software dependencies. The ATT&CK framework categorizes this type of vulnerability under privilege escalation techniques, specifically related to command execution and access control bypass methods that adversaries frequently employ in enterprise environments.