Skip to content

CVE-2025-53521: F5 BIG-IP APM apmd Stack Buffer Overflow Pre-Auth Remote Code Execution

Density:
HERMES

HERMES THREAT SCORE & PERIMETER GATEWAY EXPOSURE

Target: F5 BIG-IP Access Policy Manager (APM) - apmd Process
Confidence: 99%
97 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 20 / 20
Threat Activity 20 / 20
Weaponization 20 / 20
Exposure 20 / 20
Prevalence 19 / 20
Impact 20 / 20
Exploit Maturity 20 / 20
Attack Chain Potential 20 / 20
โš–๏ธ Divergence & Operational Rationale

Standard CVSS v3.1 rates this flaw at 9.8 (Critical). The Hermes Threat Score assigns an operational score of 97 (CRITICAL), reflecting active in-the-wild exploitation cataloged by CISA KEV and persistent global attack campaigns tracked by The Shadowserver Foundation in partnership with national CSIRTs. BIG-IP APM devices reside directly on external enterprise network boundaries, terminating SSL-VPN tunnels, handling single sign-on (SSO), and controlling access to internal core subnets. Because the apmd daemon executes with high OS privileges and exploitation requires zero credentials, successful attacks give adversaries immediate kernel-level and root foothold into corporate networks, enabling lateral movement and backdoor implantation.

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2025-53521: F5 BIG-IP APM apmd Stack Buffer Overflow Pre-Auth Remote Code ExecutionVULNERABILITY

Connected Nodes: 3
Active Relationships (Outgoing)
→ affectsPRODUCTF5 BIG-IP TMOS
98% VERY_HIGH

Enterprise application delivery controller, SSL VPN, and traffic management proxy operating system (TMOS).

๐Ÿ” Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in F5 BIG-IP Access Policy Manager documented in Hermes dossier.”

Supporting Verified Evidence:
→ exploitsAGENTIC ATTACK_PATTERNAAP-007: Autonomous Cascading RCE
92% VERY_HIGH

Cascading multi-stage attack chaining context injection, autonomous loop planning, and un-sandboxed execution sinks to achieve persistent root shell compromise on host machines.

๐Ÿ” Why is this related? (Evidence & Provenance)

“CVE-2025-53521 weaponizes the agentic attack pattern formalized under AAP-007.”

Supporting Verified Evidence:
Inbound Associations (Incoming)
CHAIN-2025-F5-BIGIP-EDGEEXPLOIT CHAIN → uses → [This Entity]
96% VERY_HIGH

F5 BIG-IP Access Policy Manager (APM) provides secure, identity-aware access management, SSL-VPN termination, and SAML/OAuth federation for large enterprise and government network boundaries.

ParameterTechnical SpecificationOperational Impact
CVE IdentifierCVE-2025-53521Global vulnerability tracking reference
Vendor AdvisoryK000156741F5 Security Advisory
CISA KEV StatusActive (Added 2026-03-27)Mandated federal remediation & active threat monitoring
Vulnerability ClassStack-based Buffer Overflow (CWE-121)Memory corruption leading to code execution
Vulnerable Daemon/usr/bin/apmdNative C++ access policy engine running under TMOS
Affected Branches17.1.0 - 17.1.1, 16.1.4 - 16.1.5, 15.1.10Standard APM deployments with active virtual servers
Fixed Releases17.1.1.3, 16.1.5.1, 15.1.10.4Engineering hotfixes issued by F5 Networks
Exploitation StateIn-The-Wild ExploitationBackdoors and webshells deployed on edge appliances

On F5 TMOS, traffic arriving on a virtual server with an APM profile is passed from the Traffic Management Microkernel (TMM) to userspace support daemons. The Access Policy Daemon (apmd) is responsible for state machine progression, credential validation, access session cookies (MRHSession), and endpoint posture assessment.

EXTERNAL UNTRUSTED CLIENT (Internet)
โ”‚
โ”‚ TLS Handshake + Initial Session Packet
โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Traffic Management โ”‚
โ”‚ Microkernel (TMM) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Internal IPC (mptcp / socket)
โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ apmd (Access Policy) โ”‚
โ”‚ - Session Parser โ”‚ <--- [CVE-2025-53521 Vulnerability]
โ”‚ - Stack Buffer Overwrite โ”‚ Unbounded memcpy() on stack
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Arbitrary Return Address Hijack
โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Root Execution / Shell โ”‚
โ”‚ (/bin/sh spawned) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

During session initialization, apmd processes client-supplied metadata fields within an internal framing structure. When parsing specific protocol sub-headers, the parser reads a 16-bit length parameter from the network packet without verifying that the value does not exceed the fixed stack destination buffer size:

