Vulnerabilities in pkg:npm/@sap/xssec

PACKAGE
Advisory Identifier: GHSA-p2vx-qj66-88q3
Advisory Summary

CVE-2023-49583 is a CRITICAL (CVSS 9.1) cross-site scripting vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting @sap/xssec libraries in the npm ecosystem. The issue involves escalation of privileges in @sap/xssec. Remediation is available by upgrading affected packages to version 3.6.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@sap/xssec

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-p2vx-qj66-88q3 CVE-2023-49583 CRITICAL Escalation of privileges in @sap/xssec

CVE-2023-49583 at a Glance

CVE Identifier CVE-2023-49583
GHSA Identifier GHSA-p2vx-qj66-88q3
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-639: Authorization Bypass Through User-Controlled Key
Affected Product @sap/xssec
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.1

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

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

How to Fix CVE-2023-49583

To remediate this vulnerability, upgrade all affected @sap/xssec 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/xssec fixed: 3.6.0
npm install @sap/xssec@3.6.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/xssec

How to Check if You Are Affected

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

npm ls @sap/xssec

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

Note: The npm ls @sap/xssec 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-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In @sap/xssec, 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

SAP BTP Security Services Integration Library ([Node.js] @sap/xssec - versions < 3.6.0, allow under certain conditions an escalation of privileges. On successful exploitation, an unauthenticated attacker can obtain arbitrary permissions within the application.

CVE-2023-49583 Affected @sap/xssec Versions

1 component(s)
Fixed Versions:
3.6.0
Product / Package Ecosystem Affected Versions Fixed Version
@sap/xssec
npm
< 3.6.0
3.6.0

References

Frequently Asked Questions

What is CVE-2023-49583?
CVE-2023-49583 is a security vulnerability in @sap/xssec involving Escalation of privileges in @sap/xssec under CWE-639: Authorization Bypass Through User-Controlled Key.
Which @sap/xssec versions are affected?
Affected versions include releases prior to 3.6.0 across affected packages: @sap/xssec.
What version fixes CVE-2023-49583?
Upgrading to 3.6.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @sap/xssec affected?
Yes, @sap/xssec is affected in releases prior to 3.6.0. Upgrade your dependency to 3.6.0 or later.
What is the CVSS score of CVE-2023-49583?
CVE-2023-49583 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2023-49583?
CVE-2023-49583 is classified under CWE-639: Authorization Bypass Through User-Controlled Key (The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.).
How can I check npm dependencies for CVE-2023-49583?
Run the dependency tree command: 'npm ls @sap/xssec'. 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-p2vx-qj66-88q3",
  "modified" : "2024-09-30T13:40:50Z",
  "published" : "2023-12-12T03:31:45Z",
  "aliases" : [ "CVE-2023-49583" ],
  "summary" : "Escalation of privileges in @sap/xssec",
  "details" : "SAP BTP Security Services Integration Library ([Node.js] @sap/xssec - versions < 3.6.0, allow under certain conditions an escalation of privileges. On successful exploitation, an unauthenticated attacker can obtain arbitrary permissions within the application.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@sap/xssec"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.6.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-49583"
  }, {
    "type" : "WEB",
    "url" : "https://blogs.sap.com/2023/12/12/unveiling-critical-security-updates-sap-btp-security-note-3411067"
  }, {
    "type" : "WEB",
    "url" : "https://me.sap.com/notes/3411067"
  }, {
    "type" : "WEB",
    "url" : "https://me.sap.com/notes/3412456"
  }, {
    "type" : "WEB",
    "url" : "https://me.sap.com/notes/3413475"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@sap/xssec"
  }, {
    "type" : "WEB",
    "url" : "https://www.sap.com/documents/2022/02/fa865ea4-167e-0010-bca6-c68f7e60039b.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269", "CWE-639", "CWE-749" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-20T17:57:49Z",
    "nvd_published_at" : "2023-12-12T02:15:07Z"
  }
}