Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify JSON-RPC service on local host
-
DeliveryConfirm MSF_WS_JSON_RPC_API_TOKEN is unset
-
ExploitTrigger or await db.check exception
-
Executionauth_initialized resets to false
-
PersistSend unauthenticated JSON-RPC requests
-
ImpactAccess sessions, loot, or execute modules
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Primary weakness mitigation
|
| Exploitation Conditions | Exploitation requires all three of the following conditions simultaneously: (1) the Metasploit JSON-RPC web service (msf-json-rpc.ru) must be actively running; (2) the MSF_WS_JSON_RPC_API_TOKEN environment variable must NOT be set in the service process environment - this is the case when operators rely solely on database-backed authentication without a static token; and (3) the db.check database health-check method must raise an exception at runtime, which occurs when the Metasploit PostgreSQL backend is unreachable, crashes, or is misconfigured after service startup. Exploitation is strictly limited to local attack surface (AV:L per the CVSS 4.0 vector) - the attacker must reach port 8081 from the same host or local network segment. No prior authentication or privileges are required once conditions are met (PR:N). This vulnerability does NOT affect deployments where MSF_WS_JSON_RPC_API_TOKEN is explicitly set, as that env-var path bypasses the fail-open logic entirely. |
| Impact | The CVSS 4.0 base score of 5.1 (AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N) reflects a local attack surface with limited confidentiality and integrity impact on the vulnerable system plus low subsequent-system exposure. No EPSS data was provided and this CVE is absent from the CISA KEV catalog, suggesting no confirmed widespread exploitation. The real-world risk is higher than the score implies for security teams running Metasploit in multi-user or automated environments - shared pentest infrastructure, CI/CD pipelines, or headless lab setups where the JSON-RPC service is active and the env var is not explicitly configured are plausible targets. Because the fail-open triggers on a db exception (which can occur naturally due to PostgreSQL downtime or misconfiguration), the attack is not fully attacker-controlled, which justifies the vendor's AC:L assertion only partially - an attacker who can influence database reachability could force the condition. No conflicting data between sources was identified, but the absence of EPSS and version-specific CPE data limits confidence in quantifying exploitation probability. |
| Exploit ScenarioDerived | An attacker with local access to a shared pentest server or CI/CD host running Metasploit's JSON-RPC service - where MSF_WS_JSON_RPC_API_TOKEN was never set - waits for or causes the PostgreSQL database to become unreachable, triggering the db.check exception and resetting auth_initialized. The attacker then sends unauthenticated JSON-RPC HTTP requests to port 8081 to enumerate active sessions, retrieve credentials from the loot database, or execute Metasploit modules against targets already in the operator's scope. No public POC has been identified, but the two-condition trigger is straightforward to reproduce from the description. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 27, 2026
Unauthenticated local access to Metasploit Framework's JSON-RPC dispatcher is possible via a fail-open logic flaw (CWE-305) in the ApiToken Warden authentication strategy. When the MSF_WS_JSON_RPC_API_TOKEN environment variable is unset and the db.check health-check method raises an exception, the internal msf.auth_initialized flag is reset to false - which the Warden misinterprets as authentication being uninitialised rather than failed, bypassing token enforcement entirely. A vendor-released upstream fix is available via GitHub PR #21768; no public exploit code and no CISA KEV listing have been identified at time of analysis.
RemediationAI
Apply the upstream fix from GitHub PR #21768 (https://github.com/rapid7/metasploit-framework/pull/21768); the fix is available as a PR/commit but a specific tagged release version was not confirmed in the available data - monitor the Rapid7 advisory at https://www.rapid7.com/blog/post/pt-metasploit-wrap-up-lot-of-summer-shells-and-fit-http-profiles/ for the patched release version. As an immediate compensating control, set MSF_WS_JSON_RPC_API_TOKEN to a cryptographically random value of at least 16 characters before starting the JSON-RPC service (e.g., export MSF_WS_JSON_RPC_API_TOKEN=$(ruby -rsecurerandom -e 'puts SecureRandom.hex(32)')); the PR diff confirms this fully prevents the fail-open path and the fixed service refuses to start without a valid token configured. Additionally, restrict access to the JSON-RPC port (default 8081) using host-based firewall rules (e.g., iptables or ufw) to block access from untrusted local users - note this does not fix the underlying flaw but reduces exposure surface until patching is complete.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Metasploit Framework (CPE: cpe:2.3:a:rapid7:metasploit-framework:*:*:*:*:*:*:*:*) ships a JSON-RPC web service (msf-json-rpc.ru, served via Thin or Puma on default port 8081) that exposes the full framework API - module execution, session management, database queries - over HTTP. Authentication is enforced by the ApiToken Warden strategy, which gates dispatch on an internal msf.auth_initialized boolean. CWE-305 (Authentication Bypass by Primary Weakness) is the root cause: the exception-handling path in the db.check health check resets auth_initialized to false, and the Warden guard treats false as 'authentication not configured or required' rather than 'authentication check encountered an error.' The vulnerability is specific to the code path where the env-var static token is absent and the database backend is unavailable or throws at runtime. The PR #21768 diff shows the fix hardened documentation and startup logic to refuse service launch when neither a static token nor a database-backed user token is available.
Know when Metasploit Framework gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
Requires two concurrent non-default conditions (env var unset and active db exception), so AC:H; local vector; scope change as Metasploit's full RPC API is exposed to subsequent systems.
Primary rating from Vendor (rapid7).
CVSS VectorVendor: rapid7
DescriptionCVE.org
A logic vulnerability (fail-open condition) has been identified within the Metasploit Framework's JSON-RPC web service interface. When an exception occurs during the database health check (db.check) and the environment variable MSF_WS_JSON_RPC_API_TOKEN is not explicitly set, the application resets the internal state flag msf.auth_initialized to false. The ApiToken Warden authentication strategy misinterprets this false value as an indicator that authentication is not initialized or required, thereby granting unauthenticated local access to the JSON-RPC request dispatcher.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-66836
GHSA-3p6c-gvpg-f24w
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB