CVE-2004-2381: Jetty Denial of Service Vulnerability
MODERATECVE-2004-2381 is a MODERATE denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Jetty libraries in the Maven ecosystem. The issue involves jetty http server denial of service vulnerability. Remediation is available by upgrading affected packages to version 4.2.19.
CVE-2004-2381 at a Glance
How to Fix CVE-2004-2381
To remediate this vulnerability, upgrade all affected Jetty dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>4.2.19</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.mortbay.jetty
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2004-2381, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.mortbay.jetty
Analyze the terminal output to locate any version of Jetty in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.2.19), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.mortbay.jetty command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Jetty, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2004-2381 Affected Jetty Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.mortbay.jetty:jetty
|
Maven |
< 4.2.19
|
4.2.19
|
References
Frequently Asked Questions
What is CVE-2004-2381?
Which Jetty versions are affected?
What version fixes CVE-2004-2381?
Is jetty affected?
What CWE is associated with CVE-2004-2381?
How can I check Maven dependencies for CVE-2004-2381?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-p5rr-q5g6-gm42",
"modified" : "2023-09-18T22:57:43Z",
"published" : "2022-04-29T03:01:19Z",
"aliases" : [ "CVE-2004-2381" ],
"summary" : "Jetty HTTP Server Denial of Service vulnerability",
"details" : "HttpRequest.java in Jetty HTTP Server before 4.2.19 allows remote attackers to cause denial of service (memory usage and application crash) via HTTP requests with a large Content-Length.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.mortbay.jetty:jetty"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.2.19"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2004-2381"
}, {
"type" : "WEB",
"url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/15537"
}, {
"type" : "WEB",
"url" : "http://cvs.sourceforge.net/viewcvs.py/jetty/Jetty/src/org/mortbay/http/HttpRequest.java?r1=1.75&r2=1.76"
}, {
"type" : "WEB",
"url" : "http://sourceforge.net/project/shownotes.php?release_id=224743"
}, {
"type" : "WEB",
"url" : "http://www.osvdb.org/4387"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-09-18T22:57:43Z",
"nvd_published_at" : "2004-12-31T05:00:00Z"
}
}