Vulnerability Analysis

Veeam Backup CVE-2024-40711 Unauth RCE Walkthrough

CVE-2024-40711 is a critical unauth RCE in Veeam Backup & Replication. Deserialization flaw, exploit chain, and ransomware operator abuse.

Shadab Khan
Security Engineer
7 min read

Veeam Backup & Replication CVE-2024-40711 is a CVSS 9.8 unauthenticated remote code execution vulnerability disclosed on September 4, 2024. Veeam credited Code White GmbH's Florian Hauser with the discovery. Within weeks, Akira and Fog ransomware affiliates were using it as an initial access vector, and Sophos reported that by mid-October 2024 roughly 20 percent of Veeam-related incidents they responded to involved this CVE. Backup servers are the worst possible place for an unauthenticated RCE because they hold credentials to everything.

What is the technical root cause of CVE-2024-40711?

The technical root cause of CVE-2024-40711 is an insecure .NET deserialization flaw in the Veeam Backup & Replication server component that processes remote management calls over TCP port 9401. Veeam uses a custom binary protocol for communication between the backup server, proxies, and the management console. One of the message types accepts a serialized .NET object graph that the server deserializes into a BinaryFormatter or equivalent before dispatch. There is no authentication check before deserialization, and the gadget chain available in the server's classpath allows remote code execution.

Code White found the bug through a focused audit of the message-dispatch path and demonstrated RCE with a gadget chain built from common .NET types. Veeam's patch replaced the unchecked deserialization with a typed object contract that rejects unexpected payloads, and the September 4 update also added authentication to several message handlers that previously accepted anonymous requests.

How does the exploit chain produce code execution?

The exploit chain produces code execution by connecting to the Veeam server on its management port and sending a crafted serialized payload that triggers a gadget chain during deserialization. A typical flow:

  1. Attacker scans for port 9401 exposed to the internet or reachable inside the environment
  2. Attacker crafts a serialized .NET object using a gadget chain such as one of the TypeConfuseDelegate or ObjectDataProvider variants from ysoserial.net
  3. The Veeam server receives the payload, deserializes it without type restriction, and the gadget chain invokes Process.Start with attacker-controlled arguments
  4. The command runs as the Veeam service account, which is typically a domain user with broad rights to backup repositories and often to domain resources

Public proof-of-concept code appeared within days of disclosure, and the ransomware affiliates adapted it to drop their loader directly. Akira affiliates observed by Sophos used the Veeam foothold to pull credential stores from backup repositories (Veeam stores recovery credentials for connected hypervisors and domain accounts) and then pivot to the hypervisor layer to encrypt VMs directly. Fog affiliates preferred to deploy Rclone for data exfiltration before encryption.

Why are backup servers such high-value initial-access targets?

Backup servers are high-value targets because they aggregate credentials and have privileged access to production systems by design. Veeam Backup & Replication stores:

  • Credentials for every hypervisor it backs up (vCenter, Hyper-V, Proxmox)
  • Domain service accounts used for guest OS processing
  • Cloud-storage access keys for offsite repositories
  • SAN and NAS credentials for repository mounts

An attacker who controls the backup server can impersonate any of those accounts, and the server is allow-listed through firewalls to reach nearly every critical system. Encrypting or destroying backups before encrypting production is the ransomware playbook since 2019, and unauthenticated RCE on the backup server skips several lateral-movement steps.

Veeam servers are also under-monitored compared to domain controllers and web servers. Many organizations run them as appliance-style Windows hosts inside the management VLAN with minimal EDR instrumentation. That combination of high privilege and low visibility is exactly the profile ransomware operators look for.

Which versions are affected and how do you inventory exposure?

Versions of Veeam Backup & Replication 12.1.2.172 and earlier are affected, with the patched version being 12.2 (12.2.0.334). All supported 11 and 12 branches prior to the September 2024 patch are exposed. Inventory needs to go beyond the obvious backup server because Veeam ships a mesh of components that each run on separate hosts:

  • Backup server (the service hosting the vulnerable deserialization)
  • Backup proxies (agents that read data from source systems)
  • Repository servers (storage endpoints)
  • WAN accelerators and tape servers
  • Enterprise Manager and Cloud Connect

The primary CVE targets the backup server, but a full patching cycle needs to refresh the whole mesh because protocol compatibility is enforced, and running mixed versions can silently disable services.

Exposure to inventory:

  • Any host with Veeam Backup & Replication Service running
  • Any TCP listener on port 9401 inside the environment
  • Any Veeam Cloud Connect tenant exposed to the internet
  • Third-party backup providers who operate Veeam on your behalf in managed service arrangements

Managed service providers were disproportionately hit in late 2024 because their multi-tenant Veeam deployments frequently had port 9401 reachable across customer VLANs.

What detection and containment works for active exploitation?

Detection works best at the network and process lineage layers. Network detection signatures:

  • Any TCP connection to port 9401 from outside the known Veeam management network
  • Sudden spike in 9401 connections from unusual internal source IPs
  • Network sensors that can parse the Veeam protocol (some Suricata and Zeek signatures were published by researchers in September 2024)

Process lineage detection:

  • Veeam.Backup.Service.exe spawning cmd.exe, powershell.exe, rundll32.exe, or any LOLBin
  • Veeam.Backup.Service.exe writing executables or scripts to user-writable paths
  • The Veeam service account authenticating from the backup server to endpoints outside its normal backup schedule

Containment during active exploitation:

  1. Firewall port 9401 to a narrow management allowlist
  2. Isolate the backup server from production VLANs at the network layer
  3. Rotate every credential stored in the Veeam credential vault
  4. Rebuild the backup server from known-good media before reconnecting

Credential rotation is the step most teams skip because it is disruptive, but it is non-optional. If an attacker reached the credential vault, every account in it is compromised and must be treated as such.

What does the remediation and hardening plan look like?

The remediation plan is patch, isolate, and rotate. Patch to Veeam Backup & Replication 12.2 or later across the entire mesh. Isolate the backup infrastructure into a dedicated management VLAN with port 9401 restricted to allow-listed hosts. Rotate all credentials stored in Veeam and migrate to gMSA or Managed Service Accounts where supported, so future compromises cannot trivially extract reusable credentials.

Hardening that pays dividends beyond this specific CVE:

  • Enable MFA on Veeam Enterprise Manager and the restore console
  • Deploy Veeam's immutable backup features (hardened repository, object-lock on S3 targets)
  • Monitor backup-job log anomalies through SIEM integration
  • Require admin workstation access for any console login through a PAM tool

Shops that had immutable backups and segmented management planes survived the Akira and Fog campaigns with downtime but no ransom paid. Shops with neither paid ransoms measured in the millions.

How Safeguard.sh Helps

Safeguard.sh inventories every Veeam component across your estate through 100-level dependency scanning and binary analysis, surfacing backup servers, proxies, and repository hosts regardless of how they were originally deployed. Reachability analysis cuts 60 to 80 percent of findings by confirming which deployments actually expose port 9401 to reachable networks, so patch priority goes to genuinely exposed instances first. Griffin AI autonomously proposes network segmentation policy and generates patch orchestration plans for the full Veeam mesh, while container self-healing rebuilds containerized management consoles against patched bases. SBOM generation and ingest capture the mixed-version reality of Veeam deployments, and the TPRM workflow surfaces managed service providers whose Veeam infrastructure affects your risk.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.