CVE-2025-34073: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Stamparm Maltrail
Affects Stamparm MaltrailSource CVE Database V5
Not known to be exploited · public exploit available (Metasploit) · CVSS 10.0 Critical.
Data as of 10/24/2026, 22:16:01 UTC
- Exploitation
Not in CISA KEV, no exploitation reported
- EPSS
- 5.4% chance of exploitation in 30 days – higher than 92% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Public exploits
- 1 Metasploit module, a Nuclei detection templatePublic attack or detection tooling exists; see Public exploits below.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:HWhat to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
GitHubstamparm/maltrailpkg:github/stamparm/maltrailOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Until an official fix is available, it is recommended to restrict access to the Maltrail /login endpoint to trusted networks only and monitor for suspicious POST requests targeting the username parameter. Avoid exposing Maltrail instances directly to untrusted networks. Follow the vendor's updates closely for an official patch or mitigation instructions.
Public exploits and detection
Metasploit modules
Nuclei detection templates
Public tooling indexed from Metasploit Framework, Exploit-DB and ProjectDiscovery nuclei-templates. Its existence raises the odds of exploitation; it does not confirm attacks.
Description
An unauthenticated command injection vulnerability exists in stamparm/maltrail (Maltrail) versions <=0.54. A remote attacker can execute arbitrary operating system commands via the username parameter in a POST request to the /login endpoint. This occurs due to unsafe handling of user-supplied input passed to subprocess.check_output() in core/http.py, allowing injection of shell metacharacters. Exploitation does not require authentication and commands are executed with the privileges of the Maltrail process.
Impact
Successful exploitation allows a remote unauthenticated attacker to execute arbitrary operating system commands on the host running Maltrail, with the same privileges as the Maltrail process. This can lead to full system compromise depending on the privileges of the Maltrail service. The vulnerability is critical due to its unauthenticated remote code execution nature and high CVSS score.
Summary
This vulnerability (CVE-2025-34073) affects Stamparm Maltrail (<=0.54) and is caused by improper neutralization of special elements in user input (username parameter) used in an OS command context. Specifically, the username parameter in a POST request to /login is passed unsafely to subprocess.check_output(), allowing injection of shell metacharacters and arbitrary command execution. The flaw requires no authentication and results in command execution with the same privileges as the Maltrail process, representing a critical security risk. The CVSS 4.0 base score is 10.0, reflecting its critical severity and ease of exploitation.
Weaknesses
- CWE-78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (opens in a new tab)
Base weaknessLikelihood of exploit: HighCWE Top 25 (2025): #9OWASP Top 10 A05:2025: Injection (opens in a new tab)
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
- CWE-306Missing Authentication for Critical Function (opens in a new tab)
Base weaknessLikelihood of exploit: HighCWE Top 25 (2025): #21OWASP Top 10 A07:2025: Authentication Failures (opens in a new tab)
The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.
References
- raw.githubusercontent.com/rapid7/metasploit-framework/master/modules/exploits/unix/http/maltrail_rce.rb (opens in a new tab)
- huntr.com/bounties/be3c5204-fbd9-448d-b97c-96a8d2941e87 (opens in a new tab)
- github.com/stamparm/maltrail (opens in a new tab)
- github.com/stamparm/maltrail/issues/19146 (opens in a new tab)
- vulncheck.com/advisories/stamparm-maltrail-rce (opens in a new tab)