Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network-reachable with low privileges required; incorrect authorization causes limited CIA impact; no scope change beyond the vulnerable system.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
4DescriptionCVE.org
A vulnerability was found in cosmicstack-labs mercury-agent up to 1.1.12. This issue affects the function Agent.handleBgCommand of the file src/core/agent.ts of the component bg Command Handler. Performing a manipulation results in incorrect authorization. It is possible to initiate the attack remotely. The exploit has been made public and could be used. The project was informed of the problem early through an issue report but has not responded yet.
AnalysisAI
Incorrect authorization in cosmicstack-labs mercury-agent through version 1.1.12 allows remote authenticated attackers to bypass access controls via the bg Command Handler. The flaw (CWE-863) resides in Agent.handleBgCommand within src/core/agent.ts, where a present-but-flawed authorization check can be manipulated to execute unauthorized background commands. A proof-of-concept exploit is publicly available via GitHub issue #73; the vendor has not responded to responsible disclosure and no patch exists at time of analysis.
Technical ContextAI
The vulnerability affects the bg Command Handler component of mercury-agent, a software agent project by cosmicstack-labs (CPE: cpe:2.3:a:cosmicstack-labs:mercury-agent:*:*:*:*:*:*:*:*). The root cause is CWE-863 (Incorrect Authorization): unlike CWE-306 (Missing Authentication), an authorization check is present in the handleBgCommand function but its logic is incorrectly implemented, allowing callers to manipulate inputs in ways that satisfy the check without having genuinely authorized permissions. This class of flaw commonly arises when authorization decisions rely on client-supplied data or fail to validate the full privilege context of the calling principal against the requested operation. The affected code path is src/core/agent.ts in the Agent class.
RemediationAI
No vendor-released patch has been identified at time of analysis - the maintainer has not responded to the responsible disclosure submitted via GitHub issue #73. As a compensating control, administrators should restrict network access to the mercury-agent instance to only the minimum set of trusted, authenticated principals, reducing the attack surface for the incorrect authorization bypass. If the background command handler feature (bg Command Handler) is not operationally required, disabling or removing access to that code path eliminates exposure entirely, though this may affect agent functionality. Enabling detailed audit logging of all background command invocations can aid in detecting exploitation attempts. Organizations should monitor the project repository at https://github.com/cosmicstack-labs/mercury-agent/ for a patched release and apply it immediately upon availability. If operational risk cannot be accepted without a patch, consider suspending use of affected mercury-agent instances.
More in Mercury Agent
View allIncorrect privilege assignment in cosmicstack-labs mercury-agent (all versions through 1.1.12) allows authenticated remo
Improper authorization in cosmicstack-labs mercury-agent's PermissionManager.checkShellCommand function (versions 1.1.0
Improper authorization in cosmicstack-labs mercury-agent's delegate_task tool allows a remotely authenticated low-privil
Server-side request forgery in cosmicstack-labs Mercury Agent (versions 1.1.0 through 1.1.13) lets an attacker who can i
Mercury Agent versions through 1.1.13 gate shell execution by validating commands before canonicalizing them, so a calle
A local information-disclosure weakness in cosmicstack-labs mercury-agent through version 1.2.0 lets a low-privileged lo
Same weakness CWE-863 – Incorrect Authorization
View allSame technique Authentication Bypass
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-53711
GHSA-9hrj-55h5-5mr2