Skip to content
DoS Write-up Intermediate

CVE-2022-30522 – Denial of Service (DoS) Vulnerability in Apache httpd “mod_sed” filter

A flaw in the mod_sed filter of Apache httpd 2.4.53 caused buffer growth logic to request an allocation larger than the allocator supports when handling very large request or response bodies. An attacker could send 2GB or more of data to a sed-filtered endpoint and crash handler processes, causing a denial of service.

JFrogSecurity Follow

Published on jfrog.com

This past March we posted an analysis of a vulnerability in the Apache HTTP Server modsed filter module, CVE-2022-23943, in which a Denial of Service (DoS) can be triggered due to a miscalculation of buffers’ sizes.

JFrog Security Research Team (@JFrogSecurity), on jfrog.com

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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the buffer-doubling optimisation in grow_buffer multiplies the size past the allocator's 32-bit limit, so the allocation fails and the process aborts.

Impact

A single large request causes a short downtime for one server process, and repeated requests could take the whole server offline; the same crash also applies when mod_sed filters responses of 2GB or more.

What the attacker needed

Mod_sed configured as a filter; attacker can send large request bodies; 2GB or more of data per request

The fix

It was fixed in Apache httpd 2.4.54, and a patch is available for those who cannot upgrade.

How it was found

  1. Configure mod_sed as an input filter on a route with a non-empty sed pattern.
  2. Send a POST request whose body is 2GB or more to that endpoint.
  3. Observe the handler process abort due to out-of-memory.
  4. Repeat the requests to crash all handler processes and take the server down.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Apache httpd is a web server, and mod_sed is an optional add-on that rewrites incoming or outgoing data, like a find-and-replace tool. When it received a very large chunk of data, it tried to double its working memory and asked for more than the system allows, so the process crashed. Repeated crashes take the site offline, which is called a denial of service.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by JFrogSecurity

View all

3 more disclosed reports, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.