Vulnerabilities in pkg:npm/@dcl/single-sign-on-client

PACKAGE
Advisory Identifier: GHSA-vp4f-wxgw-7x8x
Advisory Summary

CVE-2023-41049 is a HIGH (CVSS 7.5) improper neutralization of script vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @dcl/single sign on client libraries in the npm ecosystem. The issue involves improper neutralization of script in attributes in @dcl/single-sign-on-client. Remediation is available by upgrading affected packages to version 0.1.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@dcl/single-sign-on-client

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@dcl/single-sign-on-client. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-vp4f-wxgw-7x8x CVE-2023-41049 HIGH Improper Neutralization of Script in Attributes in @dcl/single-sign-on-client

CVE-2023-41049 at a Glance

CVE Identifier CVE-2023-41049
GHSA Identifier GHSA-vp4f-wxgw-7x8x
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product @dcl/single sign on client
Package Ecosystem npm
Published Date
Last Updated

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).

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

How to Fix CVE-2023-41049

To remediate this vulnerability, upgrade all affected @dcl/single sign on 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.

@dcl/single-sign-on-client fixed: 0.1.0
npm install @dcl/single-sign-on-client@0.1.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 @dcl/single-sign-on-client

How to Check if You Are Affected

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

npm ls @dcl/single-sign-on-client

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

Note: The npm ls @dcl/single-sign-on-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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In @dcl/single sign on 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

### Impact Improper input validation in the `init` function allows arbitrary javascript to be executed using the `javascript:` prefix ```ts SSO.init('javascript:alert("javascript successfully injected")') ``` ### Patches This vulnerability was patched on version `0.1.0` ### Workarounds This vulnerability can be prevented if user input correctly sanitized or there is no user input pass to the `init` function

CVE-2023-41049 Affected @dcl/single sign on client Versions

1 component(s)
Fixed Versions:
0.1.0
Product / Package Ecosystem Affected Versions Fixed Version
@dcl/single-sign-on-client
npm
< 0.1.0
0.1.0

References

Frequently Asked Questions

What is CVE-2023-41049?
CVE-2023-41049 is a security vulnerability in @dcl/single sign on client involving Improper Neutralization of Script in Attributes in @dcl/single-sign-on-client under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which @dcl/single sign on client versions are affected?
Affected versions include releases prior to 0.1.0 across affected packages: @dcl/single-sign-on-client.
What version fixes CVE-2023-41049?
Upgrading to 0.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @dcl/single-sign-on-client affected?
Yes, @dcl/single-sign-on-client is affected in releases prior to 0.1.0. Upgrade your dependency to 0.1.0 or later.
What is the CVSS score of CVE-2023-41049?
CVE-2023-41049 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2023-41049?
CVE-2023-41049 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check npm dependencies for CVE-2023-41049?
Run the dependency tree command: 'npm ls @dcl/single-sign-on-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-vp4f-wxgw-7x8x",
  "modified" : "2023-09-04T16:36:27Z",
  "published" : "2023-09-04T16:36:27Z",
  "aliases" : [ "CVE-2023-41049" ],
  "summary" : "Improper Neutralization of Script in Attributes in @dcl/single-sign-on-client",
  "details" : "### Impact\nImproper input validation in the `init` function allows arbitrary javascript to be executed using  the `javascript:` prefix\n\n```ts\n    SSO.init('javascript:alert(\"javascript successfully injected\")')\n```\n\n### Patches\n\nThis vulnerability was patched on version `0.1.0`\n\n### Workarounds\n\nThis vulnerability can be prevented if user input correctly sanitized or there is no user input pass to the `init` function\n",
  "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" : "npm",
      "name" : "@dcl/single-sign-on-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/decentraland/single-sign-on-client/security/advisories/GHSA-vp4f-wxgw-7x8x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-41049"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/decentraland/single-sign-on-client/pull/2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/decentraland/single-sign-on-client/commit/bd20ea9533d0cda30809d929db85b1b76cef855a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/decentraland/single-sign-on-client"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-09-04T16:36:27Z",
    "nvd_published_at" : "2023-09-01T20:15:07Z"
  }
}