Understanding CVE-2026–123633.How a Use-After-Free Vulnerability Can Lead to Remote Code Execution:
A use-after-free in NGINX's HTTP/2 connection handling occurs when a crafted request causes connection memory to be freed while still in use. An attacker could potentially achieve remote code execution with worker privileges, though exploitation requires additional techniques such as heap grooming and an ASLR bypass.
Use After Free
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
NGINX is commonly deployed as a reverse proxy: it accepts requests from clients and forwards them to backend application servers. The path looks like this:
User's Browser
|
| HTTP/2 Request
v
NGINX
|
| Forward request
v
Backend Application
CVE-2026-123633 affects specific NGINX configurations where HTTP/2 is enabled for client connections and requests are forwarded to a backend. The flaw sits in how NGINX manages reusable connections when its available worker_connections are running low. The research discussed here was published by Wiz.
Setup
The report does not describe a lab setup, tooling, or the exact NGINX versions used for the demonstration. What it does state is that the researchers demonstrated RCE in a laboratory environment, and that exploitation required additional techniques beyond the initial trigger: memory disclosure, heap grooming, and an ASLR bypass.
The attack flow implies the following conditions:
- HTTP/2 is enabled for client connections.
- Requests are forwarded to a backend server, so NGINX needs upstream connections.
- The attacker can send HTTP/2 traffic to NGINX directly.
- Available
worker_connectionscan be driven low enough that NGINX tries to reclaim connection slots.
Finding it
The starting point is the lifetime of connection memory. When a program processes a request it allocates memory to hold connection and request state, processes the request, and releases the memory when it is no longer needed. Releasing memory does not erase the pointers that refer to it. A pointer that still holds the old address after the free is a dangling pointer, and any later use of it is a use-after-free.
The dangerous part is memory reuse. When memory is freed, the allocator may hand the same address to a later allocation. If the old pointer is used again, it now reads or writes data belonging to whatever occupies that address now:
Initially:
Old Pointer ──────→ Memory A
|
Request A data
After memory is freed:
Old Pointer ──────→ Memory A (freed)
After memory is reused:
Old Pointer ──────→ Memory A
|
Request B data
Memory reuse alone does not cause code execution. The vulnerability appears when the program keeps accessing the memory through the invalid pointer. In CVE-2026-123633 the trigger is a mismatch between the connection's bookkeeping state and its actual use: NGINX marks a connection as reusable while request-processing code is still working with it, and later frees that connection's memory while the original code still references it.
Exploitation
The research describes the following sequence.
Step 1: send a specially crafted HTTP/2 request
The attacker begins sending an incomplete HTTP/2 HEADERS frame. Because no active request stream has been created yet, NGINX temporarily treats the connection as reusable.
Step 2: make the request active
The attacker sends the remaining part of the frame. NGINX creates a request stream and begins processing the request, but the connection remains incorrectly marked as reusable.
Step 3: force NGINX to need another connection slot
When NGINX forwards the request to a backend it needs an upstream connection. If available connection slots are running low, NGINX may try to free resources by closing connections marked as reusable. The attacker's connection is still being used to process the request, so this is the wrong connection to close.
Step 4: free the connection memory too early
NGINX attempts to close the connection. Under the described error condition it frees the connection's memory even though the original request-processing code still references it. This is the use-after-free condition.
Step 5: use the old pointer again
The original request processing continues using the previously freed memory. That memory may have been reused for another purpose, so the old pointer can refer to memory whose contents are no longer what NGINX expects. This is the memory-safety failure that can be exploited further.
The chain in summary:
Use-After-Free
↓
Memory gets reused
↓
Old pointer accesses reused memory
↓
Memory corruption
↓
Execution flow may be influenced
↓
Potential Remote Code Execution
What the first request does not contain
The first request does not carry a Linux command that a second request then executes. The crafted HTTP/2 traffic manipulates NGINX's connection-handling logic to trigger the UAF condition. Turning that into code execution requires further work: the research describes memory disclosure and heap grooming, together with an ASLR bypass, to make exploitation reliable. The researchers demonstrated RCE in a laboratory environment.
In simple terms:
- The crafted HTTP/2 traffic triggers the vulnerable condition.
- The freed memory creates an opportunity for memory corruption.
- Further exploitation techniques can turn that corruption into control over execution.
- If successful, the attacker may execute code with the privileges of the NGINX worker process.
Root cause
The mistake is in connection lifetime management. NGINX decides a connection is reusable before an active request stream exists, and does not correct that state once the stream is created. When worker_connections run low and NGINX reclaims slots by closing connections marked reusable, it closes and frees a connection that request-processing code is still using. The free happens while a live reference remains, producing the dangling pointer.
ASLR is the main obstacle to turning the corruption into execution. ASLR randomises where important parts of a program are placed in memory, so an attacker cannot predict addresses:
Without ASLR:
Program code → 0x400000
With ASLR:
Program code → Randomized address
The CVE description specifically notes that code execution is possible when ASLR is disabled or when the attacker can bypass it. The research describes an ASLR bypass, along with memory disclosure and heap grooming, to make exploitation reliable.
The backend application does not need to contain a security flaw. The problem exists in NGINX's own HTTP/2 connection handling.
Impact
Successful exploitation may allow a remote attacker to:
- Execute arbitrary code with NGINX worker privileges.
- Disrupt services by crashing NGINX worker processes.
- Potentially access sensitive information or modify data within the worker's permissions.
Not every UAF vulnerability leads to RCE. Some only cause application crashes or Denial of Service. Successful RCE depends on whether the attacker can reliably turn the memory corruption into control over program execution, which in this case required memory disclosure, heap grooming and an ASLR bypass.
Fix
The recommended action is to update affected NGINX deployments to a fixed version. The affected and fixed versions are listed in F5's advisory; always check the vendor advisory and your distribution's security notices, because distributions may backport patches.

