Meet Constantine – Find Mythos-level vulnerabilities in your code. It proves them, patches them, PRs them back. Autonomously.

Understanding the Root Cause of CVE‑2026‑119618

Investigating CVE‑2026‑119618

Recently, Apache released an advisory for CVE-2026-119618, an improper synchronization vulnerability in mod_http2 that causes heap corruption and, according to Apache, can lead to remote code execution. As soon as it was disclosed, we began analyzing the vulnerability to better understand the root cause and to build scanners and detections to identify vulnerable Apache hosts within the Guard platform. While we haven’t gotten a working remote code execution exploit yet, we feel we have a fairly solid understanding of the root cause and wanted to share our analysis with the broader security community, as we are not aware of any detailed public breakdown of the vulnerability so far.

Our monitoring systems also picked up several repositories claiming to have exploits for the vulnerability. These repositories often receive very little quality assurance before release, and in one case, a repository claiming a working exploit turned out to have been generated by an agent that simply exposed a CGI script on the Apache server, allowing arbitrary shell commands to be run through a header with nothing to do with the actual vulnerability.

Our goal in this article is to share the results of our initial analysis, discuss the Apache internals relevant to understanding how the vulnerability works, cover the temporal debugging setup we used, and walk through an example crash triggered within an Apache worker when reproducing the vulnerability. Our analysis focuses on the source code of Apache HTTPD version 2.4.70.

Digging into the Root Cause of the Vulnerability

For a rather complex usermode memory corruption vulnerability, the root cause and fix are fairly simple with each requiring only a single-line of code change to address the issue. If we examine the diff responsible for fixing the vulnerability we observe the following change made to the h2_request.c source file:

If we dig more into the relevant code, we see that the change was made within the assign_headers function which runs within a mod_http2 worker thread when it is processing an HTTP2 request as shown in the image below.

The root cause of the issue comes from modifying the req->headers table from a mod_http2 worker thread. For a non-CONNECT request whose HEADERS carry END_STREAM, if the request has Content-Type but no Content-Length, Apache inserts a Content-Length header with value zero into req->headers before processing it.

The issue arises when apr_table_setn is invoked on req->headers to add Content-Length. If the table’s backing array is full (nelts == nalloc), the insertion doubles that array’s current capacity and requests a new backing allocation.

The table growth alone is not enough: its apr_palloc must exhaust usable space in the stream pool’s nodes and reach the shared, mutex-free apr_allocator_t. A concurrent c1-side allocation or free through that same allocator can corrupt its free-list state or cause one memnode to be issued to multiple pools. Later destruction of either pool can return the node while the other pool still has live objects, producing use-after-free behavior and further corruption.

The core issue is that req->headers is allocated from the stream pool, which inherits the mutex-free allocator used by the c1 connection/session and its stream pools. c1 owns HTTP/2 network and stream lifecycle work, while c2 workers normally process requests using private allocators.

If an attacker sends another request to the server while assign_headers executes, c1-side stream work can access the same allocator that the c2 worker incorrectly reaches through req->headers. A race in that allocator’s free-list operations can leave two different pools owning the same memnode.

The allocation in assign_headers begins when apr_table_setn inserts a new header into a full table and therefore grows its backing array. To reach the vulnerable shared-allocator operation, that new backing allocation must also exceed the space available from the stream pool’s existing nodes. We will delve into the source code of apr_table_setn in the subsequent section.

The process that triggers the race condition is shown in the diagram below:

Digging Into the Table Resize Operation

Apache Portable Runtime (APR) provides a table implementation within apr_tables.c which is used by HTTPD for representing and requesting headers within an HTTP request. The primary structure used to represent the table is the apr_table_t structure which contains an apr_array_header_t structure. The definition of apr_table_t is shown below:

If we dig into apr_array_header_t, we see that it records the number of active elements, the allocated capacity, the size of each element, the owning pool, and a pointer to the backing array of apr_table_entry_t structures, each representing a single header field. The image given below shows the apr_array_header_t structure definition:

Each entry is an apr_table_entry_t structure containing a key, value, and checksum. The key is the header name, the value is the header value, and the checksum lets APR reject nonmatching keys before calling strcasecmp during a lookup. Below is an image showing the definition of the apr_table_entry_t structure:

Now that we understand the core structures used to represent the request headers structure, we can start digging into how the apr_table_setn function can result in a new heap allocation being triggered. The image below shows the first part of the apr_table_setn function.

When a key is set, APR selects one of 32 index buckets from the first byte of the header name and separately computes a case-insensitive checksum from the first four bytes of that name. The table is not partitioned into regions; index_first and index_last merely bound the range that may contain entries colliding in that bucket.

