---
id: "CVE-2026-121139"
kind: "vulnerability"
aliases: ["CVE-2026-121139"]
title: "Rapid7 Metasploit msf-ws: unauthenticated admin account creation on empty user table"
severity: "high"
cvss: 7.3
epss: null
exploited: false
status: "open"
category: "other"
products: []
ecosystems: []
tags: ["metasploit", "msf-ws", "other", "self-hosted"]
not_affected_if: ["api-not-exposed", "users-already-created", "version-6.5.9-or-later"]
published_at: "2026-11-05T16:17:44+00:00"
first_seen_at: "2026-11-05T16:40:01+00:00"
updated_at: "2026-11-05T16:41:32+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-121139", "first_seen_at": "2026-11-05T16:40:01+00:00"}]
exploit_sources: []
---

# Rapid7 Metasploit msf-ws: unauthenticated admin account creation on empty user table

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.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed Metasploit version with `msfconsole --version` and compare it to the fixed version.
- Confirm whether the msf-ws REST API is reachable from untrusted networks.
- Check whether the users table is empty or whether an administrator already exists.

## Fix

- Metasploit (msf-ws): upgrade to `6.5.9` or later.

## Timeline

- 2026-11-05T16:40:01+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-121139

## From the sources

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.


This issue has been fixed in version 6.5.9.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