If an immediate update is not possible, temporarily disabling HTTP/2 may reduce exposure. Test application compatibility before applying this mitigation.
The broader lesson is that freeing memory is not enough: a program must also ensure that no active code continues using the released memory.
Variants to test
- Incomplete HTTP/2 HEADERS frames followed by completion. Send a partial HEADERS frame, then the remainder, against an HTTP/2 front end that proxies to a backend.
- Connection-slot pressure. Drive
worker_connectionslow while such a connection is in flight, so the server reclaims slots by closing connections marked reusable. - Crash as a first signal. Repeat the sequence and watch for worker process crashes or restarts.
- ASLR posture. Test the same sequence with ASLR disabled and with it enabled.
- HTTP/2 disabled. Repeat with HTTP/2 turned off.
What happened, in plain words
A piece of software called NGINX, which sits in front of many websites and passes visitors' requests on to the programs that actually build the pages, had a memory bug. When it was set up to speak a newer version of the web protocol called HTTP/2, and when it was passing requests on to a backend server, a specially crafted request could make NGINX throw away some memory while it was still using it. That kind of mistake is called a use-after-free. Researchers at Wiz demonstrated, in a laboratory, that with extra work this mistake could be turned into code execution. The bug is tracked as CVE-2026-123633. The recommended action is to update NGINX to a fixed version.

