# mcphub SSE endpoint authentication bypass enabling user impersonation

Source: https://junglewise.ai/threats/mcphub-sse-endpoint-authentication-bypass-enabling-user-impersonation-78450d1b  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-14. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: low · CVSS 3.1 · Published 2026-05-14

MCPHub is a middleware service that routes API calls through Server-Sent Events (SSE) channels. An unauthenticated attacker can impersonate any user—including administrators—by supplying an arbitrary username in the URL path, gaining access to user-scoped resources, executing commands under spoofed identities, and corrupting audit logs. This affects all deployments where bearer authentication is not explicitly configured.

Technologies: [@samanhappy/mcphub (npm)](https://junglewise.ai/threats/technologies/samanhappy-mcphub), [Samanhappy Mcphub](https://junglewise.ai/threats/technologies/mcphub). Vendors: [npm](https://junglewise.ai/threats/vendors/npm), [Samanhappy](https://junglewise.ai/threats/vendors/samanhappy).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Low severity, with a CVSS score of 3.1, published 14 May 2026.

**Which products and versions are affected?** @samanhappy/mcphub (npm) SEMVER:introduced=0,fixed=0.12.15; Samanhappy Mcphub <0.12.17.

**Is there a fix for This vulnerability?** Yes. @samanhappy/mcphub (npm): upgrade to 0.12.15 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run @samanhappy/mcphub (npm) or Samanhappy Mcphub at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @samanhappy/mcphub (npm): upgrade to 0.12.15 or later

  ```sh
  npm install @samanhappy/mcphub@0.12.15
  ```


## Technical details

The sseUserContextMiddleware in src/middlewares/userContext.ts accepts a username directly from the URL path parameter (req.params.user) without any authentication check, database validation, or token verification, constructing a fabricated IUser object that is accepted as legitimate. The SSE routes in src/server.ts apply only rate limiting and this vulnerable middleware—no authentication middleware protects the endpoints. Additionally, UserContextService is a singleton that stores the current user in a single instance variable, creating a race condition (CWE-362) where concurrent connections can overwrite each other's context. An attacker with network access to the SSE endpoint can connect as any user and execute MCP tool calls under the spoofed identity. The vulnerability was fixed in version 0.12.17.

## Affected products

- samanhappy mcphub <0.12.17

## Timeline

- 2026-05-14: disclosed
- 2026-05-14: patched: Fixed in version 0.12.17

## References

- [https://github.com/samanhappy/mcphub/security/advisories/GHSA-wf8q-wvv8-p8jf](https://github.com/samanhappy/mcphub/security/advisories/GHSA-wf8q-wvv8-p8jf)
- [https://github.com/samanhappy/mcphub](https://github.com/samanhappy/mcphub)

## Related threats

- [samanhappy MCPHub credential exfiltration via passthroughHeaders](https://junglewise.ai/threats/cve-2026-120323-a-security-flaw-has-been-discovered-in-samanhappy-mcphub-up-to-1)
- [samanhappy MCPHub privilege management in template import](https://junglewise.ai/threats/cve-2026-94047-a-security-vulnerability-has-been-detected-in-samanhappy-mcphub)
- [MCPHub OAuth 2.0 authentication bypass in authorization server](https://junglewise.ai/threats/cve-2026-90474-mcphub-oauth-2-0-authentication-bypass-in-authorization-server)
- [MCPHub horizontal privilege escalation in tool execution API](https://junglewise.ai/threats/cve-2026-79750-mcphub-horizontal-privilege-escalation-in-tool-execution-api)
- [MCPHub SSRF guard bypass in IPv6 transition address handling](https://junglewise.ai/threats/cve-2026-79749-mcphub-ssrf-guard-bypass-in-ipv6-transition-address-handling)
