CVE-2023-46749: Shiro core Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-jc7h-c423-mpjc
CVSS 6.5
CWE-22
Published
Advisory Summary

CVE-2023-46749 is a MODERATE (CVSS 6.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Shiro core libraries in the Maven ecosystem. The issue involves apache shiro vulnerable to path traversal. Remediation is available by upgrading affected packages to version 1.13.0, 2.0.0-alpha4.

CVE-2023-46749 at a Glance

CVE Identifier CVE-2023-46749
GHSA Identifier GHSA-jc7h-c423-mpjc
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Shiro core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.5

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

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

How to Fix CVE-2023-46749

To remediate this vulnerability, upgrade all affected Shiro 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.shiro:shiro-core fixed: 1.13.0
<dependency>
    <groupId>org.apache.shiro</groupId>
    <artifactId>shiro-core</artifactId>
    <version>1.13.0</version>
</dependency>
org.apache.shiro:shiro-core fixed: 2.0.0-alpha4
<dependency>
    <groupId>org.apache.shiro</groupId>
    <artifactId>shiro-core</artifactId>
    <version>2.0.0-alpha4</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.shiro

How to Check if You Are Affected

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

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

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

Note: The mvn dependency:tree -Dincludes=org.apache.shiro 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Shiro 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

Apache Shiro before 1.130 or 2.0.0-alpha-4, may be susceptible to a path traversal attack that results in an authentication bypass when used together with path rewriting Mitigation: Update to Apache Shiro 1.13.0+ or 2.0.0-alpha-4+, or ensure `blockSemicolon` is enabled (this is the default).

CVE-2023-46749 Affected Shiro core Versions

2 component(s)
Fixed Versions:
1.13.02.0.0-alpha4
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.shiro:shiro-core
Maven
< 1.13.0
1.13.0
org.apache.shiro:shiro-core
Maven
≥ 2.0.0alpha1
< 2.0.0-alpha4
2.0.0-alpha4

References

Frequently Asked Questions

What is CVE-2023-46749?
CVE-2023-46749 is a security vulnerability in Shiro core involving Apache Shiro vulnerable to path traversal under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Shiro core versions are affected?
Affected versions include releases prior to 1.13.0, 2.0.0-alpha4 across affected packages: org.apache.shiro:shiro-core.
What version fixes CVE-2023-46749?
Upgrading to 1.13.0, 2.0.0-alpha4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is shiro-core affected?
Yes, org.apache.shiro:shiro-core is affected in releases prior to 1.13.0, 2.0.0-alpha4. Upgrade your dependency to 1.13.0, 2.0.0-alpha4 or later.
What is the CVSS score of CVE-2023-46749?
CVE-2023-46749 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2023-46749?
CVE-2023-46749 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check Maven dependencies for CVE-2023-46749?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.shiro'. 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-jc7h-c423-mpjc",
  "modified" : "2025-11-04T16:49:23Z",
  "published" : "2024-01-15T12:30:19Z",
  "aliases" : [ "CVE-2023-46749" ],
  "summary" : "Apache Shiro vulnerable to path traversal",
  "details" : "Apache Shiro before 1.130 or 2.0.0-alpha-4, may be susceptible to a path traversal attack that results in an authentication bypass when used together with path rewriting \n\nMitigation: Update to Apache Shiro 1.13.0+ or 2.0.0-alpha-4+, or ensure `blockSemicolon` is enabled (this is the default).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.shiro:shiro-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.13.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.shiro:shiro-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0alpha1"
      }, {
        "fixed" : "2.0.0-alpha4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 2.0.0alpha4"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-46749"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/mdv7ftz7k4488rzloxo2fb0p9shnp9wm"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20241108-0002"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-16T20:34:50Z",
    "nvd_published_at" : "2024-01-15T10:15:26Z"
  }
}