CVE-2024-52012: Solr core Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-4p5m-gvpf-f3x5
CWE-23
Published
Advisory Summary

CVE-2024-52012 is a MODERATE path traversal vulnerability (CWE-23: Relative Path Traversal) affecting Solr core libraries in the Maven ecosystem. The issue involves apache solr relative path traversal vulnerability. Remediation is available by upgrading affected packages to version 9.8.0.

CVE-2024-52012 at a Glance

CVE Identifier CVE-2024-52012
GHSA Identifier GHSA-4p5m-gvpf-f3x5
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-23: Relative Path Traversal
Affected Product Solr core
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2024-52012

To remediate this vulnerability, upgrade all affected Solr core 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.apache.solr:solr-core fixed: 9.8.0
<dependency>
    <groupId>org.apache.solr</groupId>
    <artifactId>solr-core</artifactId>
    <version>9.8.0</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.apache.solr

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.apache.solr

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

Note: The mvn dependency:tree -Dincludes=org.apache.solr 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-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In Solr core, 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

Relative Path Traversal vulnerability in Apache Solr. Solr instances running on Windows are vulnerable to arbitrary filepath write-access, due to a lack of input-sanitation in the "configset upload" API.  Commonly known as a "zipslip", maliciously constructed ZIP files can use relative filepaths to write data to unanticipated parts of the filesystem.   This issue affects Apache Solr: from 6.6 through 9.7.0. Users are recommended to upgrade to version 9.8.0, which fixes the issue.  Users unable to upgrade may also safely prevent the issue by using Solr's "Rule-Based Authentication Plugin" to restrict access to the configset upload API, so that it can only be accessed by a trusted set of administrators/users.

CVE-2024-52012 Affected Solr core Versions

1 component(s)
Fixed Versions:
9.8.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.solr:solr-core
Maven
≥ 6.6
< 9.8.0
9.8.0

References

Frequently Asked Questions

What is CVE-2024-52012?
CVE-2024-52012 is a security vulnerability in Solr core involving Apache Solr Relative Path Traversal vulnerability under CWE-23: Relative Path Traversal.
Which Solr core versions are affected?
Affected versions include releases prior to 9.8.0 across affected packages: org.apache.solr:solr-core.
What version fixes CVE-2024-52012?
Upgrading to 9.8.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is solr-core affected?
Yes, org.apache.solr:solr-core is affected in releases prior to 9.8.0. Upgrade your dependency to 9.8.0 or later.
What CWE is associated with CVE-2024-52012?
CVE-2024-52012 is classified under CWE-23: Relative Path Traversal (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.).
How can I check Maven dependencies for CVE-2024-52012?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.solr'. 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-4p5m-gvpf-f3x5",
  "modified" : "2025-01-27T17:22:43Z",
  "published" : "2025-01-27T09:30:35Z",
  "aliases" : [ "CVE-2024-52012" ],
  "summary" : "Apache Solr Relative Path Traversal vulnerability",
  "details" : "Relative Path Traversal vulnerability in Apache Solr.\n\nSolr instances running on Windows are vulnerable to arbitrary filepath write-access, due to a lack of input-sanitation in the \"configset upload\" API.  Commonly known as a \"zipslip\", maliciously constructed ZIP files can use relative filepaths to write data to unanticipated parts of the filesystem.  \nThis issue affects Apache Solr: from 6.6 through 9.7.0.\n\nUsers are recommended to upgrade to version 9.8.0, which fixes the issue.  Users unable to upgrade may also safely prevent the issue by using Solr's \"Rule-Based Authentication Plugin\" to restrict access to the configset upload API, so that it can only be accessed by a trusted set of administrators/users.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.solr:solr-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.6"
      }, {
        "fixed" : "9.8.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-52012"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/solr/commit/5795edd143b8fcb2ffaf7f278a099b8678adf396"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/solr"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/SOLR-17543"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/yp39pgbv4vf1746pf5yblz84lv30vfxd"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/01/26/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-23" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-27T17:22:43Z",
    "nvd_published_at" : "2025-01-27T09:15:14Z"
  }
}