Junglewise Threat Intelligence

CVE-2026-90814: cosmicstack-labs mercury-agent server-side request forgery in GitHub API handler

CVE-2026-90814 · Severity: medium · CVSS 6.3 · Published 2026-09-14

Technologies: Cosmicstack Labs Mercury Agent. Vendors: Cosmicstack Labs.

Executive brief

Mercury is an AI agent framework that integrates with GitHub for API access. The GitHub API handler fails to validate destination URLs, allowing authenticated users to redirect API calls to arbitrary servers while the agent automatically attaches the configured GitHub token. An attacker can exploit this to steal GitHub credentials by crafting malicious chat inputs that trick the AI into making requests to attacker-controlled hosts.

Technical details

The vulnerability is a server-side request forgery (SSRF) in the `githubRequest()` function within `src/utils/github.ts`. The function accepts a `path` parameter and constructs URLs by checking if the path starts with "http"; if it does, the path is used as-is as an absolute URL; otherwise, it's appended to the GitHub API base URL. Critically, the function attaches the `Authorization: Bearer <GITHUB_TOKEN>` header to all requests regardless of destination. An authenticated web user can send a chat message that causes the agent's tool loop to invoke `github_api` with an absolute URL pointing to an attacker-controlled server, and the privileged GitHub token will be sent in the request headers. The attack requires authentication to the Mercury web dashboard and relies on the AI model choosing to call the `github_api` tool, but the PoC demonstrates successful end-to-end token exfiltration. A patch should validate destination URLs against a GitHub allowlist before applying authentication headers.

Affected products

  • cosmicstack-labs mercury-agent up to 1.1.13

Timeline

  • 2026-09-14: disclosed

References

Related threats