CVE-2021-41251: @sap cloud sdk/core Unauthorized Access To Data Vulnerability

MODERATE
Advisory Identifier: GHSA-gp2f-254m-rh32
CVSS 5.9
CWE-200
Published
Advisory Summary

CVE-2021-41251 is a MODERATE (CVSS 5.9) unauthorized access to data vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting @sap cloud sdk/core libraries in the npm ecosystem. The issue involves unauthorized access to data in @sap-cloud-sdk/core. Remediation is available by upgrading affected packages to version 1.52.0.

CVE-2021-41251 at a Glance

CVE Identifier CVE-2021-41251
GHSA Identifier GHSA-gp2f-254m-rh32
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product @sap cloud sdk/core
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.9

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

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

How to Fix CVE-2021-41251

To remediate this vulnerability, upgrade all affected @sap cloud sdk/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.

@sap-cloud-sdk/core fixed: 1.52.0
npm install @sap-cloud-sdk/core@1.52.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @sap-cloud-sdk/core

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2021-41251, inspect your project dependencies using npm:

npm ls @sap-cloud-sdk/core

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

Note: The npm ls @sap-cloud-sdk/core command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In @sap cloud sdk/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

### Impact This affects applications on SAP Business Technology Platform that use the SAP Cloud SDK and enabled caching of destinations. In some cases, when user information was missing, destinations were cached without user information, allowing other users to retrieve the same destination with its permissions. By default, destination caching is disabled. If it is enabled the maximum lifetime is 5 minutes which limits the attack vector. ### Patches The problem was fixed by #1769 and #1770. The security for caching has been increased. The changes are released in version 1.52.0. ### Workarounds Disable destination caching (it is disabled by default). ### References [destination cache API docs](https://sap.github.io/cloud-sdk/api/1.51.0/modules/sap_cloud_sdk_core#destinationCache) ### For more information If you have any questions or comments about this advisory: * Open an issue in https://github.com/SAP/cloud-sdk-js

CVE-2021-41251 Affected @sap cloud sdk/core Versions

1 component(s)
Fixed Versions:
1.52.0
Product / Package Ecosystem Affected Versions Fixed Version
@sap-cloud-sdk/core
npm
< 1.52.0
1.52.0

References

Frequently Asked Questions

What is CVE-2021-41251?
CVE-2021-41251 is a security vulnerability in @sap cloud sdk/core involving Unauthorized access to data in @sap-cloud-sdk/core under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which @sap cloud sdk/core versions are affected?
Affected versions include releases prior to 1.52.0 across affected packages: @sap-cloud-sdk/core.
What version fixes CVE-2021-41251?
Upgrading to 1.52.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @sap-cloud-sdk/core affected?
Yes, @sap-cloud-sdk/core is affected in releases prior to 1.52.0. Upgrade your dependency to 1.52.0 or later.
What is the CVSS score of CVE-2021-41251?
CVE-2021-41251 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2021-41251?
CVE-2021-41251 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check npm dependencies for CVE-2021-41251?
Run the dependency tree command: 'npm ls @sap-cloud-sdk/core'. 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-gp2f-254m-rh32",
  "modified" : "2021-11-08T21:31:39Z",
  "published" : "2021-11-10T16:51:41Z",
  "aliases" : [ "CVE-2021-41251" ],
  "summary" : "Unauthorized access to data in @sap-cloud-sdk/core",
  "details" : "### Impact\nThis affects applications on SAP Business Technology Platform that use the SAP Cloud SDK and enabled caching of destinations.\nIn some cases, when user information was missing, destinations were cached without user information, allowing other users to retrieve the same destination with its permissions.\nBy default, destination caching is disabled. If it is enabled the maximum lifetime is 5 minutes which limits the attack vector.\n\n### Patches\nThe problem was fixed by #1769 and #1770. The security for caching has been increased. The changes are released in version 1.52.0.\n\n### Workarounds\nDisable destination caching (it is disabled by default).\n\n### References\n[destination cache API docs](https://sap.github.io/cloud-sdk/api/1.51.0/modules/sap_cloud_sdk_core#destinationCache)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in https://github.com/SAP/cloud-sdk-js",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@sap-cloud-sdk/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.52.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/SAP/cloud-sdk-js/security/advisories/GHSA-gp2f-254m-rh32"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41251"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/SAP/cloud-sdk-js/pull/1769"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/SAP/cloud-sdk-js/pull/1770"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/SAP/cloud-sdk-js"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-11-08T21:31:39Z",
    "nvd_published_at" : "2021-11-05T23:15:00Z"
  }
}