The code then starts iterating over the existing elements in the array and checking if an existing header in the table with the same name already exists. In the case of assign_headers it would be checking if “Content-Length” already exists in the table.

The more interesting case though is when an entry doesn’t exist in the table. In this case, we hit the add_new_elt (“add new element”) case. In this scenario, the table_push function is called to add a new entry to the table:

Internally, the table_push function is an alias to the do_table_push function which wraps the apr_array_push_noclear function:

Examining apr_array_push_noclear, we see that when the backing array is full the function doubles its capacity, allocates a new backing store from the table’s pool, and copies the old entries into it. It then updates arr->elts to the new store and returns a pointer to the newly added entry. This is not realloc: the old allocation remains part of the pool until that pool is cleared or destroyed.

This creates the 3,840-byte apr_palloc request in the proven 80-to-160-entry geometry. If the pool cannot satisfy it from existing nodes, apr_palloc reaches the pool’s allocator, which has no mutex and is unsafe when c1 concurrently manipulates that same allocator.

Revisiting the original diff that we examined at the beginning of the article the fix is rather straightforward. Instead of modifying the req->headers table which is shared with the worker thread handling the TCP connection with the client, the code is changed to instead modify the r->headers_in table which is local to the thread itself and doesn’t share an allocator with another thread like req->headers does.

However, there are some nuances with the vulnerability that require deeper analysis and an understanding of how two of the primary allocators in Apache work: the pool allocator and what we refer to as the allocator allocator.

The Hierarchy of Apache Memory Allocators

Before digging into the internals of the allocators themselves, it helps to take a step back and look at how memory management is structured within Apache. Rather than calling malloc and free directly, Apache relies on APR for its memory management. APR implements a multi-level custom allocator where each layer is built on top of the layer below it.

At the bottom of the hierarchy is the baseline allocator represented by the apr_allocator_t structure, which we will refer to as the allocator allocator throughout this article. The allocator allocator doesn’t hand out memory to callers directly. Instead, it is responsible for allocating large blocks of memory called memnodes and maintaining a cache of previously freed memnodes that can be reused for future allocations.

Sitting on top of the allocator allocator are the higher-level allocators that the rest of Apache actually interacts with, such as the pool allocator and the bucket allocator. Both of these request memnodes from the allocator allocator and then carve them up into smaller allocations for their callers. The pool allocator is used for the majority of allocations within Apache, including structures associated with connections and requests like the req->headers table we examined earlier. We won’t be talking about the bucket allocator here as it’s not relevant to this writeup. The following sections focus on the pool allocator and the allocator allocator.

Understanding the Pool Allocator

The pool allocator functions as a bump allocator. A bump allocator is an extremely fast type of allocator where allocations are satisfied by simply allocating a linear set of memory with a pointer tracking the end of the memory block.

Whenever a new memory allocation request is submitted a check is performed to see if the currently allocated block of memory has enough space left at the end of it to satisfy the allocation. If space is present, the allocator will simply increment its pointer to cordon off that block of memory for usage by the application.

Bump allocators work well for applications like Apache where the application needs to read and parse structures associated with an HTTP request, but then once the request is processed all the memory associated with that request can be safely freed and cleaned up.

In other words, if your application allocates a lot of memory that is then read and processed and then all that memory needs to be freed simultaneously after processing, a bump allocator will serve you incredibly well. To understand how the pool allocator works, we will begin by analyzing the core structures used by the pool allocator and then we will dig into the core code used by the pool allocator.

Understanding the Core Pool Allocator Structures

The memnode is the basic building block used by both the allocator allocator and the pool allocator. A memnode is represented by an apr_memnode_t structure defined in the apr_allocator.h source file shown below:

The pool allocator is represented by an opaque structure apr_pool_t defined in apr_pools.c. The apr_pool_t structure tracks the currently active memnode in the pool using a pointer to an apr_memnode_t structure among other things.

Tracking an Allocation Request Through the Chain

When a caller requests memory from the pool allocator they call apr_palloc which handles the allocation requests. The first check performed by the allocator is checking the available space left on the currently active memnode by using the node_free_space macro. If there is active space on the currently active memnode, the code jumps to the have_mem condition.

The node_free_space macro calculates remaining space as endp minus first_avail:

The core allocation path gets a bit more complex if the happy path condition doesn’t succeed. The pool allocator functions by allocating from the currently active memnode for as long as possible until it’s unable to satisfy an allocation request.

However, if an allocation request hits the allocator that exceeds the currently available space it needs to check the list of available memnodes to determine if any other active memnodes within the pool are able to satisfy the request.

The allocator maintains a sorted list of memnodes such that active->next is always the memnode in the pool with the most available freespace. This makes things very efficient on the allocation path as it simply needs to check if the size of active->next is sufficient to satisfy the allocation. If this fails, the allocator knows that none of the other active memnodes within the pool can satisfy the allocation request.

