{"id":"CVE-2026-121139","kind":"vulnerability","aliases":["CVE-2026-121139"],"related":[],"title":"Rapid7 Metasploit msf-ws: unauthenticated admin account creation on empty user table","description":"The Rapid7 Metasploit msf-ws suffers from a missing authentication vulnerability whereby the REST API grants an unauthenticated \"bootstrap\" exemption so that the very first administrator can be created when the users table is empty. While the table is empty, POST /api/v1/users is exempt from authentication by design: the route handler calls warden.authenticate!(scope: :admin_api), which resolves to AdminApiToken. The inherited ApiToken#authenticate! short-circuits and returns success!() whenever msf.auth_initialized is false, without ever evaluating AdminApiToken's administrator check. In that state the endpoint creates a user — including an administrator — for an entirely unauthenticated caller.\n\n\nThis issue has been fixed in version 6.5.9.","summary":"When the Metasploit msf-ws REST API has no users yet, the user-creation endpoint skips authentication and lets any caller create an administrator account. An attacker who reaches the API first gets admin access to the Metasploit instance.","severity":"high","cvss":7.3,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["metasploit","msf-ws","other","self-hosted"],"not_affected_if":["api-not-exposed","users-already-created","version-6.5.9-or-later"],"how_to_check":"- Check the installed Metasploit version with `msfconsole --version` and compare it to the fixed version.\n- Confirm whether the msf-ws REST API is reachable from untrusted networks.\n- Check whether the users table is empty or whether an administrator already exists.","fix":"- Metasploit (msf-ws): upgrade to `6.5.9` or later.","status":"open","published_at":"2026-11-05T16:17:44+00:00","first_seen_at":"2026-11-05T16:40:01+00:00","triaged_at":"2026-11-05T16:41:32+00:00","updated_at":"2026-11-05T16:41:32+00:00","category":"other","confidence":0.7,"triage":{"at":"2026-11-05T16:41:32Z","model":"claude-haiku-5-5","output":{"fix":"- Metasploit (msf-ws): upgrade to `6.5.9` or later.","reach":"network","title":"Rapid7 Metasploit msf-ws: unauthenticated admin account creation on empty user table","impact":"high","summary":"When the Metasploit msf-ws REST API has no users yet, the user-creation endpoint skips authentication and lets any caller create an administrator account. An attacker who reaches the API first gets admin access to the Metasploit instance.","audience":"developers","category":"other","nicknames":[],"who_cares":["metasploit","msf-ws","self-hosted"],"confidence":0.7,"fix_status":"available","needs_auth":"no","worst_case":"Attacker creates an administrator account and takes over the Metasploit instance.","analyst_note":"Confirm the affected version range and whether the msf-ws API is enabled by default; the sources give only the fixed version 6.5.9.","how_to_check":"- Check the installed Metasploit version with `msfconsole --version` and compare it to the fixed version.\n- Confirm whether the msf-ws REST API is reachable from untrusted networks.\n- Check whether the users table is empty or whether an administrator already exists.","plain_action":"","needs_analyst":true,"not_affected_if":["api-not-exposed","users-already-created","version-6.5.9-or-later"],"who_is_affected":"Teams running Metasploit Framework with the msf-ws REST API enabled, especially on a fresh install where no users exist yet. Installations with an existing administrator account or without the REST API exposed are not exposed through this path.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000728,"input_tokens":4383,"output_tokens":579,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-121139':16A,19A '-2026':15A,18A '/api/v1/users':111C '6.5.9':175C 'access':64B 'account':8A,54B 'admin':7A,63B,124C 'adminapitoken':129C,148C 'administr':53B,95C,150C,162C 'api':35B,60B,84C,125C 'apitoken':132C 'attack':56B 'authent':46B,79C,115C,133C 'bootstrap':88C 'call':121C 'caller':50B,167C 'check':151C 'circuit':136C 'creat':51B,98C,157C 'creation':9A,43B 'cve':14A,17A 'design':117C 'empti':11A,104C,109C 'endpoint':44B,156C 'entir':165C 'evalu':147C 'ever':146C 'exempt':89C,113C 'fals':144C 'first':61B,94C 'fix':172C 'get':62B 'grant':85C 'handler':120C 'host':27B 'includ':160C 'inherit':131C 'initi':142C 'instanc':68B 'issu':169C 'let':48B 'metasploit':2A,20B,30B,67B,71C 'miss':78C 'msf':4A,22B,32B,73C 'msf-ws':3A,21B,31B,72C 'msf.auth':141C 'post':110C 'rapid7':1A,70C 'reach':58B 'resolv':127C 'rest':34B,83C 'return':138C 'rout':119C 'scope':123C 'self':26B 'self-host':25B 'short':135C 'short-circuit':134C 'skip':45B 'state':154C 'success':139C 'suffer':75C 'tabl':13A,102C,107C 'unauthent':6A,87C,166C 'user':12A,38B,42B,101C,159C 'user-cr':41B 'version':174C 'vulner':80C 'warden.authenticate':122C 'whenev':140C 'wherebi':81C 'without':145C 'ws':5A,23B,33B,74C 'yet':39B","nicknames":[],"mitigations":[],"who_affected":"Teams running Metasploit Framework with the msf-ws REST API enabled, especially on a fresh install where no users exist yet. Installations with an existing administrator account or without the REST API exposed are not exposed through this path.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["high","metasploit","msfws","other","selfhosted"],"campaign_type":null,"first_public_at":"2026-11-05T16:17:44+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"cve@rapid7.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-121139","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-121139","severity":null,"published_at":"2026-11-05T16:17:44+00:00","modified_at":"2026-11-05T16:17:44+00:00","first_seen_at":"2026-11-05T16:40:01+00:00","fetched_at":"2026-11-05T16:40:01+00:00","note":null}],"documents":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}