CVE-2023-25141: Org.apache.sling.jcr.base Command Injection Vulnerability
HIGHCVE-2023-25141 is a HIGH (CVSS 7.5) command injection vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Org.apache.sling.jcr.base libraries in the Maven ecosystem. The issue involves command injection in apache sling. Remediation is available by upgrading affected packages to version 3.1.12.
CVE-2023-25141 at a Glance
Security Impact
CVSS: 7.5
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:N/A:N).
How to Fix CVE-2023-25141
To remediate this vulnerability, upgrade all affected Org.apache.sling.jcr.base dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.jcr.base</artifactId>
<version>3.1.12</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.sling
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2023-25141, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.sling
Analyze the terminal output to locate any version of Org.apache.sling.jcr.base in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.12), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.sling 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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Org.apache.sling.jcr.base, 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
CVE-2023-25141 Affected Org.apache.sling.jcr.base Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.sling:org.apache.sling.jcr.base
|
Maven |
< 3.1.12
|
3.1.12
|
References
Frequently Asked Questions
What is CVE-2023-25141?
Which Org.apache.sling.jcr.base versions are affected?
What version fixes CVE-2023-25141?
Is org.apache.sling.jcr.base affected?
What is the CVSS score of CVE-2023-25141?
What CWE is associated with CVE-2023-25141?
How can I check Maven dependencies for CVE-2023-25141?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gvg3-83q4-rfhq",
"modified" : "2023-02-22T22:17:59Z",
"published" : "2023-02-14T15:30:28Z",
"aliases" : [ "CVE-2023-25141" ],
"summary" : "Command injection in Apache Sling",
"details" : "Apache Sling JCR Base < 3.1.12 has a critical injection vulnerability when running on old JDK versions (JDK 1.8.191 or earlier) through utility functions in RepositoryAccessor. The functions getRepository and getRepositoryFromURL allow an application to access data stored in a remote location via JDNI and RMI. Users of Apache Sling JCR Base are recommended to upgrade to Apache Sling JCR Base 3.1.12 or later, or to run on a more recent JDK.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.sling:org.apache.sling.jcr.base"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.12"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-25141"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/sling-org-apache-sling-jcr-base/commit/6ed0a030fd5f13774aff0073c55cbe3ace0153cb"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/sling-org-apache-sling-jcr-base/commit/779d8a7dd0437a4f31de02c0d995afcf83b9904b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/sling-org-apache-sling-jcr-base"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/SLING-11770"
}, {
"type" : "WEB",
"url" : "https://sling.apache.org/news.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-74" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-14T21:24:47Z",
"nvd_published_at" : "2023-02-14T13:15:00Z"
}
}