---
id: "CVE-2026-5463"
page: "https://infrastack.ai/live/CVE-2026-5463"
kind: "vulnerability"
aliases: ["CVE-2026-5463", "GHSA-qpc3-8vqg-8g6w"]
title: "pymetasploit3 vulnerable to command injection in console.run_module_with_output()"
severity: "critical"
cvss: 9.8
epss: 0.02152
exploited: false
status: "open"
category: "package"
products: [{"name": "pymetasploit3", "fixed": [], "affected": "<= 1.0.6", "ecosystem": "pypi"}, {"name": "danmcinerney pymetasploit3", "fixed": [], "affected": "<= 1.0.6", "ecosystem": "vendor"}]
ecosystems: ["pypi", "vendor"]
tags: ["cwe-77", "metasploit", "package", "pymetasploit3", "python"]
not_affected_if: ["fixed-input-only"]
published_at: "2026-04-03T05:16:24+00:00"
first_seen_at: "2026-11-16T16:03:22+00:00"
updated_at: "2026-11-16T16:08:50+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-qpc3-8vqg-8g6w", "first_seen_at": "2026-11-16T16:03:22+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-5463", "first_seen_at": "2026-11-16T16:08:50+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.02152, "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-5463"}]
---

# pymetasploit3 vulnerable to command injection in console.run_module_with_output()

Link for people: https://infrastack.ai/live/CVE-2026-5463 (this .md is for agents)

pymetasploit3, a Python client for the Metasploit RPC console, does not stop newline characters in module options such as RHOSTS. An attacker who controls those values can add extra console commands, which can lead to arbitrary command execution and control of Metasploit sessions.

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

## Affected

- pypi:pymetasploit3 affected <= 1.0.6 fixed no fixed version listed
- vendor:danmcinerney pymetasploit3 affected <= 1.0.6 fixed no fixed version listed

## How to check

- Check the installed version with `pip show pymetasploit3`; versions through `1.0.6` are affected.
- Search your code for calls to `console.run_module_with_output()` that pass values from user input or other untrusted sources.

## Timeline

- 2026-11-16T16:03:22+00:00 ghsa https://github.com/advisories/GHSA-qpc3-8vqg-8g6w
- 2026-11-16T16:08:50+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-5463

## From the sources

Command injection vulnerability in console.run_module_with_output() in pymetasploit3 through version 1.0.6 allows attackers to inject newline characters into module options such as RHOSTS. This breaks the intended command structure and causes the Metasploit console to execute additional unintended commands, potentially leading to arbitrary command execution and manipulation of Metasploit sessions.

---

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