Vulnerabilities in pkg:maven/org.apache.sling/org.apache.sling.api

PACKAGE
Advisory Identifier: GHSA-cxwh-vmhg-39r2
Advisory Summary

CVE-2013-2254 is a MODERATE improper restriction of operations within vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Org.apache.sling.api libraries in the Maven ecosystem. The issue involves improper restriction of operations within the bounds of a memory buffer in apache sling. Remediation is available by upgrading affected packages to version 2.4.0.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.sling/org.apache.sling.api

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.sling/org.apache.sling.api. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-cxwh-vmhg-39r2 CVE-2013-2254 MODERATE Improper Restriction of Operations within the Bounds of a Memory Buffer in Apache Sling
GHSA-rxvx-44w5-44r7 CVE-2015-2944 MODERATE Improper Neutralization of Input During Web Page Generation in Apache Sling
GHSA-qmx3-m648-hr74 CVE-2022-32549 MODERATE Log Injection in Apache Sling Commons Log and Apache Sling API

CVE-2013-2254 at a Glance

CVE Identifier CVE-2013-2254
GHSA Identifier GHSA-cxwh-vmhg-39r2
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
Affected Product Org.apache.sling.api
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2013-2254

To remediate this vulnerability, upgrade all affected Org.apache.sling.api 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.sling:org.apache.sling.api fixed: 2.4.0
<dependency>
    <groupId>org.apache.sling</groupId>
    <artifactId>org.apache.sling.api</artifactId>
    <version>2.4.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.sling

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2013-2254, 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.api in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.0), 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-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. In Org.apache.sling.api, 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

The deepGetOrCreateNode function in impl/operations/AbstractCreateOperation.java in org.apache.sling.servlets.post.bundle 2.2.0 and 2.3.0 in Apache Sling does not properly handle a NULL value that returned when the session does not have permissions to the root node, which allows remote attackers to cause a denial of service (infinite loop) via unspecified vectors.

CVE-2013-2254 Affected Org.apache.sling.api Versions

1 component(s)
Fixed Versions:
2.4.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.sling:org.apache.sling.api
Maven
< 2.4.0
2.4.0

References

Frequently Asked Questions

What is CVE-2013-2254?
CVE-2013-2254 is a security vulnerability in Org.apache.sling.api involving Improper Restriction of Operations within the Bounds of a Memory Buffer in Apache Sling under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer.
Which Org.apache.sling.api versions are affected?
Affected versions include releases prior to 2.4.0 across affected packages: org.apache.sling:org.apache.sling.api.
What version fixes CVE-2013-2254?
Upgrading to 2.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is org.apache.sling.api affected?
Yes, org.apache.sling:org.apache.sling.api is affected in releases prior to 2.4.0. Upgrade your dependency to 2.4.0 or later.
What CWE is associated with CVE-2013-2254?
CVE-2013-2254 is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer (The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.).
How can I check Maven dependencies for CVE-2013-2254?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.sling'. 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-cxwh-vmhg-39r2",
  "modified" : "2022-07-08T19:14:16Z",
  "published" : "2022-05-17T01:36:04Z",
  "aliases" : [ "CVE-2013-2254" ],
  "summary" : "Improper Restriction of Operations within the Bounds of a Memory Buffer in Apache Sling",
  "details" : "The deepGetOrCreateNode function in impl/operations/AbstractCreateOperation.java in org.apache.sling.servlets.post.bundle 2.2.0 and 2.3.0 in Apache Sling does not properly handle a NULL value that returned when the session does not have permissions to the root node, which allows remote attackers to cause a denial of service (infinite loop) via unspecified vectors.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.sling:org.apache.sling.api"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.4.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.3.0"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-2254"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/87765"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/SLING-2913"
  }, {
    "type" : "WEB",
    "url" : "http://mail-archives.apache.org/mod_mbox/sling-dev/201310.mbox/%3CCAKkCf4pue6PnESsP1KTdEDJm1gpkANFaK%2BvUd9mzEVT7tXL%2B3A%40mail.gmail.com%3E"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-119" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-08T19:14:16Z",
    "nvd_published_at" : "2013-10-17T23:55:00Z"
  }
}