Denial of Service Vulnerability in libspring-java: ETag Header Parsing Flaw

libspring-java Updated 02 Oct 2025

Summary

27/09/2024
N/A
No i
Unrated
Not published

CVE-2024-38809: Applications that parse ETags from "If-Match" or "If-None-Match" request headers are vulnerable to DoS attack. Affects libspring-java versions 4.3.30-1 – 4.3.30-3. No fix is published. 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

libspring-java is a library used in Java applications to facilitate the development of web applications. It provides essential features for building robust and scalable applications. However, certain versions of this library are vulnerable to a Denial of Service (DoS) attack due to improper handling of ETags in 'If-Match' and 'If-None-Match' request headers.

Vulnerability Detail

The vulnerability arises from the way applications parse ETags from the 'If-Match' or 'If-None-Match' request headers. Attackers can exploit this flaw by sending specially crafted requests that cause the application to consume excessive resources, leading to a Denial of Service. This can result in application downtime, affecting availability and user experience. The vulnerability is present in all versions of libspring-java, making it critical for users to address it promptly.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

For users of older, unsupported versions, a temporary workaround is to enforce a size limit on the 'If-Match' and 'If-None-Match' headers. This can be implemented through a Filter in your application. Here is a sample code snippet in Java:

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

public class ETagSizeLimitFilter implements Filter { private static final int MAX_HEADER_SIZE = 1024; // Set your size limit here

@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        if (request instanceof HttpServletRequest) {
        HttpServletRequest httpRequest = (HttpServletRequest) request;
        String ifMatch = 
httpRequest.getHeader("If-Match");
        String ifNoneMatch = 
httpRequest.getHeader("If-None-Match");

if ((ifMatch != null && ifMatch.length() > MAX_HEADER_SIZE) || (ifNoneMatch != null && ifNoneMatch.length() > MAX_HEADER_SIZE)) {
                throw new ServletException("ETag header size exceeds limit");
            }
        }
        chain.doFilter(request, response);
    }
@Override
public void init(FilterConfig filterConfig) throws ServletException {}

@Override
public void destroy() {}
}

Conclusion

The CVE-2024-38809 vulnerability in libspring-java poses a significant risk of Denial of Service attacks due to improper handling of ETags. Users are strongly encouraged to upgrade to the latest version or implement the suggested workaround to mitigate the risk. Monitoring tools like Vulert can assist in identifying vulnerabilities in your applications.

See every vulnerability recorded for libspring-java →

Share this vulnerability

FAQ

CVE-2024-38809 is a vulnerability in libspring-java that allows for Denial of Service attacks through improper parsing of ETags in request headers.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The vulnerability can lead to application downtime and degraded user experience due to excessive resource consumption.

Yes, the permanent fix is to upgrade to the latest version of libspring-java that addresses this vulnerability.

If upgrading is not possible, you can implement a workaround by enforcing a size limit on the 'If-Match' and 'If-None-Match' headers in your application.

Related vulnerabilities

Recent vulnerabilities recorded for libspring-java.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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