If the pool allocator cannot satisfy the request using any of the available memnodes it hits the else if condition and makes a call to allocator_alloc to allocate a new memnode from the allocator allocator.

The image given below shows the core logic discussed in the preceding paragraphs:

Once a memnode is obtained to satisfy the allocation request the first_avail pointer is saved to return that memory to the caller and the node->first_avail pointer is incremented to mark that space as allocated within the memnode.

Finally, the active list is updated to ensure that it remains sorted in descending order by size. This is done using the logic on lines eight-hundred and fifty-five through lines eight-hundred and seventy-three within the apr_palloc function. The image given below shows the book-keeping work being done by the allocator and finally the allocated memory pointer being returned to the caller:

Understanding the Allocator Allocator

The allocator allocator is used by the bucket allocator and the pool allocator to allocate new memnodes for usage within the allocator itself. The allocator has a cache of previously freed memnodes it uses by default to satisfy allocation requests. If the allocator cannot satisfy the allocation request it defaults to use libc’s malloc under default conditions to allocate additional memnodes based on the size requested by the caller. The core structure used by the allocator is the apr_allocator_t structure. The primary usage of the structure is to perform tracking of the available cached freed memnodes indexed by size.

We begin our analysis with the allocator_alloc function which takes a requested allocation size alongside a reference to the allocator structure associated with the allocator being used for the allocation. Our analysis indicates that there isn’t a single global allocator object used across the board for allocations.

The function starts by rounding the request allocation size up to the nearest multiple of 4096 with a minimum baseline allocation size of 8192 bytes. An index is then computed based on the allocation size. For example, an index size of 8192 bytes is computed as index one and a size of 12,288 bytes is computed as index two, up to a default maximum index size of 81,920 at index nineteen.

The happy path for an allocation involves a scenario where the allocator is able to serve an existing allocation from one of the existing indexes. It starts by checking if there are any cached free nodes available that are greater than or equal to the requested bin size. If an existing cached memnode is available the allocator reuses that memnode for the allocation.

If this lookup fails, the allocator falls out to the else if statement checking if any cached free memnodes exist within the free[0] list. The free[0] is used to store memnodes larger than 82kb that are available for allocation. If the allocator can satisfy an allocation from this list it jumps to the have_node code block.

Assuming this fails and no cached free[0] list entries are available that satisfy the allocation size the allocator falls back to calling libc’s malloc by default to satisfy the allocation request. However, depending on the build configuration it may use mmap instead.

What are the Security Implications?

At this point, we have walked through the relevant source code, identified the root cause, and discussed the relevant allocator internals. We can make c1-side allocator work overlap the c2 worker’s vulnerable allocation. When both paths manipulate the same mutex-free apr_allocator_t, its free-list state can become corrupted and one memnode can be handed to multiple pools.

The most obvious implication is memory corruption. HPACK lets the attacker reconstruct a large decoded header set with a small wire representation, increasing the request rate, but it does not open streams or carry END_STREAM. A HEADERS frame opens a new stream, while END_STREAM on the trigger stream’s HEADERS marks the request as bodyless. Co-batching a bodyless Content-Type/no-Content-Length trigger with a victim-stream HEADERS can make the assign_headers table growth race victim apr_pool_t and h2_stream allocation. Depending on ordering, the table-growth copy can overwrite those structures or they can overwrite the table’s backing entries.

It’s also possible for a second-order use-after-free to occur. Once either aliased stream pool is destroyed, the shared memnode can be returned to the allocator even though the other stream still has live objects in it. Our team has been working toward exploitation: on a source-matched 2.4.70 build, we demonstrated a remote pointer disclosure and recovered libapr’s randomized base address, along with heap pointers. We are still working on a full exploit chain.

Building a Temporal Debugging Environment

One of the bigger difficulties with this vulnerability was just finding a way to properly instrument and debug it. Originally, we tried debugging the vulnerability using eBPF tracing with uprobes and automation that would trigger a SIGSTOP under certain conditions. This worked great for general tracing and debugging, but fell extremely short when it came to analyzing the crashes associated with the bug.

Many people think that during vulnerability research the biggest challenge is finding a way to exploit the vulnerability, but especially with bugs like this, a race condition in a custom usermode heap allocator, the most complex part is often building the instrumentation and debugging infrastructure to understand what is going on when the vulnerability triggers, and then finding a way to trigger that state reliably for exploitation purposes.

Debugging with the Record and Replay Debugger

