A Bucket Full of Dreams

pamoutaf

•

Linux Has Screensharing RCEs Too!!



An analysis of CVE-2026-119618

There’s been an influx in critical web vulnerabilities surfacing recently (php2shell, react2shell, many_others_2shell) and we figured we’d check out what the real-world impact of one of the many critical web vulnerabilities is for defenders.

CVE-2026-119618, a web-server vulnerability found in mod_http2 discovered by Anthropic’s OSS Scanner and Anthony Weems & Simon Scannell of Google Cloud Vulnerability Research, was rated critical by Apache and scored as a 9.8 by Red Hat - we also haven’t seen any public pocs or technical write-ups on this, so it seemed like a perfect case study to dig into!

In this post we do a technical deep-dive into how we exploited the vulnerability in our lab setup as well as discussing what post-exploitation and real-world impact looks like.

TL;DR

When an HTTP/2 request is processed, assign_headers() from mod_http2 modifies a header table that lives in stream pool, a per-stream child pool created by the connection thread (c1). The problem is that this modification happens from a different worker thread, the one serving the HTTP/2 stream (c2). That modification can make the table grow, which then allocates from the same allocator that c1 is using at that same moment. So one thread (c2) is reaching into memory that belongs to another thread's pool (c1).

The APR allocator hands out memory in nodes and keeps freed nodes on a free-list so it can hand them back out later. c1 and c2 share that allocator, so under certain conditions, they can grab the same free node off the list at the same instant.

Now one chunk of memory has two owners that both think it's theirs. One of those two owners ends up being an apr_bucket, a small struct APR uses to pass request and response data around, and the other is our attacker bytes in the request headers. So essentially, the bytes we send land inside a live bucket.

If we can overwrite another structure's function pointer with a pointer to our bytes, we can call any function we want, as long as we know where it is. For that, we first need to beat ASLR.

For the ASLR part we used HTTP's TRACE method as it reflects the request back in the response body, so the same bug can leak heap pointers. From those we can work out the base of libc, and from there the address of system.

When building the command, we need to keep in mind that mod_http2 camel-cases every header name (it uppercases the first byte), so a bare id would arrive as Id and fail. Instead we will write the command as the header name k0000000001|id so when it reaches system() as K0000000001|id, the |id executes and prints:

uid=1(daemon)
uid=1(daemon)
uid=1(daemon)

We will also cover why we add so much 0 padding as well.

Quick lab set-up

  • Apache httpd 2.4.69, stock config except the two relaxed settings below + debug -O0 build

  • HTTP2 is switched on

  • TraceEnable On

  • LimitRequestFields is stock at 100 but we raised it to 3000 for speed purposes

  • MPM fattened to 32 processes x 16 threads, raised for speed purposes

  • Separately networked attacker and target

How the server is laid out

A web server handles many HTTP/2 requests (streams) over one TCP connection. The primary connection is c1. Each stream gets served by a worker thread with its own secondary connection, c2. Those workers come from mod_http2's H2 worker pool (sized by H2MaxWorkers), a fixed set of threads. Whenever a worker is free, it will grab the next stream and process it, so lots of c2 streams can run concurrently against the single c1.

                        ┌──  worker ──►  c2   (stream 1)
     client ──► c1 ─────┼──  worker ──►  c2   (stream 2)    all running
     1 TCP conn         ├──  worker ──►  c2   (stream 3)    at the same
     (primary)          └──  worker ──►  c2   (stream 4)    time
                        └─ H2 worker pool ─┘
                        ┌──  worker ──►  c2   (stream 1)
     client ──► c1 ─────┼──  worker ──►  c2   (stream 2)    all running
     1 TCP conn         ├──  worker ──►  c2   (stream 3)    at the same
     (primary)          └──  worker ──►  c2   (stream 4)    time
                        └─ H2 worker pool ─┘
                        ┌──  worker ──►  c2   (stream 1)
     client ──► c1 ─────┼──  worker ──►  c2   (stream 2)    all running
     1 TCP conn         ├──  worker ──►  c2   (stream 3)    at the same
     (primary)          └──  worker ──►  c2   (stream 4)    time
                        └─ H2 worker pool ─┘

APR manages memory in pools. Each pool takes chunks from an allocator, in units called memnodes. The c2 stream pools are children of the c1 session pool, and they share c1's allocator. Even if there is mutex locks (explained further in the blogpost), they don't work here and the entire thing rests on the assumption that a pool is only ever touched by one thread at a time. assign_headers() show us that we shouldn't assume...

The bug

