Vulnerabilities in pkg:npm/@sap/hana-client

PACKAGE
Advisory Identifier: GHSA-6339-gv7w-g5f4
Advisory Summary

CVE-2024-45277 is a MODERATE (CVSS 4.3) sap hana node.js client package vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting @sap/hana client libraries in the npm ecosystem. The issue involves sap hana node.js client package vulnerable to prototype pollution. Remediation is available by upgrading affected packages to version 2.21.31.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@sap/hana-client

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@sap/hana-client. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-6339-gv7w-g5f4 CVE-2024-45277 MODERATE SAP HANA Node.js client package vulnerable to Prototype Pollution

CVE-2024-45277 at a Glance

CVE Identifier CVE-2024-45277
GHSA Identifier GHSA-6339-gv7w-g5f4
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product @sap/hana client
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.3

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:N/A:L).

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 None (I:N)
Availability Low (A:L)

How to Fix CVE-2024-45277

To remediate this vulnerability, upgrade all affected @sap/hana client 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/hana-client fixed: 2.21.31
npm install @sap/hana-client@2.21.31
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/hana-client

How to Check if You Are Affected

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

npm ls @sap/hana-client

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

Note: The npm ls @sap/hana-client 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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In @sap/hana client, 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 SAP HANA Node.js client package versions from 2.0.0 before 2.21.31 is impacted by Prototype Pollution vulnerability allowing an attacker to add arbitrary properties to global object prototypes. This is due to improper user input sanitation when using the nestTables feature causing low impact on the availability of the application. This has no impact on Confidentiality and Integrity.

CVE-2024-45277 Affected @sap/hana client Versions

1 component(s)
Fixed Versions:
2.21.31
Product / Package Ecosystem Affected Versions Fixed Version
@sap/hana-client
npm
≥ 2.0.0
< 2.21.31
2.21.31

References

Frequently Asked Questions

What is CVE-2024-45277?
CVE-2024-45277 is a security vulnerability in @sap/hana client involving SAP HANA Node.js client package vulnerable to Prototype Pollution under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which @sap/hana client versions are affected?
Affected versions include releases prior to 2.21.31 across affected packages: @sap/hana-client.
What version fixes CVE-2024-45277?
Upgrading to 2.21.31 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @sap/hana-client affected?
Yes, @sap/hana-client is affected in releases prior to 2.21.31. Upgrade your dependency to 2.21.31 or later.
What is the CVSS score of CVE-2024-45277?
CVE-2024-45277 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2024-45277?
CVE-2024-45277 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check npm dependencies for CVE-2024-45277?
Run the dependency tree command: 'npm ls @sap/hana-client'. 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-6339-gv7w-g5f4",
  "modified" : "2024-10-08T14:37:55Z",
  "published" : "2024-10-08T06:30:47Z",
  "aliases" : [ "CVE-2024-45277" ],
  "summary" : "SAP HANA Node.js client package vulnerable to Prototype Pollution",
  "details" : "The SAP HANA Node.js client package versions from 2.0.0 before 2.21.31 is impacted by Prototype Pollution vulnerability allowing an attacker to add arbitrary properties to global object prototypes. This is due to improper user input sanitation when using the nestTables feature causing low impact on the availability of the application. This has no impact on Confidentiality and Integrity.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@sap/hana-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.21.31"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-45277"
  }, {
    "type" : "WEB",
    "url" : "https://me.sap.com/notes/3520100"
  }, {
    "type" : "WEB",
    "url" : "https://url.sap/sapsecuritypatchday"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@sap/hana-client?activeTab=code"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-08T14:37:55Z",
    "nvd_published_at" : "2024-10-08T04:15:08Z"
  }
}