Introduction
Imagine a software application using a temporary storage box to keep information while processing a request. Once the application finishes using that box, it releases it. But what happens if the application continues using the box even after releasing it? That is the basic idea behind a Use-After-Free (UAF) vulnerability.
A UAF bug can become particularly dangerous when an attacker can influence what happens to the released memory. In certain situations, this can lead to memory corruption and potentially Remote Code Execution (RCE). One example is CVE-2026-123633, a vulnerability affecting NGINX when it uses HTTP/2 to receive client requests and forwards those requests to a backend server.
Before going further, a few words on the pieces involved, because the rest of the article leans on them.
NGINX is a web server and reverse proxy. A web server is the program that answers when your browser asks for a page. A reverse proxy is a server that stands in front of other servers: your browser talks to it, and it passes your request on to the program behind it, then passes the answer back. Many large sites use NGINX this way because it is good at handling huge numbers of connections at once.
HTTP/2 is a version of the language browsers and servers use to exchange requests and responses. The older version, HTTP/1.1, mostly sends one request at a time per connection. HTTP/2 lets many requests share a single connection at the same time, which is faster. It does this by chopping each request into pieces called frames, and labelling them so the other side knows which request each piece belongs to.
A backend application is the program behind the proxy that does the real work, for example looking up a user's account or building a shopping basket. NGINX forwards the request to it and waits for the answer.
Memory is the working space a program uses to hold data while it runs. When a program needs to remember something, it asks the operating system for a chunk of memory, uses it, and then gives it back. Giving it back is called freeing it.
Remote Code Execution (RCE) means an attacker who is somewhere else on the network can make the server run code of their choosing. It is one of the most serious outcomes a bug can have, because the attacker is no longer limited to what the website was designed to do.
Let's understand how this works.
1. First, understand how memory is used
When a program processes a request, it needs memory to temporarily store information.
For example:
- A client sends a request.
- NGINX allocates memory to store connection and request-related information.
- NGINX processes the request.
- Once the memory is no longer needed, NGINX releases it.
Think of memory as a temporary workspace. A useful everyday comparison is a desk in an office. You sit down, spread out the papers for the task you are doing, work through them, and when you are finished you clear the desk so the next person can use it. While you are working, the desk holds your papers. When you clear it, the desk is free for someone else. The important part is that clearing the desk does not automatically stop you from reaching for a paper that used to be there.
In the same way, when a program frees memory, the memory becomes available for other uses, but the program's own record of where that memory was does not disappear by itself. That record is called a pointer: a small value that says "the data I care about is at this address in memory". If the program keeps the pointer after freeing the memory, the pointer now points at a place that is no longer reserved for it.
2. What is a Use-After-Free vulnerability?
A Use-After-Free occurs when a program tries to access memory after that memory has already been released.
Consider this simplified example:
Step 1: Memory is allocated
Program → Memory A
Step 2: Memory is released
Program → Memory A (freed)
Step 3: Program still uses the old pointer
Program → Memory A (invalid access)
Line by line:
- Step 1: Memory is allocated. The program asks for a chunk of memory, here called Memory A, and gets it. It can store whatever it likes there.
- Step 2: Memory is released. The program says it is finished with Memory A. The operating system or the memory manager is now free to hand that same chunk to somebody else.
- Step 3: Program still uses the old pointer. The program has kept its note of where Memory A was, and it reads or writes through that note. But the chunk is no longer reserved for it. This is the invalid access, and it is what gives the bug its name: the program used memory after it was freed.
The important detail is that releasing memory does not necessarily erase the pointer that refers to it. The pointer may still contain the old memory address. It is now called a dangling pointer. The word dangling is apt: the pointer is still there, but it no longer holds on to anything the program owns.
Why does this matter in practice? Because the program has no way of knowing, just by looking at the pointer, that the memory behind it is gone. It will happily read whatever is there, or write over it, as if nothing had happened.
3. How does memory reuse make this dangerous?
Here is where the situation becomes more interesting.
When memory is freed, the memory allocator may make that same address available for another allocation. The allocator is the part of the program, or of the runtime, that keeps track of which chunks of memory are in use and which are free, and hands them out when asked. It is like a cloakroom attendant: when you hand in your coat, the ticket can be given to the next person, and the same hook can hold a different coat.
Suppose:
- Request A uses Memory A.
- The application releases Memory A.
- Request B later receives the same memory address for a different purpose.
- The old pointer from Request A still points to that address.
Now the old pointer may access data belonging to Request B.
Initially:
Old Pointer ──────→ Memory A
|
Request A data
After memory is freed:
Old Pointer ──────→ Memory A (freed)
After memory is reused:
Old Pointer ──────→ Memory A
|
Request B data
Line by line:
- Initially. The old pointer points at Memory A, and Memory A holds Request A's data. Everything is consistent.
- After memory is freed. The pointer still holds the same address, but the chunk is no longer reserved. The diagram marks it as freed to show that the program should not be using it.
- After memory is reused. The allocator has handed the same address to Request B, which has put its own data there. The old pointer from Request A still points at that address, so if Request A's code reads through it, it now sees Request B's data.
This is called memory reuse. It is important to understand that memory reuse alone does not automatically cause RCE. The vulnerability occurs when the program continues accessing the memory through an invalid pointer. Reuse is what turns a harmless-looking mistake into something an attacker can steer: if the attacker can influence what Request B puts into that memory, then the old pointer will read or write attacker-influenced data.
4. How can this lead to Remote Code Execution?
This is the most important part.
Imagine that an attacker can influence the data that gets placed into a memory location after it has been freed. If the vulnerable program later accesses that location through its old pointer, it may interpret the new data incorrectly or overwrite other memory. This can cause memory corruption. Memory corruption is a broad term for the situation where a program's memory no longer contains what the program believes it contains, so its own logic starts producing wrong results.
In certain circumstances, an attacker may use that corruption to influence the program's execution flow. Execution flow is simply the order in which the program runs its instructions. Normally the program decides this itself: it follows the sequence written by its authors. If an attacker can change where the program goes next, they can make it jump to instructions of their choosing.
For example, if the attacker can influence where the program executes next, they may be able to make the program execute attacker-controlled instructions. That is the basic connection between UAF and RCE.
The simplified chain is:
Use-After-Free
↓
Memory gets reused
↓
Old pointer accesses reused memory
↓
Memory corruption
↓
Execution flow may be influenced
↓
Potential Remote Code Execution
Read the chain from top to bottom:
- Use-After-Free. The program frees memory and then keeps using it.
- Memory gets reused. The allocator hands the same chunk to something else, so the contents change.
- Old pointer accesses reused memory. The original code reads or writes through its stale pointer, touching data that now belongs to somebody else.
- Memory corruption. Because the data is not what the program expected, its internal state goes wrong.
- Execution flow may be influenced. With the right corruption, the attacker can nudge the program towards instructions they control.
- Potential Remote Code Execution. If all of the above lines up, the attacker's instructions run on the server.
Important: Not every UAF vulnerability leads to RCE. Some only cause application crashes or Denial of Service (DoS). A crash happens when the program touches memory in a way the operating system refuses to allow, and the process is stopped. Denial of Service means the service becomes unavailable to its legitimate users, whether by crashing or by being overloaded. Successful RCE depends on whether the attacker can reliably turn the memory corruption into control over program execution. Reliability is the hard part: a bug that crashes the server nine times out of ten is not much use to an attacker who wants to run code.
5. How does this happen in CVE-2026-123633?
Now let's connect the concept to the actual NGINX vulnerability.
NGINX is commonly used as a reverse proxy. It receives requests from clients and forwards them to backend application servers.
For example:
User's Browser
|
| HTTP/2 Request
v
NGINX
|
| Forward request
v
Backend Application
Line by line:
- User's Browser. This is the visitor's browser, the program on the visitor's computer that asks for pages.
- HTTP/2 Request. The browser sends its request using HTTP/2, the newer version of the protocol described earlier.
- NGINX. The request arrives at NGINX, which is acting as the front door.
- Forward request. NGINX does not answer the request itself. It passes it on to the backend application.
- Backend Application. The program behind NGINX does the real work and sends its answer back through NGINX to the browser.
CVE-2026-123633 affects specific NGINX configurations where HTTP/2 is enabled for client connections and requests are forwarded to a backend. The vulnerability involves how NGINX manages reusable connections when its available worker_connections are running low.
A few terms in that sentence need unpacking. A connection is an open conversation between two computers. When your browser talks to a server, it opens a connection, exchanges data, and eventually closes it. Keeping connections open and reusing them saves time, because setting one up is relatively expensive. NGINX keeps a pool of connections it can reuse, and worker_connections is the setting that says how many connections each worker process may handle at once. A worker process is one of the processes NGINX runs to do the actual work; NGINX typically runs several so it can use multiple processor cores. When the pool is nearly full, NGINX has to make room, and that is where the bug lives.
The attack flow
The research published by Wiz describes the following sequence:
Step 1: The attacker sends a specially crafted HTTP/2 request.
The attacker begins sending an incomplete HTTP/2 HEADERS frame. NGINX temporarily treats the connection as reusable because it has not yet created an active request stream.
A frame is one of the pieces HTTP/2 chops a request into. A HEADERS frame is the piece that carries the request's headers, the metadata such as the address being requested. A stream is HTTP/2's name for one request-and-response exchange running inside a shared connection. Because HTTP/2 multiplexes, several streams can share one connection at the same time.
The attacker deliberately sends only part of the HEADERS frame. NGINX sees a connection with no active stream yet, so it concludes the connection is not busy and marks it as reusable. That conclusion is reasonable at that moment, but it will soon be wrong.
Step 2: The request becomes active.
The attacker sends the remaining part of the frame. NGINX creates a request stream and begins processing the request. However, the connection remains incorrectly marked as reusable.
This is the heart of the bug. Once the rest of the frame arrives, NGINX does create a stream and starts working on the request, but it does not go back and correct the earlier note that said the connection was reusable. The connection's bookkeeping now disagrees with reality: the record says free, the truth is busy.
Step 3: NGINX needs another connection slot.
When NGINX forwards the request to a backend, it needs an upstream connection. If available connection slots are running low, NGINX may attempt to free up resources by closing connections marked as reusable. The problem is that the attacker's connection is still being used to process the request.
An upstream connection is a connection from NGINX to the backend server, as opposed to the downstream connection from the browser to NGINX. To forward the request, NGINX needs one of these, and if slots are scarce it looks for connections it can close to make room. It picks connections marked reusable, because closing those should be harmless. But the attacker's connection is marked reusable while it is in fact busy, so NGINX picks exactly the wrong one.
Step 4: The connection memory is freed too early.
NGINX attempts to close the connection. Under the described error condition, it frees the connection's memory even though the original request-processing code still references it. This creates the Use-After-Free condition.
The code that was processing the request still holds its pointer to the connection's memory. NGINX has just handed that memory back. The pointer is now dangling, and the program is about to use it.
Step 5: The old pointer is used again.
The original request processing continues using the previously freed memory. That memory may have been reused for another purpose. The old pointer can therefore refer to memory whose contents are no longer what NGINX expects. This is the critical memory-safety failure that can be exploited further.
Memory safety is the property of a program never touching memory it does not own or has already given up. NGINX has just broken that property, and the attacker has a lever.
Does the first request contain an RCE payload?
Not necessarily. This is an important distinction.
The attacker does not simply send a Linux command in the first request and wait for a second request to execute it. Instead, the specially crafted HTTP/2 traffic manipulates NGINX's connection-handling logic to trigger the UAF condition. Exploiting that memory corruption further requires additional techniques.
The research describes techniques such as memory disclosure and heap grooming, along with an ASLR bypass, to make exploitation reliable. The researchers demonstrated RCE in a laboratory environment.
Three of those terms deserve a plain explanation. Memory disclosure means getting the program to reveal the contents of its memory, which can leak addresses the attacker needs. Heap grooming means arranging the program's memory allocations in a deliberate order so that, when the freed chunk is reused, it is reused by something the attacker controls. ASLR is explained in the next section. None of these is a single magic request; they are the extra work that turns a crash into control.
In simple terms:
- The crafted HTTP/2 traffic triggers the vulnerable condition.
- The freed memory creates an opportunity for memory corruption.
- Further exploitation techniques can turn that corruption into control over execution.
- If successful, the attacker may execute code with the privileges of the NGINX worker process.
Privileges here means the permissions the worker process runs with. Code running as that process can do whatever that process is allowed to do, and no more.
6. What is the role of ASLR?
ASLR (Address Space Layout Randomization) is a security mechanism that randomizes where important parts of a program are placed in memory. This makes it harder for attackers to predict memory addresses.
A comparison helps. Imagine a burglar who has studied the plans of a building and knows exactly which room holds the safe. If the building is always laid out the same way, the plan is enough. If the rooms are shuffled every time the building is opened, the plan is useless until the burglar has a way of finding the safe again. ASLR shuffles the rooms.
For example:
Without ASLR:
Program code → 0x400000
With ASLR:
Program code → Randomized address
Line by line:
- Without ASLR. The program's code always lands at the same address, here written as 0x400000. The 0x prefix simply means the number is written in hexadecimal, a base-16 way of writing numbers that programmers use for memory addresses. An attacker who knows this can hard-code the address in their exploit.
- With ASLR. The address changes each time the program starts, so the attacker cannot hard-code it. They have to find it at runtime, which is exactly what a memory disclosure is for.
If an attacker does not know the relevant memory addresses, exploiting memory corruption to influence execution becomes more difficult. The CVE description specifically notes that code execution is possible when ASLR is disabled or when the attacker can bypass it. In other words, the bug is real either way, but turning it into running code is much easier when addresses are predictable.
7. What is the impact?
Successful exploitation may allow a remote attacker to:
- Execute arbitrary code with NGINX worker privileges.
- Disrupt services by crashing NGINX worker processes.
- Potentially access sensitive information or modify data within the worker's permissions.
The vulnerability does not require the backend application itself to contain a security flaw. The problem exists in NGINX's own HTTP/2 connection handling. That is worth pausing on: even a perfectly written backend can be exposed by a bug in the proxy in front of it, because the proxy is the part that touches the attacker's traffic first.
8. How can organizations protect themselves?
The recommended action is to update affected NGINX deployments to a fixed version.