When a webserver receives an HTTP/2 request (stream), mod_http2 decodes its headers and stores them in its own object, the h2_request (that's req->headers), so something like Host: example.com now lives there. Because Apache doesn't understand HTTP/2, it processes every request through a generic object, a request_rec that they call r, with headers in r->headers_in.
assign_headers() is the step that copies the stream's headers from req->headers into r->headers_in so the normal request processing can take over.

For a request with no body (with a content type but no length), it pushes a Content-Length: 0 into the request's header table. That table, req->headers, was created on the c1 side (the stream pool, which is a child of the c1 session pool). Every entry you add fills a slot, and when the slots run out, the array has to grow.

That table is just an array of fixed-size slots, one per header. When APR creates it, it reserves room for a set number of slots. req->headers starts with room for 10 slots (headers).

The table's backing array is an array of apr_table_entry_t structs. One apr_table_entry_t is 24 bytes and looks like this:

struct apr_table_entry_t {
      char *key;                   // 8 bytes  -> pointer to the header name
      char *val;                   // 8 bytes  -> pointer to the header value
      apr_uint32_t key_checksum;   // 4 bytes  (+4 padding) -> a hash of the name
};
struct apr_table_entry_t {
      char *key;                   // 8 bytes  -> pointer to the header name
      char *val;                   // 8 bytes  -> pointer to the header value
      apr_uint32_t key_checksum;   // 4 bytes  (+4 padding) -> a hash of the name
};
struct apr_table_entry_t {
      char *key;                   // 8 bytes  -> pointer to the header name
      char *val;                   // 8 bytes  -> pointer to the header value
      apr_uint32_t key_checksum;   // 4 bytes  (+4 padding) -> a hash of the name
};

When you add a header, say Host: example.com, APR writes one apr_table_entry_t into the next unused slot. It sets key to point at the string "Host", sets val to point at "example.com", and computes the checksum. Every header you add fills one slot (one 24-byte entry).

  req->headers  (the apr_table_t)
     └─ backing array
          ├─ apr_table_entry_t  (slot 0: "Host" -> "example.com")
          ├─ apr_table_entry_t  (slot 1: "User-Agent" -> "...")
          ├─ apr_table_entry_t  (slot 2: ...)
          └─ ...
  req->headers  (the apr_table_t)
     └─ backing array
          ├─ apr_table_entry_t  (slot 0: "Host" -> "example.com")
          ├─ apr_table_entry_t  (slot 1: "User-Agent" -> "...")
          ├─ apr_table_entry_t  (slot 2: ...)
          └─ ...
  req->headers  (the apr_table_t)
     └─ backing array
          ├─ apr_table_entry_t  (slot 0: "Host" -> "example.com")
          ├─ apr_table_entry_t  (slot 1: "User-Agent" -> "...")
          ├─ apr_table_entry_t  (slot 2: ...)
          └─ ...

That whole 24-byte struct is one slot (one header). The array is just a row of these, back to back: slot 0, slot 1, slot 2, and so on. So the array is 10 x 24 = 240 bytes of contiguous memory.

The interesting part is what happens when the array fills up. An array is a single contiguous block of memory, so you can't just add another slot onto the end, because the next bytes are already used for something else.

APR will then allocate a brand new block, twice as big, and copy all the existing entries into it.
The capacity will just double in size, meaning 10 slots become 20, then 40, 80, 160, 320. Each slot (apr_table_entry_t) is 24 bytes, so by the time the array doubles from 160 to 320 slots, the new block APR has to allocate is 320 x 24 = 7680 bytes.

Here's where the allocator comes in. A pool doesn't ask the system for memory on every allocation. It grabs big chunks (memnodes) up front and carves small pieces out of whatever chunk it's currently holding. 7680 bytes is too big to carve out of the leftover space in the current chunk, so the pool has to go get a whole new one. APR's chunks have a floor of 8 KB (MIN_ALLOC = 2 * BOUNDARY_SIZE = 8192), and it keeps spare chunks on a free-list so it can reuse them instead of calling the system again. So growing the table to 320 slots makes the pool reach into that free-list and pull off a fresh 8 KB chunk.

Why the collision?

Let's take a look at how pool indexes get decided (apr_pools.c:85-95, 306):

#define MIN_ALLOC (2 * BOUNDARY_SIZE)   // 2 * 4096 = 8192
#define BOUNDARY_INDEX 12               // BOUNDARY_SIZE = 4096
index = (size >> BOUNDARY_INDEX) - 1;   // size in 4 KB units, minus 1
#define MIN_ALLOC (2 * BOUNDARY_SIZE)   // 2 * 4096 = 8192
#define BOUNDARY_INDEX 12               // BOUNDARY_SIZE = 4096
index = (size >> BOUNDARY_INDEX) - 1;   // size in 4 KB units, minus 1
#define MIN_ALLOC (2 * BOUNDARY_SIZE)   // 2 * 4096 = 8192
#define BOUNDARY_INDEX 12               // BOUNDARY_SIZE = 4096
index = (size >> BOUNDARY_INDEX) - 1;   // size in 4 KB units, minus 1

For the default 8 KB node: 8192 >> 12 = 2, index = 2 - 1 = 1. So when a pool asks the allocator for an 8 KB node, it pops the head of the free[1] list (the size class for 8 KB nodes). The race only exists when free[1] actually has a node to pop.

However, an apr_bucket is not carved from a pool node but from its own apr_bucket_alloc_t. If we look at apr_buckets_alloc.c:

#define ALLOC_AMT (8192 - APR_MEMNODE_T_SIZE)
...
block = apr_allocator_alloc(allocator, ALLOC_AMT);   // refill a block
apr_allocator_t *allocator = apr_pool_allocator_get(p);  // the POOL's allocator
#define ALLOC_AMT (8192 - APR_MEMNODE_T_SIZE)
...
block = apr_allocator_alloc(allocator, ALLOC_AMT);   // refill a block
apr_allocator_t *allocator = apr_pool_allocator_get(p);  // the POOL's allocator
#define ALLOC_AMT (8192 - APR_MEMNODE_T_SIZE)
...
block = apr_allocator_alloc(allocator, ALLOC_AMT);   // refill a block
apr_allocator_t *allocator = apr_pool_allocator_get(p);  // the POOL's allocator

c2 is using c1's allocator, and so when c1 (the connection) creates apr_buckets, it just uses its own allocator, and buckets require 8KB blocks.

That pull off the free-list is where things can get messy, because the free-list is shared. And it's happening on the c2 worker thread, even though the table and its allocator belong to c1.

You'd expect a lock to make the c2 allocation and whatever c1 is doing take turns, so they never touch the free-list at the same time. As mentioned previously, there is a mutex, however it is not functional (more on that below). The two threads can then reach the free-list at the same moment and both take the same head node.

c2 does a write and grows a table that belongs to c1. Here's the bug line, modules/http2/h2_request.c:353:

319: static void assign_headers(request_rec *r, const h2_request *req, ...)
...
324:     r->headers_in = apr_table_clone(r->pool, req->headers);  // copy of header table for Apache processing
...
346:     if (!is_connect) {
347:         cl = apr_table_get(req->headers, "Content-Length");
348:         if (no_body) {
349:             if (!cl && apr_table_get(req->headers, "Content-Type")) {
353:                 apr_table_setn(req->headers, "Content-Length", "0");   // BUG
319: static void assign_headers(request_rec *r, const h2_request *req, ...)
...
324:     r->headers_in = apr_table_clone(r->pool, req->headers);  // copy of header table for Apache processing
...
346:     if (!is_connect) {
347:         cl = apr_table_get(req->headers, "Content-Length");
348:         if (no_body) {
349:             if (!cl && apr_table_get(req->headers, "Content-Type")) {
353:                 apr_table_setn(req->headers, "Content-Length", "0");   // BUG
319: static void assign_headers(request_rec *r, const h2_request *req, ...)
...
324:     r->headers_in = apr_table_clone(r->pool, req->headers);  // copy of header table for Apache processing
...
346:     if (!is_connect) {
347:         cl = apr_table_get(req->headers, "Content-Length");
348:         if (no_body) {
349:             if (!cl && apr_table_get(req->headers, "Content-Type")) {
353:                 apr_table_setn(req->headers, "Content-Length", "0");   // BUG

Line 324 creates a clone of the headers into r->headers_in (for the Apache processing), living in c2's own r->pool.
Then, line 353 writes into req->headers, the original h2_request table, which is shared and owned connection-side (c1). The whole bug is that req->headers (c1) should be r->headers_in (c2). The 2.4.71 fix changes exactly that.

So to summarize, assign_headers() runs on the c2 worker thread, but the req->headers write grows a table owned by c1's pool, so a c2 thread ends up allocating from c1's allocator, which is the collision.

The free-list pop itself lives in .../memory/unix/apr_pools.c, in allocator_alloc():

329:         ref = &allocator->free[index];          // the free-list (array of size-buckets)
336:         if ((node = *ref) != NULL) {            // read the head
342:             if ((*ref = node->next) == NULL ...  // advance the head
...
352:             allocator->current_free_index += node->index + 1;   // return the node
329:         ref = &allocator->free[index];          // the free-list (array of size-buckets)
336:         if ((node = *ref) != NULL) {            // read the head
342:             if ((*ref = node->next) == NULL ...  // advance the head
...
352:             allocator->current_free_index += node->index + 1;   // return the node
329:         ref = &allocator->free[index];          // the free-list (array of size-buckets)
336:         if ((node = *ref) != NULL) {            // read the head
342:             if ((*ref = node->next) == NULL ...  // advance the head
...
352:             allocator->current_free_index += node->index + 1;   // return the node

Why the lock does nothing

APR's allocator does have a lock, and the pop is wrapped in it:

// apr-1.7.6 -> memory/unix/apr_pools.c -> allocator_alloc()
315:  if (index <= allocator->max_index) {
316:      allocator_lock(allocator);
...
329:      ref = &allocator->free[index];      // free-list head for this size
336:      if ((node = *ref) != NULL) {        // read the head
342:          if ((*ref = node->next) == NULL // advance the head
349:              allocator->max_index = max_index;
356:      allocator_unlock(allocator);
// apr-1.7.6 -> memory/unix/apr_pools.c -> allocator_alloc()
315:  if (index <= allocator->max_index) {
316:      allocator_lock(allocator);
...
329:      ref = &allocator->free[index];      // free-list head for this size
336:      if ((node = *ref) != NULL) {        // read the head
342:          if ((*ref = node->next) == NULL // advance the head
349:              allocator->max_index = max_index;
356:      allocator_unlock(allocator);
// apr-1.7.6 -> memory/unix/apr_pools.c -> allocator_alloc()
315:  if (index <= allocator->max_index) {
316:      allocator_lock(allocator);
...
329:      ref = &allocator->free[index];      // free-list head for this size
336:      if ((node = *ref) != NULL) {        // read the head
342:          if ((*ref = node->next) == NULL // advance the head
349:              allocator->max_index = max_index;
356:      allocator_unlock(allocator);

That lock does nothing here because it's conditional on a mutex that was never set.

// apr_pools.c -> allocator_lock()
164: void allocator_lock(apr_allocator_t *allocator) {
166: #if APR_HAS_THREADS
167:     if (allocator->mutex)                 // only locks if one exists (=true)
168:         apr_thread_mutex_lock(allocator->mutex);
// apr_pools.c -> allocator_lock()
164: void allocator_lock(apr_allocator_t *allocator) {
166: #if APR_HAS_THREADS
167:     if (allocator->mutex)                 // only locks if one exists (=true)
168:         apr_thread_mutex_lock(allocator->mutex);
// apr_pools.c -> allocator_lock()
164: void allocator_lock(apr_allocator_t *allocator) {
166: #if APR_HAS_THREADS
167:     if (allocator->mutex)                 // only locks if one exists (=true)
168:         apr_thread_mutex_lock(allocator->mutex);

An allocator starts out with no lock. apr_allocator_create() takes one argument, a pointer where it hands back the new allocator. Inside, it allocates the struct and immediately zeroes it out with memset(new_allocator, 0, ...) (apr_pools.c:190). That zero fills every field, including the mutex field, which sets the mutex value to NULL.

So the moment the call returns, allocator->mutex == NULL. The only way an allocator ever gets a lock is if someone later calls apr_allocator_mutex_set() on it by hand. APR itself does that in the global root allocator at startup. Applications opt in where they know several threads will share an allocator: mod_http2, for instance, sets a mutex on the allocator it creates for its multiplexer (h2_mplx.c), precisely because APR allocators are not re-entrant.

The allocator this bug races on is not one of the opt-ins. It is the per-connection allocator mpm_event creates for every accepted socket (server/mpm/event/event.c), with no mutex.

The design assumption there is that one thread driving one connection. The two racing allocations, the stream's table grow and the bucket-block refill, both come out of that same mutex-less allocator, so when assign_headers() hands it a second thread, every pop and push on its free-list is unsynchronised.

With mutex == NULL, allocator_lock and allocator_unlock are no-ops, so both threads can pop the same free[1] head and use it.

Turning a crash into command execution

Most of the time this just crashes as we are overwriting useful data.
APR holds output data (as in the bytes the server sends back to the client, such as response status, data, headers, etc) as a linked list of buckets (apr_bucket). On a 64-bit machine the struct is 64 bytes:

offset  0 : apr_bucket_list link (prev, next)    16 bytes
offset 16 : const apr_bucket_type_t *type         8 bytes   <- overwrite: points at our string
offset 24 : apr_size_t length                     8 bytes
offset 32 : apr_off_t  start                      8 bytes
offset 40 : void      *data                       8 bytes   <- overwrite: our command string
offset 48 : void (*free)(void *e)                 8 bytes
offset 56 : apr_bucket_alloc_t *list              8 bytes
offset  0 : apr_bucket_list link (prev, next)    16 bytes
offset 16 : const apr_bucket_type_t *type         8 bytes   <- overwrite: points at our string
offset 24 : apr_size_t length                     8 bytes
offset 32 : apr_off_t  start                      8 bytes
offset 40 : void      *data                       8 bytes   <- overwrite: our command string
offset 48 : void (*free)(void *e)                 8 bytes
offset 56 : apr_bucket_alloc_t *list              8 bytes
offset  0 : apr_bucket_list link (prev, next)    16 bytes
offset 16 : const apr_bucket_type_t *type         8 bytes   <- overwrite: points at our string
offset 24 : apr_size_t length                     8 bytes
offset 32 : apr_off_t  start                      8 bytes
offset 40 : void      *data                       8 bytes   <- overwrite: our command string
offset 48 : void (*free)(void *e)                 8 bytes
offset 56 : apr_bucket_alloc_t *list              8 bytes

The bucket allocator does not carve 64-byte chunks though. Every small allocation gets a 32-byte node_header_t (size, owning list, memnode, freelist pointer) prepended in front of the object, and apr_bucket_alloc() rounds every small object up to APR_BUCKET_ALLOC_SIZE, which is 2 * sizeof(apr_bucket) = 128 bytes (twice the struct, by design, for third-party bucket types), then prepends a 32-byte node_header_t. So the real stride between buckets is 128 + 32 = 160 bytes (SMALL_NODE_SIZE in apr_buckets_alloc.c):

[ hdr 32B | bucket 128B ][ hdr 32B | bucket 128B ][ hdr 32B ...
^0                       ^160                     ^320
[ hdr 32B | bucket 128B ][ hdr 32B | bucket 128B ][ hdr 32B ...
^0                       ^160                     ^320
[ hdr 32B | bucket 128B ][ hdr 32B | bucket 128B ][ hdr 32B ...
^0                       ^160                     ^320

The apr_table_entry_t rows are 24 bytes and the bucket stride is 160. 160 is not a multiple of 24 (160 mod 24 = 16), so successive buckets in a block don't all share one phase. Each bucket's phase is shifted by 16 bytes from the previous bucket's.

So why does the attack still work the same way every time, if the stride doesn't divide evenly? Because memory is handed out in a predictable order. On every run the two allocators carve up the shared 8 KB chunk the same way, so the bucket we corrupt lands in the same spot relative to the table rows, and type falls on the same slot (key, val, or checksum) each time. It's fixed for a given build and config, not per-race luck. Two consequences:

  • type sits at bucket offset 16 and data at offset 40, exactly one 24-byte entry apart. They always land on the same kind of slot, so one well-placed row controls both the function pointer and its argument.

  • On our build, the phase puts e->type on the key slot:

overlay on our build (key phase): table rows land on the live bucket

  bucket+16  <-  entry i    key  (points at "K0000000040|id")   => type
  bucket+24  <-  entry i    val  (pointer, unused by the call)  => length
  bucket+32  <-  entry i    checksum (a small int)             => start
  bucket+40  <-  entry i+1  key  (points at "K0000000041|id")  => data
overlay on our build (key phase): table rows land on the live bucket

  bucket+16  <-  entry i    key  (points at "K0000000040|id")   => type
  bucket+24  <-  entry i    val  (pointer, unused by the call)  => length
  bucket+32  <-  entry i    checksum (a small int)             => start
  bucket+40  <-  entry i+1  key  (points at "K0000000041|id")  => data
overlay on our build (key phase): table rows land on the live bucket

  bucket+16  <-  entry i    key  (points at "K0000000040|id")   => type
  bucket+24  <-  entry i    val  (pointer, unused by the call)  => length
  bucket+32  <-  entry i    checksum (a small int)             => start
  bucket+40  <-  entry i+1  key  (points at "K0000000041|id")  => data

The overlay itself is a single write. At the race instant, the grown table's memcpy lands its 24-byte rows across the shared node in one pass.

A bucket sitting in that region, type takes a row's key, length its val, start its checksum, data the next row's key, free the next row's val, list the next row's checksum, and the link before them the tail of the previous row. Nothing has executed yet, the bucket is just a struct holding the wrong bytes, and corrupted bytes do nothing until something reads them.

t0  race instant: the grown table's memcpy lands on the live bucket.
    Bucket is now corrupted IN MEMORY but nothing has executed yet:
      type=→name, length=→val, start=checksum, data=→next-name,
      free=→val, list=checksum, link=trashed

t1  nothing touches the bucket, the corrupted state just sits there.
    length holds a pointer-sized number that is harmless until read.

t2  destroy path runs:  callee = *(type+16) → &system; system(data)
    ← the ONLY moment code execution happens. Then free(e) → crash.
t0  race instant: the grown table's memcpy lands on the live bucket.
    Bucket is now corrupted IN MEMORY but nothing has executed yet:
      type=→name, length=→val, start=checksum, data=→next-name,
      free=→val, list=checksum, link=trashed

t1  nothing touches the bucket, the corrupted state just sits there.
    length holds a pointer-sized number that is harmless until read.

t2  destroy path runs:  callee = *(type+16) → &system; system(data)
    ← the ONLY moment code execution happens. Then free(e) → crash.
t0  race instant: the grown table's memcpy lands on the live bucket.
    Bucket is now corrupted IN MEMORY but nothing has executed yet:
      type=→name, length=→val, start=checksum, data=→next-name,
      free=→val, list=checksum, link=trashed

t1  nothing touches the bucket, the corrupted state just sits there.
    length holds a pointer-sized number that is harmless until read.

t2  destroy path runs:  callee = *(type+16) → &system; system(data)
    ← the ONLY moment code execution happens. Then free(e) → crash.

Buckets get destroyed through their type:

#define apr_bucket_destroy(e) do {                 
        apr_bucket *apr__d = (e);                    
        apr__d->type->destroy(apr__d->data);         
        apr__d->free(apr__d);                        
    } while (0)
#define apr_bucket_destroy(e) do {                 
        apr_bucket *apr__d = (e);                    
        apr__d->type->destroy(apr__d->data);         
        apr__d->free(apr__d);                        
    } while (0)
#define apr_bucket_destroy(e) do {                 
        apr_bucket *apr__d = (e);                    
        apr__d->type->destroy(apr__d->data);         
        apr__d->free(apr__d);                        
    } while (0)

Two calls happen here: first the type's destroy with e->data as the argument, then the bucket's own free. On a successful overlay, the first is system(command). The second call then goes through the overlaid free field at offset 48, which the overlay filled with the next row's val pointer (a string address, not code), so the worker dies immediately after a successful fire. And when the callee is garbage instead of &system, you get the crash without the command.

 [ name_i "K0000000000|id\0" ][ value_i = &system bytes ][ name_{i+1} "K0000000001|id\0" ...
 ^0                            ^16                       ^24
   14 chars + NUL = 15          6 raw bytes + NUL = 7
   -> rounds to a 16B chunk     -> rounds to an 8B chunk

call resolution at bucket's teardown:

concrete case: the 2026-11-19 fire, whose bucket landed on rows 0 and 1 (i = 0)
  e->type  = entry i's key   = &name_i
  callee   = *(type + 16)    = *(name_i + 16)  = first 8 bytes of value_i = &system
  e->data  = entry i+1's key = &name_{i+1}     = "K0000000001|id" // the next row's (apr_table_entry_t) key

  => system("K0000000001|id") // callee read from header 1's VAL; argument = header 2's KEY
 [ name_i "K0000000000|id\0" ][ value_i = &system bytes ][ name_{i+1} "K0000000001|id\0" ...
 ^0                            ^16                       ^24
   14 chars + NUL = 15          6 raw bytes + NUL = 7
   -> rounds to a 16B chunk     -> rounds to an 8B chunk

call resolution at bucket's teardown:

concrete case: the 2026-11-19 fire, whose bucket landed on rows 0 and 1 (i = 0)
  e->type  = entry i's key   = &name_i
  callee   = *(type + 16)    = *(name_i + 16)  = first 8 bytes of value_i = &system
  e->data  = entry i+1's key = &name_{i+1}     = "K0000000001|id" // the next row's (apr_table_entry_t) key

  => system("K0000000001|id") // callee read from header 1's VAL; argument = header 2's KEY
 [ name_i "K0000000000|id\0" ][ value_i = &system bytes ][ name_{i+1} "K0000000001|id\0" ...
 ^0                            ^16                       ^24
   14 chars + NUL = 15          6 raw bytes + NUL = 7
   -> rounds to a 16B chunk     -> rounds to an 8B chunk

call resolution at bucket's teardown:

concrete case: the 2026-11-19 fire, whose bucket landed on rows 0 and 1 (i = 0)
  e->type  = entry i's key   = &name_i
  callee   = *(type + 16)    = *(name_i + 16)  = first 8 bytes of value_i = &system
  e->data  = entry i+1's key = &name_{i+1}     = "K0000000001|id" // the next row's (apr_table_entry_t) key

  => system("K0000000001|id") // callee read from header 1's VAL; argument = header 2's KEY

For the call to land on system, the 8 bytes at name + 16 must be the address of system so the header's value is the leaked pointer written as 6 raw bytes.

Which fields the rows hit is fixed geometry per build. However, what is more considered "luck" is (1) when the allocator double allocates the same node that a bucket will occupy, (2) if that bucket gets destroyed at all, (3) if that bucket gets destroyed before other actions could cause the process to crash.

At this point, it is roughly one-in-a-million chance on our relaxed lab setup.

So how exploitable is it really

Spoiler: Not trivially exploitable

Red Hat scored it a 9.8 while NVD scored it a 8.1 on CVSS v3 base score.

Having actually driven it end to end, the thing we'd push back on isn't really the number, it's what the number is allowed to measure. CVSS up to 3.1 scores how bad the bug is if you can trigger it. It doesn't model how likely you are to trigger it on a real target.

Red Hat assumes AC:L, low attack complexity, but this is a race you win about once in a million tries in a relaxed lab (LimitRequestFields 3000) and about once in twenty million against a stock (LimitRequestFields 100), which should be what NVD correctly scored as AC:H situation.

Temporal and Environmental metrics cover some of this, but NVD publishes only the base, so the base is what everyone quotes. CVSS 4.0 adds an Attack Requirements metric and an exploit-maturity Threat group to tackle the gap, but it wasn't measured for this specific CVE.

So 8.1 isn't wrong per se, but it's not being completely honest regarding the likelihood of someone exploiting this vulnerability on a live server.

Execution also leans on a specific geometry: many processes and fat threads-per-child (we used 32 by 16). The leak wants fat threads, the fire wants many processes, and you want a config that gives both. Plenty of real deployments won't look like that. On those, code execution stays possible in principle as we did land executions at stock settings, but at one-per-20M-streams the realistic experience is a long and noisy denial of service, not an RCE.

The leak needs TRACE as a reflection channel, which is normally on by default. However, it does sometimes get turned off in hardened configs, so you'd need to find another way to defeat ASLR.

In terms of command execution, we can only write about 16 bytes via the dual value, 8 to 15 via a header name, and there is a restriction on certain characters in the name route (such as /, <, >, ...).
There is enough to prove execution (|id), and not much else without staging a bigger payload, which is its own post-exploitation project.

Why not use the value instead of the key

We also want to explain why the arbitrary-command value route is harder to pull off than the |id name route.

Quick reminder of the one that works. In an apr_table_entry_t the command lives in the key (the header name), and &system lives in the value (the header value). When the bucket's type field gets overlaid with a key pointer, the destroy path reads the function pointer from *(type + 16) and calls it with e->data as the argument. The header strings sit back-to-back in the pool, and the name is sized to exactly 16 bytes, so name + 16 steps off the end of the name straight into the next string, which is the value holding &system:

pool strings:  [ name_i "K…|id\0" (16B = COMMAND) ][ value_i = &system bytes ][ name_{i+1} = COMMAND ] …
                 ^ e->type (key ptr)                  ^ name_i + 16 = &system
                e->data ──────────────────────────────────────────────────────▶ name_{i+1} = next command
pool strings:  [ name_i "K…|id\0" (16B = COMMAND) ][ value_i = &system bytes ][ name_{i+1} = COMMAND ] …
                 ^ e->type (key ptr)                  ^ name_i + 16 = &system
                e->data ──────────────────────────────────────────────────────▶ name_{i+1} = next command
pool strings:  [ name_i "K…|id\0" (16B = COMMAND) ][ value_i = &system bytes ][ name_{i+1} = COMMAND ] …
                 ^ e->type (key ptr)                  ^ name_i + 16 = &system
                e->data ──────────────────────────────────────────────────────▶ name_{i+1} = next command

This works out because a header value can hold the raw &system bytes while the name carries the command |id. The issue is that the name is tchar-restricted (camel-cased, no /, <, >, spaces), so the command is cramped.

The value route fixes that by putting everything in the value, which can be arbitrary bytes and as long as we like. We build one value as [16-byte command][&system], and that single string does two jobs: read at +16 it hands back &system, and read as e->data it is the command (a trailing # comments out the padding and raw address bytes so the shell ignores them):

pool strings:  [ val_i "id;uname #AAAAAA"(16B) + &system(6B) = 22B ][ val_{i+1} = same ] …
                 ^ e->type (val ptr)      ^ val_i + 16 = &system (inside the SAME value)
                 e->data ─────────────────────────────────────────────▶ val_{i+1} = next command ('#' hides the &system tail)
pool strings:  [ val_i "id;uname #AAAAAA"(16B) + &system(6B) = 22B ][ val_{i+1} = same ] …
                 ^ e->type (val ptr)      ^ val_i + 16 = &system (inside the SAME value)
                 e->data ─────────────────────────────────────────────▶ val_{i+1} = next command ('#' hides the &system tail)
pool strings:  [ val_i "id;uname #AAAAAA"(16B) + &system(6B) = 22B ][ val_{i+1} = same ] …
                 ^ e->type (val ptr)      ^ val_i + 16 = &system (inside the SAME value)
                 e->data ─────────────────────────────────────────────▶ val_{i+1} = next command ('#' hides the &system tail)

Now the command can contain /, spaces, ;, |; real arbitrary execution. But it only fires if the overlay drops a value pointer into e->type instead of a key pointer, and getting the 24-byte table rows to land with the forged pointer sitting on the key slot (name route) or the value slot (value route) is deterministic.

When the race hits, both the table grow and the bucket arena are handed the same recycled 8 KB memnode. APR resets every node's carve point to node+40 on each handout, so the grown entry array (the first thing carved from it) starts at node+40. The arena carves buckets from the front of that same node too, 160 bytes per slot (32-byte header + a 128-byte slot), so the first live bucket sits at node+40+32 =node+72 and its type field at node+88. That's (88−40) mod 24 = 0: the key slot of a 24-byte table entry, on every race and every rebuild.                   

 ┌──────────┬────────────────────────────┬────────┬────────────────────────────────────┐                              
 │ address  │ array-relative (= addr−40) │ mod 24 │ what byte lives there              │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+40  │ 0                          │ 0      │ entry 0 .key                       │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+48  │ 8                          │ 8      │ entry 0 .val                       │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+56  │ 16                         │ 16     │ entry 0 .key_checksum (+pad)       │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+64  │ 24                         │ 0      │ entry 1 .key                       │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+88  │ 48                         │ 0      │ entry 2 .key ← where e->type reads │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+112 │ 72                         │ 0      │ entry 3 .key ← where e->data reads │

 ┌──────────┬────────────────────────────┬────────┬────────────────────────────────────┐                              
 │ address  │ array-relative (= addr−40) │ mod 24 │ what byte lives there              │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+40  │ 0                          │ 0      │ entry 0 .key                       │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+48  │ 8                          │ 8      │ entry 0 .val                       │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+56  │ 16                         │ 16     │ entry 0 .key_checksum (+pad)       │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+64  │ 24                         │ 0      │ entry 1 .key                       │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+88  │ 48                         │ 0      │ entry 2 .key ← where e->type reads │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+112 │ 72                         │ 0      │ entry 3 .key ← where e->data reads │

 ┌──────────┬────────────────────────────┬────────┬────────────────────────────────────┐                              
 │ address  │ array-relative (= addr−40) │ mod 24 │ what byte lives there              │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+40  │ 0                          │ 0      │ entry 0 .key                       │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+48  │ 8                          │ 8      │ entry 0 .val                       │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+56  │ 16                         │ 16     │ entry 0 .key_checksum (+pad)       │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+64  │ 24                         │ 0      │ entry 1 .key                       │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+88  │ 48                         │ 0      │ entry 2 .key ← where e->type reads │                              
 ├──────────┼────────────────────────────┼────────┼────────────────────────────────────┤                              
 │ node+112 │ 72                         │ 0      │ entry 3 .key ← where e->data reads │

Our lab constantly lands us in the key phase. We measured the overwrite lands 8 bytes off the pointer slot, so e->type points at a name instead.

It was non-trivial to exploit the value-path, as we couldn't reliably get e->type to land on value, and*(e->type+16)to land on the address of &system.

The measurements we cited above come from a lab where there were no external server interactions with the server. However, on a technical level, live server with real requests wouldn't actually mess up the race.

It's also very noisy. By the time you successfully get command execution, you've generated a huge amount of crashes.

Apache has also scored this as a critical, however did not give it a CVSS score:

What happens when code execution succeeds?

When the system(cmd) lands, you're running it as the httpd worker user. In our lab, that means we were uid=1 (daemon), not root.

That account is still useful though. Hypothetically, it can read anything the web server can: application source, config files, .envs, database credentials, session stores, uploads, or even sometimes TLS private keys if they're group-readable. You can write wherever it can write, and you can reach whatever the host can reach on the network.

The reality depends on the host's hardening. For example:

  • SELinux, default-enforcing on RHEL, CentOS and Fedora, confines httpd to the httpd_t domain. Out of the box that blocks most of the filesystem and, importantly, outbound network connections unless the admin set httpd_can_network_connect. On an enforcing box, staging a second-stage download and much of the pivoting just don't work by default.

  • systemd unit hardening. Modern Apache units commonly set PrivateTmp=true (Debian's does), and sometimes ProtectSystem, ProtectHome or NoNewPrivileges. None of these stop code execution, but each walls off a piece of what comes after.

  • Containers. A lot of httpd now runs in one, so your shell is inside it, often a stripped image with no shell tooling (the tiny payload budget hurts here), and lateral movement means a container escape or using the container's network position rather than free rein on the host.

So since we are the service user and not root, we'd need an additional LPE to be root on the server.

Wrapping up

The short version: this is a real remote code execution bug. Both halves are proven end to end: a network-only ASLR leak out of the TRACE reflection, and an attacker-chosen command executed through the leaked address, and on most real servers you will still only ever see a crash.

Red Hat's CVSS score being a 9.8 tells a defender this is serious and to immediately patch it, but it says nothing about whether the bug reaches code execution on their box or just wedges a worker. When every advisory in the queue is a critical or a high, the number loses its urgency meaning.

This is where our product, Precog, steps in. Not only will it be able to find the vulnerability, but it will check if it is exploitable by actually attempting to exploit it.

This helps developers and defenders actually focus on patching vulnerabilities that truly affect their product. Most of the time, a small config change can turn a 9.8 CVSS RCE to "non-exploitable". This is why Precog is a game changer in the continuous threat exposure management world, as it will reduce noise and focus on what is really important.

S&tXaPrQt0  l$o4oCkHi5nVg$  aNtX  yUoSu2r#  sVoWfPtYw@aOr@eQ  cXrQiGt@i3c#a0lWlFy&.@

request briefing

request briefing

SOt0aJr5t1  lBoAoYkKi7n9gO  aCt7  yDo2u4rQ  sDo6fBtLw2a6rFe6  c&rXi&tRiQcGaFl0lWyK.O

request briefing

request briefing

SItNa#rDt&  lVoAoLkIiYn%g6  a8tP  yEoXuKr4  sVoVfGt$wDaZrIeU  c4r7iItLiIcAaJlPlQy@.C

request briefing

request briefing

BYNARIO s.r.l. | PIAZZA BORROMEO 12, 20129 MILAN, ITALY | VAT- IT14434720968

all rights reserved

2026

BYNARIO s.r.l. | PIAZZA BORROMEO 12, 20129 MILAN, ITALY | VAT- IT14434720968

all rights reserved

2026

BYNARIO s.r.l. | PIAZZA BORROMEO 12, 20129 MILAN, ITALY | VAT- IT14434720968

all rights reserved

2026