CVE-2026-16895: Rapid7 Metasploit Framework JSON-RPC auth bypass

CVE-2026-16895 · Severity: info · Published 2026-08-27

Metasploit Framework's JSON-RPC web service has a logic flaw that can reset authentication state when the database health check fails and the API token environment variable is not configured. This allows attackers with local access to bypass authentication and interact with the JSON-RPC interface without valid credentials, potentially gaining control over penetration testing operations.

Technologies: Rapid7 Metasploit Framework. Vendors: Rapid7.

Quick answers

Is CVE-2026-16895 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-16895 being exploited in the wild.
How severe is CVE-2026-16895?
Informational severity, published 27 August 2026.
Which products and versions are affected?
Rapid7 Metasploit Framework.
Is there a fix for CVE-2026-16895?
A patch was published on 2026-08-13. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-16895 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-16895?
Check whether you run Rapid7 Metasploit Framework. 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.

Technical details

The vulnerability is a fail-open authentication bypass in the JSON-RPC web service interface triggered by a logic error in exception handling. When the db.check database health check throws an exception and the MSF_WS_JSON_RPC_API_TOKEN environment variable is not set, the application incorrectly resets the msf.auth_initialized flag to false. The ApiToken Warden authentication strategy interprets this false value as indicating authentication is not yet initialized, thereby granting unauthenticated access to the JSON-RPC dispatcher. The attack requires local access to the Metasploit service. A patch was merged on August 13, 2026 that corrects the authentication logic to properly handle this exception case.

Affected products

  • Rapid7 Metasploit Framework

Timeline

  • 2026-08-27: disclosed
  • 2026-08-13: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.