IBM ContextForge MCP Gateway: Authentication bypass via hardcoded JWT secret key
Summary
ContextForge (mcp-context-forge) ships with a publicly known default JWT_SECRET_KEY in its source code and .env.example. Because the token verification accepts HS256 tokens signed with this key and can create a platform administrator from the token subject when REQUIRE_USER_IN_DB is false, an unauthenticated remote attacker can forge administrator tokens without a database account. Forged access persists after password changes, account deletion and session revocation as long as the default key remains configured and the platform-admin bootstrap is enabled, allowing disclosure, modification and service disruption.
Affected
- IBM mcp-context-forge versions before 1.0.2 (GHSA lists <=1.0.1)
- Exposed where the default JWT_SECRET_KEY is still configured and PLATFORM_ADMIN_EMAIL bootstrap is enabled
Fixed in
- Fixed in version 1.0.2
- Fix commit 2af690f: REQUIRE_USER_IN_DB now defaults to True, the bootstrap is_admin flag is derived from a JWT claim, weak secrets raise a configuration error in production
Workaround
- Replace JWT_SECRET_KEY with a long random value not found in the public repository or .env.example (existing tokens become invalid)
- Set REQUIRE_USER_IN_DB=true so tokens require a database account
- Restrict network access to the gateway (VPN or allow-list)
- Note: the vendor advisory states that an upstream proxy forwarding Authorization headers does not neutralise the issue
Exploitation
- CISA SSVC: exploitation status poc, automatable yes, technical impact total
- The vendor advisory describes the attack with reproduction steps (publicly available)
- No evidence of in-the-wild exploitation found
- Attack requires no credentials and no user interaction
Our recommendation
- Upgrade to version 1.0.2 or later and check the 1.0.2 release notes for configuration changes
- Rotate JWT_SECRET_KEY and AUTH_ENCRYPTION_SECRET regardless of the upgrade
- Set REQUIRE_USER_IN_DB=true and change PLATFORM_ADMIN_EMAIL defaults
- Check that the gateway is not reachable from the internet; restrict access via VPN or allow-list
- Review administrator accounts and audit logs for unexpected admin activity or token use
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Security Advisory GHSA-m8rv-5m6m-32ff github.com
- Fix commit 2af690f github.com
- Release v1.0.2 github.com
- OSV entry CVE-2026-53709 osv.dev
- CNA record via Vulners (CVELIST) vulners.com
- IONIX threat center CVE-2026-53709 www.ionix.io
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 30 Oct 2026, 19:05.
Original description (NVD)
MCP Context Forge is an MCP gateway and administrative platform. Prior to 1.0.2, mcpgateway/config.py and .env.example ship a known JWT_SECRET_KEY, while verify_jwt_token() accepts HS256 tokens signed with that key and get_current_user() creates a platform administrator when the token subject matches PLATFORM_ADMIN_EMAIL and REQUIRE_USER_IN_DB is false. A remote unauthenticated attacker can therefore mint accepted administrator tokens without a database account. While the vulnerable signing key remains configured and the platform-admin bootstrap remains enabled, forged access survives password rotation, account deletion, and session revocation, allowing administrative disclosure, modification, and service disruption. This issue is fixed in version 1.0.2.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