The biggest breakthrough from a debugging perspective was configuring our agents and setting up an environment in GCP where they had access to VMs with hardware compatible with the rr (record and replay) debugger, originally developed at Mozilla. Since rr only runs one thread at a time while recording, we leveraged rr’s chaos mode, which randomizes thread scheduling during recording to make race conditions like this one much more likely to trigger under the debugger. One of the bigger insights from this process was that when debugging complex vulnerabilities, setting breakpoints on code is often much less useful than setting watchpoints on data.

The beautiful thing about temporal debugging is that it allows you to trace reads and writes to data both forwards and backwards in time. With complex race condition issues there is often a large gap between when the data is corrupted, such as a corrupted allocator freelist, and what ultimately causes the crash. By leveraging temporal debugging, we can work backwards in time from the site of the crash and pause and see the exact program state at each stage in the process.

Integrating Temporal Debugging Into Agentic Exploitation Workflows

This setup was incredibly powerful when used alongside our agents, such as GPT-5.6-Cyber through OpenAI’s Daybreak Red program. An important part of the exploit development process has been making sure the agents have access to the correct tools. A capable model with only basic tracing and a standard debugger will struggle with a bug like this one, but the same model with access to rr can replay the crash and work backwards through the program state just like a human researcher would.

For example, in the following screenshot, the model used rr to trace every reuse of the freed memnode after the race triggered, until the process eventually crashed in apr_pool_destroy() due to corrupted state. In this case, we were aggressively attempting to retrigger the race across multiple streams on the same TCP connection, and showed that the same physical memnode was reused eight times while a live apr_pool_t and h2_stream still pointed into that memory. It would have been extremely difficult to get this same level of detail on memory and node usage with traditional debugging methods.

Analyzing a Crash Using Temporal Debugging

In this section, we will walk through an example of how temporal debugging can be used to better understand a complex crash condition. In our lab environment, we wrote a basic script to trigger the race condition under httpd running under rr with chaos mode enabled. Ultimately, a segmentation fault was triggered within the strlen function in libc due to an invalid pointer being passed to strlen.

If we examine the stack trace we observe that the crash was related to reading the header fields associated with our request from the headers table. In this scenario, we were racing the creation of a new connection stream with the table resize operation. The race succeeded and both threads received the same underlying memory node.

The assign_headers operation completed first and then the resized headers elements table was overwritten by the other thread with an apr_pool_t and h2_stream structure. This caused corruption of the headers elements table and a crash when it was subsequently read by the HTTP/2 Server Push code which later processed the corrupted request header elements.

We confirm our suspicion by examining req->headers->a.elts and determining that the corrupted values came from an h2_stream structure written over the header-elements array, as shown below:

If we go back in time we can see that the 0x5e1974086258 pointer was allocated within the assign_headers function during the race when the req->headers table was being resized in apr_table_setn.

If we return to the strlen segmentation fault and examine the request memory, we see that req->headers->a.elts points to 0x5e1974086258 and belongs to req->headers->a.pool at 0x5e19741761b8.

At the same time, the memory at 0x5e1974086258 itself also contains a valid apr_pool_t structure which within itself also references 0x5e1974086230. This provides evidence that at the time of crash two live pools both shared the same memnode within their respective active lists and provides further evidence of the race condition triggering as expected.

Being able to trace backwards and forwards in time within an active debugging session has been invaluable to understanding the vulnerability. In this case, the crash itself happened in the HTTP/2 Server Push code, well after the race had already corrupted req->headers. For many race condition bugs, especially those involving internal allocator corruption, it’s often hard to correlate a crash back to the exact request or thread involved in the data race. Being able to step backwards from the crash to the write that corrupted the memory lets you see exactly which thread and request were responsible.

Lessons Learned from Agentic Vulnerability Research

There is a lot more we learned about this vulnerability that we haven’t yet included in this article. The purpose of this article was just to provide some more background context on this vulnerability and the relevant Apache internals, and to delve into some of the debugging techniques that we’ve found useful when analyzing this vulnerability. Our team has been working towards a full remote code execution chain, and while we haven’t gotten one working yet, we continue to improve our understanding of the vulnerability every day.

The hardest part of this vulnerability wasn’t the bug itself, but setting up a proper debugging environment to analyze and trigger it reliably. The root cause can be explained with a single-line diff, but understanding what actually happens when two threads walk away with the same memnode required being able to record the race, replay it, and work backwards from the crash to the moment the memory was corrupted. The key to agentic vulnerability research isn’t just the model that you are using, but constructing an environment and tooling that the agents can leverage in order to be successful.

About the Authors

Adam Crosser

Adam Crosser

Adam is an operator on the red team at Praetorian. He is currently focused on conducting red team operations and capabilities development.

Catch the Latest

Catch our latest exploits, news, articles, and events.

Ready to Discuss Your Next Continuous Threat Exposure Management Initiative?

Praetorian’s Offense Security Experts are Ready to Answer Your Questions