CVE-2023-34034: Spring Framework Access Control Bypass Vulnerability

CRITICAL
Advisory Identifier: GHSA-3h6f-g5f3-gc4w
CVSS 9.1
CWE-284 CWE-281
Published
Advisory Summary

CVE-2023-34034 is a CRITICAL (CVSS 9.1) access control bypass vulnerability (CWE-284: Improper Access Control) affecting Spring Framework libraries in the Maven ecosystem. The issue involves access control bypass in spring security. Remediation is available by upgrading affected packages to version 5.6.12, 5.7.10, 5.8.5, 6.0.5, 6.1.2.

CVE-2023-34034 at a Glance

CVE Identifier CVE-2023-34034
GHSA Identifier GHSA-3h6f-g5f3-gc4w
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-284: Improper Access Control
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-2023-34034

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-config fixed: 5.6.12
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-config</artifactId>
    <version>5.6.12</version>
</dependency>
org.springframework.security:spring-security-config fixed: 5.7.10
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-config</artifactId>
    <version>5.7.10</version>
</dependency>
org.springframework.security:spring-security-config fixed: 5.8.5
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-config</artifactId>
    <version>5.8.5</version>
</dependency>
org.springframework.security:spring-security-config fixed: 6.0.5
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-config</artifactId>
    <version>6.0.5</version>
</dependency>
org.springframework.security:spring-security-config fixed: 6.1.2
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-config</artifactId>
    <version>6.1.2</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-2023-34034, 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 5.6.12), 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-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. 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

Using "**" as a pattern in Spring Security configuration for WebFlux creates a mismatch in pattern matching between Spring Security and Spring WebFlux, and the potential for a security bypass.

CVE-2023-34034 Affected Spring Framework Versions

5 component(s)
Fixed Versions:
5.6.125.7.105.8.56.0.56.1.2
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework.security:spring-security-config
Maven
≥ 5.6.0
< 5.6.12
5.6.12
org.springframework.security:spring-security-config
Maven
≥ 5.7.0
< 5.7.10
5.7.10
org.springframework.security:spring-security-config
Maven
≥ 5.8.0
< 5.8.5
5.8.5
org.springframework.security:spring-security-config
Maven
≥ 6.0.0
< 6.0.5
6.0.5
org.springframework.security:spring-security-config
Maven
≥ 6.1.0
< 6.1.2
6.1.2

References

Frequently Asked Questions

What is CVE-2023-34034?
CVE-2023-34034 is a security vulnerability in Spring Framework involving Access Control Bypass in Spring Security under CWE-284: Improper Access Control.
Which Spring Framework versions are affected?
Affected versions include releases prior to 5.6.12, 5.7.10, 5.8.5, 6.0.5, 6.1.2 across affected packages: org.springframework.security:spring-security-config.
What version fixes CVE-2023-34034?
Upgrading to 5.6.12, 5.7.10, 5.8.5, 6.0.5, 6.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-security-config affected?
Yes, org.springframework.security:spring-security-config is affected in releases prior to 5.6.12, 5.7.10, 5.8.5, 6.0.5, 6.1.2. Upgrade your dependency to 5.6.12, 5.7.10, 5.8.5, 6.0.5, 6.1.2 or later.
What is the CVSS score of CVE-2023-34034?
CVE-2023-34034 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-2023-34034?
CVE-2023-34034 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check Maven dependencies for CVE-2023-34034?
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-3h6f-g5f3-gc4w",
  "modified" : "2024-10-28T19:30:27Z",
  "published" : "2023-07-19T15:30:26Z",
  "aliases" : [ "CVE-2023-34034" ],
  "summary" : "Access Control Bypass in Spring Security",
  "details" : "Using \"**\" as a pattern in Spring Security configuration for WebFlux creates a mismatch in pattern matching between Spring Security and Spring WebFlux, and the potential for a security bypass.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-config"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.6.0"
      }, {
        "fixed" : "5.6.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-config"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.7.0"
      }, {
        "fixed" : "5.7.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-config"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.8.0"
      }, {
        "fixed" : "5.8.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-config"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.0.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.security:spring-security-config"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.1.0"
      }, {
        "fixed" : "6.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-34034"
  }, {
    "type" : "WEB",
    "url" : "https://ossindex.sonatype.org/vulnerability/CVE-2023-34034"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20230814-0008"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORKSECURITY-5777893"
  }, {
    "type" : "WEB",
    "url" : "https://spring.io/security/cve-2023-34034"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-281", "CWE-284" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-31T21:19:15Z",
    "nvd_published_at" : "2023-07-19T15:15:11Z"
  }
}