{"id":82114,"date":"2025-10-07T18:37:48","date_gmt":"2025-10-07T18:37:48","guid":{"rendered":""},"modified":"2025-11-02T11:12:38","modified_gmt":"2025-11-02T17:12:38","slug":"cve-2025-61622-remote-code-execution-vulnerability-in-python-s-pyfory-and-pyfury-libraries","status":"publish","type":"post","link":"https:\/\/www.ameeba.com\/blog\/cve-2025-61622-remote-code-execution-vulnerability-in-python-s-pyfory-and-pyfury-libraries\/","title":{"rendered":"<strong>CVE-2025-61622: Remote Code Execution Vulnerability in Python&#8217;s Pyfory and Pyfury Libraries<\/strong>"},"content":{"rendered":"<p><strong>Overview<\/strong><\/p>\n<p>The vulnerability tracked as CVE-2025-61622 is a critical flaw that resides in the Pyfory library of Python, versions 0.12.0 through 0.12.2, and its predecessor Pyfury, versions from 0.1.0 through 0.10.3. This vulnerability, if exploited, could enable an attacker to execute arbitrary code on the affected system. It is of utmost importance <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-10226-severe-vulnerability-in-axxonsoft-axxon-one-2-0-8-due-to-dependency-on-vulnerable-postgresql-component\/\"  data-wpil-monitor-id=\"89760\">due to its high severity<\/a> score and the potential for widespread impact, affecting any application that reads Pyfory serialized data from untrusted sources.<\/p>\n<p><strong>Vulnerability Summary<\/strong><\/p>\n<p>CVE ID: CVE-2025-61622<br \/>\nSeverity: Critical (CVSS: 9.8)<br \/>\nAttack Vector: Network<br \/>\nPrivileges Required: None<br \/>\nUser Interaction: None<br \/>\nImpact: <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-10533-critical-vulnerability-in-firefox-and-thunderbird-leading-to-potential-system-compromise\/\"  data-wpil-monitor-id=\"89396\">Potential system<\/a> compromise and data leakage<\/p>\n<p><strong>Affected Products<\/strong><\/p><div id=\"ameeb-39310577\" 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: 720px;\">\r\n  <h2 style=\"margin-top: 0; font-size: 22px; font-weight: 600; display: flex; align-items: center; letter-spacing: -0.02em;\">\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\" style=\"display: inline-flex; align-items: center; margin-right: 10px;\">\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: 42px; height: 42px;\" \/>\r\n    <\/a>\r\n    Share secrets securely\r\n  <\/h2>\r\n\r\n  <p style=\"margin-bottom: 14px; color: #d1d5db;\">\r\n    Ameeba is private infrastructure for communication and sensitive work built on encrypted identity instead of exposed corporate identity systems.\r\n  <\/p>\r\n\r\n  <p style=\"margin-bottom: 18px; color: #a1a1aa;\">\r\n    Passwords, credentials, confidential files, screenshots, internal discussions, sensitive AI context, and private coordination should not become exposed across ordinary communication platforms.\r\n  <\/p>\r\n\r\n  <ul style=\"list-style: none; padding-left: 0; margin-bottom: 24px; color: #e4e4e7;\">\r\n    <li style=\"margin-bottom: 8px;\">\u2022 Encrypted identity<\/li>\r\n    <li style=\"margin-bottom: 8px;\">\u2022 Private Spaces for organizations and teams<\/li>\r\n    <li style=\"margin-bottom: 8px;\">\u2022 End-to-end encrypted chat, calls, files, and notes<\/li>\r\n    <li style=\"margin-bottom: 8px;\">\u2022 Sensitive AI work and protected collaboration<\/li>\r\n    <li>\u2022 Built for information that cannot leak<\/li>\r\n  <\/ul>\r\n\r\n  <p style=\"font-style: italic; font-weight: 600; margin-bottom: 24px; color: #ffffff;\">\r\n    Our mission is to secure human work alongside AI.\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: 8px; font-weight: 500;\">\r\n      Download Ameeba\r\n    <\/a>\r\n\r\n    <a href=\"https:\/\/www.ameeba.com\/chat\" style=\"border: 1px solid #ffffff; color: #ffffff; padding: 10px 20px; text-decoration: none; border-radius: 8px; font-weight: 500;\">\r\n      Learn More\r\n    <\/a>\r\n  <\/div>\r\n<\/div><\/div>\n<p>Product | Affected Versions<\/p>\n<p>Python Pyfory | 0.12.0 &#8211; 0.12.2<br \/>\nPython Pyfury | 0.1.0 &#8211; 0.10.3<\/p>\n<p><strong>How the Exploit Works<\/strong><\/p>\n<p>The <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-42944-critical-deserialization-vulnerability-in-sap-netweaver\/\"  data-wpil-monitor-id=\"89286\">vulnerability stems from the deserialization<\/a> of untrusted data in Python&#8217;s Pyfory and Pyfury libraries. An attacker can craft a <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-49417-critical-deserialization-of-untrusted-data-vulnerability-in-woocommerce-product-multi-action-plugin\/\"  data-wpil-monitor-id=\"91454\">data stream that triggers the pickle-fallback serializer during deserialization<\/a>. The execution of `pickle.loads` is <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-55730-escaping-vulnerability-in-xwiki-remote-macros-enabling-remote-code-execution\/\"  data-wpil-monitor-id=\"89281\">vulnerable to remote code<\/a> execution, allowing the attacker to run arbitrary code on the system.<\/p>\n<p><strong>Conceptual Example Code<\/strong><\/p><div id=\"ameeb-4180574089\" 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>Here is a conceptual example of how an attacker could exploit this vulnerability. This pseudocode demonstrates the crafting of a malicious payload that triggers the pickle-fallback serializer:<\/p>\n<pre><code class=\"\" data-line=\"\">import pickle\nimport os\nclass Exploit(object):\ndef __reduce__(self):\nreturn (os.system, (&#039;your malicious command here&#039;,))\nmalicious_payload = pickle.dumps(Exploit())<\/code><\/pre>\n<p>In this example, the `Exploit` class contains a `__reduce__` method that returns a tuple. The first element of the tuple is a callable (os.system), and the second is a tuple containing the arguments for the callable. When this object is unpickled, it will <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-59458-jetbrains-junie-code-execution-vulnerability-through-improper-command-validation\/\"  data-wpil-monitor-id=\"89572\">execute `os.system(&#8216;your malicious command<\/a> here&#8217;)`.<br \/>\nThis payload could then be sent to an application using the <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-57119-privilege-escalation-vulnerability-in-online-library-management-system-v-3-0\/\"  data-wpil-monitor-id=\"89645\">vulnerable versions of the Pyfory or Pyfury libraries<\/a>. If the application deserializes the payload, it will trigger the <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-52904-command-execution-vulnerability-in-file-browser-version-2-32-0\/\"  data-wpil-monitor-id=\"92212\">execution of the malicious command<\/a>.<\/p>\n<p><strong>Mitigation Guidance<\/strong><\/p>\n<p>Users are strongly recommended to upgrade to Pyfory version 0.12.3 or later, which has removed the pickle fallback serializer and thus fixes this issue. In cases where immediate patching is not possible, employing Web Application Firewalls (WAF) or Intrusion Detection Systems (IDS) could provide temporary mitigation. However, these should not be considered as long-term solutions, as they may not fully <a href=\"https:\/\/www.ameeba.com\/blog\/cve-2025-43728-protection-mechanism-failure-vulnerability-in-dell-thinos\/\"  data-wpil-monitor-id=\"90238\">protect against exploits targeting this vulnerability<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview The vulnerability tracked as CVE-2025-61622 is a critical flaw that resides in the Pyfory library of Python, versions 0.12.0 through 0.12.2, and its predecessor Pyfury, versions from 0.1.0 through 0.10.3. This vulnerability, if exploited, could enable an attacker to execute arbitrary code on the affected system. It is of utmost importance due to its [&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-82114","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\/82114","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=82114"}],"version-history":[{"count":9,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/82114\/revisions"}],"predecessor-version":[{"id":85426,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/posts\/82114\/revisions\/85426"}],"wp:attachment":[{"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/media?parent=82114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/categories?post=82114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/tags?post=82114"},{"taxonomy":"vendor","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/vendor?post=82114"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/product?post=82114"},{"taxonomy":"attack_vector","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/attack_vector?post=82114"},{"taxonomy":"asset_type","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/asset_type?post=82114"},{"taxonomy":"severity","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/severity?post=82114"},{"taxonomy":"exploit_status","embeddable":true,"href":"https:\/\/www.ameeba.com\/blog\/wp-json\/wp\/v2\/exploit_status?post=82114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}