AnyPwn Heap Overflow in AnyDesk for Linux Gives Root RCE, PoC Public

A public proof of concept for AnyPwn, a heap overflow in AnyDesk for Linux 8.0.2, gives remote root code execution before the user approves a session.
Table of Contents
    Add a header to begin generating the table of contents

    A proof-of-concept exploit for a heap buffer overflow in AnyDesk for Linux, dubbed AnyPwn, was published on October 12 and gives an attacker code execution with root privileges before the user approves any desktop control request. The flaw affects AnyDesk for Linux 8.0.2 on x86_64. Windows and macOS builds are not affected.

    AnyPwn Allows Root Code Execution Before Session Approval

    The vulnerability lets a remote, unauthenticated attacker compromise an exposed AnyDesk Linux host with root privileges. The key detail is timing: the exploit runs before the person at the machine has accepted or declined a connection, so the normal approval prompt offers no protection.

    The source material available at publication did not include a CVE identifier or a CVSS score for AnyPwn. The PoC was published on GitHub by Rick de Jager of the V12 security team.

    The Mode-5 Stream Packet Handler and the 0xfffffff0 Length Value

    The overflow sits in the mode-5 stream packet handler of AnyDesk’s session protocol. The handler trusts a payload length supplied remotely and does not validate it. A length of 0xfffffff0 truncates to 0 in 32-bit arithmetic, so the allocated buffer is far smaller than the data the handler then processes, producing a heap buffer overflow.

    Port 7070, Allocator Grooming and ROP

    Exploitation works through direct TCP connections to port 7070. The published technique combines allocator grooming, which shapes the heap layout, with return-oriented programming to turn the overflow into code execution as root.

    Exploitation Is Probabilistic and Limited to Direct TCP

    The exploit does not succeed every time. According to the disclosure, success is probabilistic, and failed attempts can crash the AnyDesk service. That behavior could leave a visible trace on a targeted host.

    The PoC covers direct TCP connections only. Whether relay-based exploitation, in which traffic passes through AnyDesk infrastructure rather than reaching the host directly, is possible has not been confirmed. Hosts that accept direct connections on port 7070 are the ones the published code addresses.

    Fix: AnyDesk 8.0.3 or Later, or Block Port 7070

    The remediation is to upgrade to AnyDesk 8.0.3 or later. Where an upgrade is not immediately possible, the disclosure lists restricting TCP port 7070 as the alternative. Closing that port removes the direct-connection path the PoC uses.

    Exposure of Linux Hosts Running AnyDesk 8.0.2

    The practical exposure covers Linux systems running version 8.0.2 that are reachable over the network on port 7070. A successful exploit yields root, the highest privilege level on the system, so a compromised host could be used to read data, change configuration or install further tools. The disclosure describes the impact as remote unauthenticated root compromise of exposed AnyDesk Linux hosts.

    Remote-access software is a recurring target because it is built to give someone control of a machine from elsewhere. AnyPwn differs from a credential-theft attack in that it bypasses the approval step entirely rather than tricking a user into granting access.

    The release of working exploit code on the day of disclosure shortens the window between public awareness and possible attacks, since the techniques the PoC relies on, including the length-truncation trigger and the heap grooming approach, are now documented in public.

    What the AnyPwn Disclosure Does and Does Not Establish

    The disclosure names one affected build: AnyDesk for Linux 8.0.2 on x86_64. Windows and macOS clients are listed as unaffected. The published code was written and released by Rick de Jager of the V12 security team, and the write-up describes the bug at the level of the protocol: a stream packet handler in mode 5 that accepts a length field from the remote side and acts on it.

    Several points remain open. No CVE identifier has been assigned in the source material, so the flaw is tracked by the AnyPwn name. No severity score is attached. The disclosure does not say whether the vendor was notified before the code appeared, and it does not report any attacks against real systems.

    What it does report is the failure mode. Because success is probabilistic, a scan or exploitation attempt against a host may crash the AnyDesk service instead of delivering code execution, and a crash is the visible sign of a failed try. Hosts that have the service exposed on TCP port 7070 are the ones within reach of the published technique.

    Related Posts