Vulnerabilities in pkg:maven/org.springframework.security/spring-security-web

PACKAGE
Advisory Identifier: GHSA-c4q5-6c82-3qpw
Advisory Summary

CVE-2024-38821 is a CRITICAL (CVSS 9.1) remote code execution vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring security vulnerable to authorization bypass of static resources in webflux applications. Remediation is available by upgrading affected packages to version 6.3.4, 5.7.13, 5.8.15, 6.2.7, 6.0.13, 6.1.11.

7 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.springframework.security/spring-security-web

7 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.springframework.security/spring-security-web. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-c4q5-6c82-3qpw CVE-2024-38821 CRITICAL Spring Security vulnerable to Authorization Bypass of Static Resources in WebFlux Applications
GHSA-x2r2-rvhq-2mqv CVE-2026-41706 MODERATE Spring Security: Open Redirect via Unvalidated Post-Login Redirect URL Stored in CookieRequestCache
GHSA-293q-567p-wmwq CVE-2026-47838 MODERATE Spring Security Vulnerable to Unauthorized User Impersonation when Using X.509 Client Certificates
GHSA-2jrg-rf5x-568g CVE-2026-22747 MODERATE Spring Security Vulnerable to Unauthorized User Impersonation when Using X.509 Client Certificates
GHSA-mf92-479x-3373 CVE-2026-22732 CRITICAL Spring Security HTTP Headers Are not Written Under Some Conditions
GHSA-hh32-7344-cg2f CVE-2022-22978 CRITICAL Authorization bypass in Spring Security
GHSA-gq28-h5vg-8prx CVE-2021-22112 HIGH Privilege escalation in spring security

CVE-2024-38821 at a Glance

CVE Identifier CVE-2024-38821
GHSA Identifier GHSA-c4q5-6c82-3qpw
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-38821

To remediate this vulnerability, upgrade all affected Spring Framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.springframework.security:spring-security-web fixed: 6.3.4
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-web</artifactId>
    <version>6.3.4</version>
</dependency>
org.springframework.security:spring-security-web fixed: 5.7.13
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-web</artifactId>
    <version>5.7.13</version>
</dependency>
org.springframework.security:spring-security-web fixed: 5.8.15
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-web</artifactId>
    <version>5.8.15</version>
</dependency>
org.springframework.security:spring-security-web fixed: 6.2.7
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-web</artifactId>
    <version>6.2.7</version>
</dependency>
org.springframework.security:spring-security-web fixed: 6.0.13
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-web</artifactId>
    <version>6.0.13</version>
</dependency>
org.springframework.security:spring-security-web fixed: 6.1.11
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-web</artifactId>
    <version>6.1.11</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.springframework.security

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2024-38821, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.springframework.security

Analyze the terminal output to locate any version of Spring Framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.3.4), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.springframework.security 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-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Spring Framework, 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

Spring WebFlux applications that have Spring Security authorization rules on static resources can be bypassed under certain circumstances. For this to impact an application, all of the following must be true: * It must be a WebFlux application * It must be using Spring's static resources support * It must have a non-permitAll authorization rule applied to the static resources support

CVE-2024-38821 Affected Spring Framework Versions

6 component(s)
Fixed Versions:
6.3.45.7.135.8.156.2.76.0.136.1.11
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework.security:spring-security-web
Maven
≥ 6.3.0
< 6.3.4
6.3.4
org.springframework.security:spring-security-web
Maven
≥ 5.0.0
< 5.7.13
5.7.13
org.springframework.security:spring-security-web
Maven
≥ 5.8.0
< 5.8.15
5.8.15
org.springframework.security:spring-security-web
Maven
≥ 6.2.0
< 6.2.7
6.2.7
org.springframework.security:spring-security-web
Maven
≥ 6.0.0
< 6.0.13
6.0.13
org.springframework.security:spring-security-web
Maven
≥ 6.1.0
< 6.1.11
6.1.11

References

Frequently Asked Questions

What is CVE-2024-38821?
CVE-2024-38821 is a security vulnerability in Spring Framework involving Spring Security vulnerable to Authorization Bypass of Static Resources in WebFlux Applications under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Spring Framework versions are affected?
Affected versions include releases prior to 6.3.4, 5.7.13, 5.8.15, 6.2.7, 6.0.13, 6.1.11 across affected packages: org.springframework.security:spring-security-web.
What version fixes CVE-2024-38821?
Upgrading to 6.3.4, 5.7.13, 5.8.15, 6.2.7, 6.0.13, 6.1.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-security-web affected?
Yes, org.springframework.security:spring-security-web is affected in releases prior to 6.3.4, 5.7.13, 5.8.15, 6.2.7, 6.0.13, 6.1.11. Upgrade your dependency to 6.3.4, 5.7.13, 5.8.15, 6.2.7, 6.0.13, 6.1.11 or later.
What is the CVSS score of CVE-2024-38821?
CVE-2024-38821 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2024-38821?
CVE-2024-38821 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check Maven dependencies for CVE-2024-38821?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework.security'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-c4q5-6c82-3qpw",
  "modified" : "2026-08-31T22:45:15Z",
  "published" : "2024-10-28T09:30:53Z",
  "aliases" : [ "CVE-2024-38821" ],
  "summary" : "Spring Security vulnerable to Authorization Bypass of Static Resources in WebFlux Applications",
  "details" : "Spring WebFlux applications that have Spring Security authorization rules on static resources can be bypassed under certain circumstances.\n\nFor this to impact an application, all of the following must be true:\n\n  *  It must be a WebFlux application\n  *  It must be using Spring's static resources support\n  *  It must have a non-permitAll authorization rule applied to the static resources support",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-web"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.7.13"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-web"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.8.0"
      }, {
        "fixed" : "5.8.15"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-web"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.2.0"
      }, {
        "fixed" : "6.2.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-web"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.0.13"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-web"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.1.0"
      }, {
        "fixed" : "6.1.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-web"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.3.0"
      }, {
        "fixed" : "6.3.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-38821"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-security/commit/0e257b56ce35402558a260ffa6b368982f9a7934"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-security/commit/4ce7cde15599c0447163fd46bac616e03318bf5b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-security/commit/b4f27777556c157ec5689c0769322c90be984514"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-projects/spring-security"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20250124-0006"
  }, {
    "type" : "WEB",
    "url" : "https://spring.io/security/cve-2024-38821"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285", "CWE-770" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-28T15:19:32Z",
    "nvd_published_at" : "2024-10-28T07:15:07Z"
  }
}