Apache HTTP/2 Flaw Sat in Web Servers Since 2023 and Ubuntu's Version Numbers Hid It

Ethical Hacking Complete Course Zero to Expert
Hack like black hat hackers. Penetration testing, Kali Linux, WiFi and web hacking, and the hacker mindset behind it.
→ Take the full courseAbout 1.5 million web servers run an Apache version that can let an attacker run code without logging in. Switching on HTTP/2 is enough. One line in its HTTP/2 code has written to the wrong memory since 2023.
Apache HTTP Server runs 20.6 percent of the websites whose web server is known, according to the daily count of W3Techs. The scanning company Censys counts about 166 million web addresses running on it, each a name or IP address with a port. On November 11, the Apache project published an advisory for CVE-2026-119618, the public ID for a flaw in mod_http2, the module that lets Apache speak HTTP/2, and gave it the highest rating it has, critical. The title of the advisory says what it does: heap corruption and remote code execution, in a function called assign_headers().
Remote code execution means that someone on the other side of the internet can make the server run commands of their choosing. For this flaw, an attacker needs nothing more than a server that speaks HTTP/2 and a way to reach it, which for a public website is the reason it exists.
The same scanning company found roughly 1.5 million hosts that announce an Apache version from 2.4.55 to 2.4.70, the range Apache lists as affected. It can read a version on only about 40 percent of the hosts running Apache, so that count only covers the servers that say what they run. About 40 percent of those affected hosts sit in five cloud and hosting networks: Amazon, Google, Hetzner, OVH and DigitalOcean, the places where many websites rent the server they run on.
With the older HTTP/1.1, a browser sends one request at a time over a connection and waits for the answer before it sends the next. HTTP/2 lets the browser send many requests over the same connection at once, each in its own numbered stream, so a page with fifty images does not have to fetch them one after the other. Apache handles that by handing the streams of one connection to several separate lines of work inside the same server process, which run side by side. Those are called worker threads.
A request starts with a few lines that tell the server what the browser wants, such as Host, Content-Type and Content-Length. Those lines are the headers. When a request arrives over HTTP/2, mod_http2 reads them and stores them in a table that belongs to that stream. The worker thread that picks up the request then makes its own copy of that table, and from that moment on the request is supposed to work on the copy.
Inside assign_headers() sits a small rule for one specific case. When a request says it has no body, but does carry a Content-Type header and no Content-Length, Apache adds a Content-Length of zero, so the rest of the server knows that no data will follow. The comment in the source code says exactly that. In Apache 2.4.55 through 2.4.70, the line that adds it writes into the original table instead of the copy:
| |
That original lives in memory that the connection manages. As long as the table has room, the extra header fits in. When the table is full and has to grow, the worker thread takes new memory from the connection while other threads of the same connection are busy with their own streams. Nothing makes them wait for each other.
Red Hat, which ships Apache in its own Linux distribution, describes the result as one thread modifying memory that belongs to another thread. When two threads touch the same memory without taking turns, the outcome depends on which one gets there first, and that is called a race condition. Here the race damages the pool of memory the server hands out to itself while it runs, known as the heap. Apache’s advisory says that damage can lead to remote code execution.
The correction the Apache developers wrote changes that one line and nothing else in the file. The value now goes into the request’s own copy, where only that worker thread touches it:
| |
A small program on GitHub triggers the flaw from outside. That kind of program is called a proof of concept, and this one sends an HTTP/2 request that ends right after its headers, with a Content-Type and without a Content-Length. It fills the header table to its limit with 79 ordinary headers plus Host. In the author’s lab, Apache 2.4.70 crashes, and the memory checkers that developers use to catch these errors report corruption. The proof of concept does not show code running.
Red Hat’s page for the CVE says that public research has shown a reliable working attack on a server in its default setup with the HTTP/2 module switched on. Its security bulletin adds that an attacker can trigger the problem reliably with a carefully built series of HTTP/2 requests sent at the same time. Neither page names that research.
The first version with the flaw is Apache 2.4.55, released in January 2023, and the last one is 2.4.70. For the standalone version of the module, distributed separately as mod_h2, Apache lists 2.0.8 through 2.0.42. A server that kept Apache up to date since early 2023 has been carrying the flaw for close to four years.
This is the fifth HTTP/2 flaw on Apache’s list for 2026, and the first one Apache rates critical. The most serious before it was CVE-2026-23918 in May, rated important: a flaw where the server releases the same piece of memory twice, called a double free, with possible remote code execution.
Two teams found this flaw separately. The first report came on October 26 from Anthropic’s OSS Scanner, an opt-in scanner for open-source projects that the company launched on October 8. An AI model writes its reports, and no person checks them before they go out. Apache credits the scanner under the ID ANT-2026-MAPKT6MZ. Eight days later, on November 3, Anthony Weems and Simon Scannell of Google Cloud Vulnerability Research reported the same flaw. Apache published its advisory on November 11.
The flaw sits in the HTTP/2 module, so it only reaches servers where HTTP/2 is switched on, through h2 or h2c in a setting called Protocols. Servers that only speak HTTP/1.1 are not affected. In Apache’s own documentation, the default for that setting is Protocols http/1.1, so HTTP/2 stays off until an administrator turns it on.
On Debian, turning it on takes one command, sudo a2enmod http2. The configuration file that comes with the module starts with the line Protocols h2 h2c http/1.1. That switches on HTTP/2 over an encrypted connection (TLS), which is h2, and also h2c, which is HTTP/2 over a connection without encryption. Apache’s documentation explains that a site inherits this line from the main server configuration unless it sets a Protocols line of its own. On a fresh Debian install the module is off, so on Debian HTTP/2 is a choice the administrator made, with that one command.
Ubuntu 22.04 runs Apache 2.4.52, and Ubuntu 20.04 runs 2.4.41. Both numbers are older than 2.4.55, the first version Apache lists as affected. Both releases had the flaw anyway, and Ubuntu’s page for this CVE lists a fix for both and gives the reason. Ubuntu copied newer versions of the HTTP/2 module into the older Apache package of its stable releases, which is called backporting. The Apache version number stayed old, while the HTTP/2 code inside it was newer, including the broken line. The version number gave no warning.
An administrator who runs apache2 -v on such a server sees 2.4.52 and finds it below the affected range. Internet scans that sort servers by the version they announce make the same call. An Ubuntu 22.04 server with HTTP/2 switched on does not fall in the range from 2.4.55 to 2.4.70, so it is not in that count of 1.5 million either. Ubuntu 18.04 and older are not affected, according to the same page.
The severity score depends on who gives it. Red Hat gives the flaw 9.8 out of 10 on the CVSS scale. That score describes an attack over the network that works without an account or a click from a person on the server, and that is easy to carry out. Apache rates the flaw with a word, critical. The score that CISA, the US cybersecurity agency, added to the official CVE record is 8.1. The difference comes down to one field, the attack complexity, which is set to high in the CISA score. A race condition depends on timing, and getting the timing right takes attempts.
Red Hat makes the same distinction for its own systems. It rates the flaw Critical overall, but Important, one step lower, for Red Hat Enterprise Linux 9 and 10. On those versions each HTTP/2 stream gets its own part of the program that hands out memory, called a memory allocator, and that makes the flaw harder to exploit. Red Hat Enterprise Linux 8 and older are not affected, and the company notes that HTTP/2 module versions before 2.0.8 do not contain the code with the flaw.
On November 13, the same US agency added its own assessment to the CVE record: no exploitation seen, and not automatable, meaning the attack cannot be reliably run by a script from start to finish.
Apache released version 2.4.71 on November 11, with the corrected line. A day later, the scanning company found 2.4.71 on only about 2,000 hosts. That number says less than it seems, for the same reason as the Ubuntu version numbers. Linux distributions put the fix into their own packages and keep their own version numbers, so a patched Ubuntu or Red Hat server does not announce 2.4.71.
Where the distributions stood when this was written:
- โ Ubuntu published its security notice on November 12, with fixes for 20.04 through 26.10. Ubuntu 20.04 gets its fix through Ubuntu Pro, the paid subscription
- โ The fixed Ubuntu package is 2.4.52-1ubuntu4.27 on 22.04, 2.4.58-1ubuntu8.19 on 24.04 and 2.4.66-2ubuntu2.8 on 26.04
- โ - โ Debian fixed version 12 (bookworm) with 2.4.71-1
deb12u1, version 13 (trixie) with 2.4.71-1deb13u1, and testing (forky) with 2.4.71-1 - โ Red Hat shipped its first fixes on November 11, the day of Apache’s release, and by November 12 had fixes out for most affected products, with the rest still in progress
- โ Amazon Linux 2 and Amazon Linux 2023 were fixed on November 12
Administrators who built the standalone mod_h2 themselves are in a different position. Its repository has been archived since June 9, 2026, and its last release is 2.0.42, the last version Apache lists as affected. The corrected code only exists in Apache 2.4.71.
On Debian or Ubuntu, the first command below shows whether the HTTP/2 module is loaded, the second shows where Protocols is set, and the third shows the installed package version, to compare with the list above:
| |
On Red Hat Enterprise Linux and related systems, the company’s bulletin gives these checks. If the first line of the curl answer starts with HTTP/2, the server speaks HTTP/2:
| |
For a server that cannot take the update yet, the same bulletin gives a way to switch HTTP/2 off. Set the Protocols line to HTTP/1.1 only, in /etc/httpd/conf/httpd.conf or the file in /etc/httpd/conf.d/ where it is set, and restart the server:
| |
On Debian or Ubuntu, switching the module off does the same, and it also removes the Protocols line that came with it:
| |
A Protocols line elsewhere that still names h2 does no harm once the module is off, because Apache ignores protocols it cannot provide. Visitors then connect over HTTP/1.1, and the update itself remains the fix.
Run nmap -sV against a server you own and compare the Apache version it announces with the package that is actually installed on it.
My Ethical Hacking Complete Course Zero to Expert takes you there step by step: reconnaissance, scanning, exploitation and traffic analysis, hands-on, from your first day with no Linux or hacking background.
โ Join my complete ethical hacking course
Hacking is not a hobby but a way of life.
Sources:
Apache HTTP Server security advisory | Red Hat CVE-2026-119618 | Ubuntu CVE-2026-119618
Stay updated
Get the latest posts in your inbox every week. Ethical hacking, security news, tutorials, and everything that catches my attention. If that sounds useful, drop your email below.