CVE-2004-2381: Jetty HTTP Server Denial of Service vulnerability

org.mortbay.jetty:jetty Updated 02 Oct 2025

Summary

29/04/2022
Yes i
Moderate
Not published

CVE-2004-2381: Jetty HTTP Server Denial of Service vulnerability. Affects org.mortbay.jetty:jetty versions < 4.2.19. Fixed in 4.2.19. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Jetty HTTP Server is a popular open-source web server and servlet container. It is widely used for hosting Java web applications and provides a lightweight and scalable solution for serving HTTP requests. The vulnerability identified as CVE-2004-2381 affects versions of Jetty HTTP Server prior to 4.2.19. This vulnerability allows remote attackers to cause a denial of service (DoS) by sending HTTP requests with a large Content-Length header. The excessive memory usage caused by these requests can lead to application crashes and service disruption.

Vulnerability Detail

The vulnerability arises from a flaw in the HttpRequest.java file of the Jetty HTTP Server. By sending HTTP requests with a large Content-Length header, an attacker can exploit this flaw to consume excessive memory resources on the server. As a result, the server may become unresponsive, leading to a denial of service condition. This vulnerability has a moderate severity rating and can potentially impact the availability and stability of affected Jetty HTTP Server instances.

How To Fix

Minimum fixed version

4.2.19

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version of Jetty HTTP Server is not immediately feasible, a temporary workaround can be implemented to mitigate the risk. This workaround involves implementing rate limiting or request size restrictions at the network or application layer to prevent the processing of excessively large requests. By limiting the size of incoming requests, the impact of the vulnerability can be reduced until a permanent fix is applied.

Conclusion

The CVE-2004-2381 vulnerability in Jetty HTTP Server poses a risk of denial of service attacks through the exploitation of a memory consumption issue. To mitigate this vulnerability, it is crucial to upgrade to Jetty HTTP Server version 4.2.19 or later. Implementing rate limiting or request size restrictions can serve as a temporary workaround until the upgrade is performed. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.mortbay.jetty:jetty →

Share this vulnerability

FAQ

The vulnerability allows remote attackers to cause a denial of service by sending HTTP requests with a large Content-Length header. This can lead to excessive memory usage and application crashes, resulting in service disruption and unavailability.

Versions of Jetty HTTP Server prior to 4.2.19 are affected by this vulnerability.

While specific exploits for this vulnerability may exist, they have not been disclosed publicly at the time of this report. However, it is advisable to apply the recommended fixes and security patches to mitigate the risk.

Yes, implementing rate limiting or request size restrictions at the network or application layer can help mitigate the risk until a permanent fix is applied.

Related vulnerabilities

Recent vulnerabilities recorded for org.mortbay.jetty:jetty.

How To Fix

Minimum fixed version

4.2.19

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback