VOOZH about

URL: https://thenewstack.io/theres-a-nasty-security-hole-in-the-apache-webserver/

⇱ There's a Nasty Security Hole in the Apache Webserver - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2022-07-06 11:21:13
There's a Nasty Security Hole in the Apache Webserver
Networking / Open Source / Security

There’s a Nasty Security Hole in the Apache Webserver

There is a new Denial of Service (DoS) vulnerability in the Apache HTTP Server's mod_sed module known as CVE-2022-30522.
Jul 6th, 2022 11:21am by Steven J. Vaughan-Nichols
👁 Featued image for: There’s a Nasty Security Hole in the Apache Webserver
Featured image by mohamed Hassan from Pixabay.

Here a security hole, there a security hole, everywhere a security hole. One of the latest is an obnoxious one labeled CVE-2022-30522. This is a Denial of Service (DoS) attack in the Apache HTTP Server‘s mod_sed module.

Is that ringing faint bells? If so, that’s because we’ve been here before. In March 2022, CVE-2022-23943, an Apache memory corruption vulnerability in mod_sed, was uncovered. This one was an out-of-bounds Write vulnerability that enabled attackers to overwrite heap memory. When you say, “overwrite heap memory,” you know it’s bad news. This impacted the Apache HTTP Server 2.4 version 2.4.52 and earlier versions.

New Problems

It was quickly fixed. But, Brian Moussalli, the JFrog Security Research team’s Security Research Tech Lead, worried that while the Apache code “fix resolved the issue, it created a new unwanted behavior.” Moussalli was right.

It turned out that the patch opened a new mod_sed vulnerability. The good news is it only impacts Apache HTTPD 2.4.5. It’s invoked when a mod_sed filter is used for request or response editing.

Before going deeper into the bug, let’s do a quick refresher course on what mod_sed does. Essentially mod_sed enables you to use a steam editor, yes, the classic Unix sed, to manipulate input and output streams for server requests. As an input filter, it can be used on HTTP POST requests’ bodies, and as an output filter, it enables you to modify your server’s responses. In short, mod_sed can be very useful.

But, in this case, the latest vulnerability mishandles memory allocations while handling stream buffers. What happens is when the buffers reach a certain size, they are multiplied to avoid performing many calls to memory allocation functions. Sounds good, but when an attack forces too much data into them, the buffers exceed Apache’s memory limit. The result? The process aborts, and — pop! — you get a DoS.

Although Apache doesn’t think this bug is that big a deal.  They rank its severity as “low.” The National Vulnerability Database (NVD) disagrees. The NVD gives it a Common Vulnerability Scoring System (CVSS) score of 7.5 (high). JFrog puts it in the middle thanks to balancing its impact on the one hand and the relative rarity of the mod_sed install base on the other.

Update Now

Me? Anything that has the potential to be a real pain in the rump and is also an easy fix gets patched ASAP. Just update to Apache HTTPD 2.4.54 or above. Then you’ll never need to worry about it.

If, for some reason, you can’t patch it, you can also stop external attacks exploiting it by limiting the POST method’s body size so it can never be triggered. To do that, enter a LimitRequestBody configuration statement in the Apache HTTPD configuration file (/etc/httpd/conf/httpd. conf) to 2GBs or less.

For example:

LimitRequestBody 107374182

This would stop any body-size data above 1 GB from being accepted. This isn’t perfect, though. JFrog states this “mitigation only provides protection against a DoS caused by client requests, but still leaves the server vulnerable to DoS if mod_sed is used to modify web responses, and a response larger than 2GB is sent to the client.”

So again, the best thing to do is to patch your web server to 2.4.54 or above.

TRENDING STORIES
Steven J. Vaughan-Nichols, aka sjvn, has been writing about technology and the business of technology since CP/M-80 was the cutting-edge PC operating system, 300bps was a fast internet connection, WordStar was the state-of-the-art word processor, and we liked it.
Read more from Steven J. Vaughan-Nichols
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.