/* Conceptual representation of vulnerable parsing routine in apmd */
void apm_process_client_session_token(const uint8_t *packet_data, size_t packet_len) {
char session_identifier_buf[256];
uint16_t token_len;
if (packet_len < 2) return;
token_len = *(uint16_t *)(packet_data);
/* VULNERABILITY: No boundary check comparing token_len against sizeof(session_identifier_buf) */
/* An attacker specifying token_len = 0x0800 overwrites 2048 bytes of the execution stack */
memcpy(session_identifier_buf, packet_data + 2, token_len);
apm_session_lookup(session_identifier_buf);
}

Because apmd runs under Linux-based TMOS with root privileges, overflowing this stack buffer enables the adversary to overwrite saved frame pointers and return addresses ($rip / $rbp on x86_64). When combined with Return-Oriented Programming (ROP) gadgets located in non-randomized shared libraries or partial address overwrites, execution is redirected into payload staging routines.


Threat actors observed by The Shadowserver Foundation and national cybersecurity authorities execute a multi-phase weaponization chain:

sequenceDiagram
autonumber
participant Attacker as Adversary (Internet)
participant VIP as F5 Virtual Server (TMM)
participant Daemon as apmd Access Daemon
participant Host as TMOS Linux Underlay
Attacker->>VIP: TLS handshake on TCP/443 (APM VIP)
Attacker->>VIP: Send crafted access policy request with oversized token
VIP->>Daemon: Forward session setup payload via IPC
Daemon->>Daemon: Trigger stack overflow in apm_process_client_session_token
Daemon->>Host: Hijack instruction pointer, execute shellcode as root
Host-->>Attacker: Spawn reverse TCP/TLS shell to C2
Attacker->>Host: Deploy persistent webshell under /var/netstorage/
  1. Reconnaissance & Identification: Attackers scan for exposed HTTP/HTTPS virtual servers responding with BIG-IP APM session cookies (MRHSession or /my.policy URI redirects).
  2. Pre-Authentication Trigger: An HTTP POST or raw protocol packet containing the oversized session token is delivered to the APM endpoint. No valid user credentials or pre-existing sessions are required.
  3. Payload Staging & Shell Spawn: The exploit overflows the stack in apmd, pivots the stack pointer, and executes a syscall sequence invoking /bin/sh or downloading an in-memory binary payload.
  4. Post-Exploitation & Persistence: Threat actors drop persistent backdoors into web directories such as /var/netstorage/ or /shared/ and access the local tmsh shell to extract administrative credentials, SSL private keys, and session secrets.

title: F5 BIG-IP apmd Crash Loop or Unexpected Child Process Spawn
id: a8c2b510-410e-4a61-9c84-f55352100001
status: experimental
description: Detects unusual child processes spawned by the F5 BIG-IP apmd daemon or segmentation faults indicating CVE-2025-53521 exploitation.
references:
- https://my.f5.com/manage/s/article/K000156741
- https://dashboard.shadowserver.org/
author: Hermes Codex Cyber Intelligence
date: 2026-09-29
logsource:
product: linux
service: syslog
detection:
selection_crash:
message|contains:
- "apmd"
- "segfault"
- "general protection fault"
selection_spawn:
parent_process|endswith: "/apmd"
process_path|endswith:
- "/bin/sh"
- "/bin/bash"
- "/usr/bin/curl"
- "/usr/bin/python"
condition: selection_crash or selection_spawn
falsepositives:
- Software upgrade crash transients
level: critical
tags:
- attack.initial_access
- attack.t1190
- attack.execution
- attack.t1059

  1. Apply Official Engineering Hotfix: Upgrade affected BIG-IP systems to patched TMOS maintenance releases immediately:

    • 17.1.x: Upgrade to 17.1.1.3 or later.
    • 16.1.x: Upgrade to 16.1.5.1 or later.
    • 15.1.x: Upgrade to 15.1.10.4 or later.
  2. Isolate Virtual Servers with APM Profiles: If hotfix installation cannot be performed immediately, restrict network access to virtual servers hosting APM access policies using upstream network firewall access lists (ACLs) or perimeter filtering rules.

  3. Revoke and Rotate Compromised Credentials: If forensic indicators confirm an apmd core dump or unexpected child process execution:

    • Re-key all SSL/TLS certificates and private keys hosted on the compromised appliance.
    • Invalidate all Active Directory, RADIUS, or LDAP service account passwords utilized by APM authentication profiles.
    • Rotate BIG-IP administrative passwords and revoke active session tokens.