These are the affected and fixed versions listed in F5's advisory. Always check the vendor advisory and your distribution's security notices because distributions may backport patches. A distribution is the packaged form of an operating system, such as the version a company installs on its servers, and it sometimes fixes a bug in its own build of a package without changing the upstream version number. Backporting means taking a fix from a newer release and applying it to an older one, so the version string alone does not always tell you whether you are safe.
If an immediate update is not possible, temporarily disabling HTTP/2 may reduce exposure. Test application compatibility before applying this mitigation. Disabling HTTP/2 may reduce exposure, but application compatibility should be tested before applying this mitigation.
Conclusion
CVE-2026-123633 demonstrates how a seemingly small memory-management mistake can become a serious security issue. The problem begins when NGINX frees connection memory while request-processing code still needs it. Memory reuse can then make the situation more dangerous, potentially allowing an attacker to corrupt memory and influence program execution.
The key lesson is that freeing memory is not enough; a program must also ensure that no active code continues using the released memory.
References
- Wiz Research, Unauthenticated Remote Code Execution in NGINX.
Glossary
- ASLR (Address Space Layout Randomization): a security feature that places parts of a program at random addresses in memory each time it runs, so attackers cannot predict them.
- Backend application: the program behind a proxy that does the real work of answering a request.
- Backport: applying a fix from a newer software release to an older one, so the version number may not show whether the fix is present.
- Connection: an open conversation between two computers over a network.
- CVE: a public identifier for a known security vulnerability, so people can refer to the same bug unambiguously.
- Dangling pointer: a pointer that still holds the address of memory that has already been freed.
- Denial of Service (DoS): making a service unavailable to its legitimate users, for example by crashing it.
- Distribution: a packaged form of an operating system, with its own builds of software and its own security notices.
- Execution flow: the order in which a program runs its instructions.
- Frame: one piece of an HTTP/2 request or response; HTTP/2 splits messages into frames.
- HEADERS frame: the HTTP/2 frame that carries a request's or response's headers.
- Heap grooming: deliberately arranging memory allocations so that a freed chunk is later reused by data the attacker controls.
- HTTP/2: a version of the protocol browsers and servers use to exchange requests and responses, allowing many requests to share one connection.
- Memory: the working space a program uses to hold data while it runs.
- Memory allocator: the part of a program or runtime that hands out chunks of memory and takes them back.
- Memory corruption: a state where a program's memory no longer holds what the program expects, so its logic misbehaves.
- Memory disclosure: getting a program to reveal the contents of its memory, often to learn addresses needed for an exploit.
- Memory reuse: the allocator giving a previously freed chunk of memory to a new allocation.
- Memory safety: the property of a program never touching memory it does not own or has already released.
- NGINX: a widely used web server and reverse proxy that can pass requests on to backend applications.
- Pointer: a value that records the address in memory where some data lives.
- Privileges: the permissions a running process has, which limit what code running inside it can do.
- Remote Code Execution (RCE): an attack in which someone elsewhere on the network makes a server run code of their choosing.
- Reverse proxy: a server that stands in front of other servers, receiving requests and forwarding them on.
- Stream: in HTTP/2, one request-and-response exchange running inside a shared connection.
- Upstream connection: a connection from a proxy such as NGINX to the backend server it forwards requests to.
- Use-After-Free (UAF): a bug where a program accesses memory after it has been freed.
- Worker process: one of the processes a server such as NGINX runs to handle connections and do the actual work.
worker_connections: the NGINX setting that limits how many connections each worker process may handle at once.