Vulnerabilities in pkg:npm/@dapperduckling/keycloak-connector-server

PACKAGE
Advisory Identifier: GHSA-w5rq-g9r6-vrcg
Advisory Summary

CVE-2024-53843 is a MODERATE (CVSS 8.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @dapperduckling/keycloak connector server libraries in the npm ecosystem. The issue involves @dapperduckling/keycloak-connector-server has reflected xss vulnerability in authentication flow url handling. Remediation is available by upgrading affected packages to version 2.5.5.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@dapperduckling/keycloak-connector-server

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@dapperduckling/keycloak-connector-server. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-w5rq-g9r6-vrcg CVE-2024-53843 MODERATE @dapperduckling/keycloak-connector-server has Reflected XSS Vulnerability in Authentication Flow URL Handling

CVE-2024-53843 at a Glance

CVE Identifier CVE-2024-53843
GHSA Identifier GHSA-w5rq-g9r6-vrcg
Severity MODERATE
CVSS v3.1 Base Score 8.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product @dapperduckling/keycloak connector server
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.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:R/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 Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-53843

To remediate this vulnerability, upgrade all affected @dapperduckling/keycloak connector server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@dapperduckling/keycloak-connector-server fixed: 2.5.5
npm install @dapperduckling/keycloak-connector-server@2.5.5
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 @dapperduckling/keycloak-connector-server

How to Check if You Are Affected

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

npm ls @dapperduckling/keycloak-connector-server

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

Note: The npm ls @dapperduckling/keycloak-connector-server 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 @dapperduckling/keycloak connector server, 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** A Reflected Cross-Site Scripting (XSS) vulnerability was discovered in the authentication flow of the application. This issue arises due to improper sanitization of the URL parameters, allowing the URL bar's contents to be injected and reflected into the HTML page. An attacker could craft a malicious URL to execute arbitrary JavaScript in the browser of a victim who visits the link. **Who is impacted?** Any application utilizing this authentication library is vulnerable. Users of the application are at risk if they can be lured into clicking on a crafted malicious link. **Patches** The vulnerability has been patched in **2.5.5** by ensuring proper sanitization and escaping of user input in the affected URL parameters. Users are strongly encouraged to upgrade to the following versions: **Workarounds** If upgrading is not immediately possible, users can implement the following workarounds: - Employ a Web Application Firewall (WAF) to block malicious requests containing suspicious URL parameters. - Apply input validation and escaping directly within the application’s middleware or reverse proxy layer, specifically targeting the affected parameters. **References** - OWASP Cross-Site Scripting (XSS) Cheat Sheet: https://owasp.org/www-community/attacks/xss/

CVE-2024-53843 Affected @dapperduckling/keycloak connector server Versions

1 component(s)
Fixed Versions:
2.5.5
Product / Package Ecosystem Affected Versions Fixed Version
@dapperduckling/keycloak-connector-server
npm
< 2.5.5
2.5.5

References

Frequently Asked Questions

What is CVE-2024-53843?
CVE-2024-53843 is a security vulnerability in @dapperduckling/keycloak connector server involving @dapperduckling/keycloak-connector-server has Reflected XSS Vulnerability in Authentication Flow URL Handling under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which @dapperduckling/keycloak connector server versions are affected?
Affected versions include releases prior to 2.5.5 across affected packages: @dapperduckling/keycloak-connector-server.
What version fixes CVE-2024-53843?
Upgrading to 2.5.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @dapperduckling/keycloak-connector-server affected?
Yes, @dapperduckling/keycloak-connector-server is affected in releases prior to 2.5.5. Upgrade your dependency to 2.5.5 or later.
What is the CVSS score of CVE-2024-53843?
CVE-2024-53843 has a CVSS v3.1 base score of 8.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2024-53843?
CVE-2024-53843 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-2024-53843?
Run the dependency tree command: 'npm ls @dapperduckling/keycloak-connector-server'. 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-w5rq-g9r6-vrcg",
  "modified" : "2024-11-26T16:51:05Z",
  "published" : "2024-11-26T16:51:05Z",
  "aliases" : [ "CVE-2024-53843" ],
  "summary" : "@dapperduckling/keycloak-connector-server has Reflected XSS Vulnerability in Authentication Flow URL Handling",
  "details" : "**Impact**\nA Reflected Cross-Site Scripting (XSS) vulnerability was discovered in the authentication flow of the application. This issue arises due to improper sanitization of the URL parameters, allowing the URL bar's contents to be injected and reflected into the HTML page. An attacker could craft a malicious URL to execute arbitrary JavaScript in the browser of a victim who visits the link.\n\n**Who is impacted?**\nAny application utilizing this authentication library is vulnerable. Users of the application are at risk if they can be lured into clicking on a crafted malicious link.\n\n**Patches**\nThe vulnerability has been patched in **2.5.5** by ensuring proper sanitization and escaping of user input in the affected URL parameters.\n\nUsers are strongly encouraged to upgrade to the following versions:\n\n**Workarounds**\nIf upgrading is not immediately possible, users can implement the following workarounds:\n- Employ a Web Application Firewall (WAF) to block malicious requests containing suspicious URL parameters.\n- Apply input validation and escaping directly within the application’s middleware or reverse proxy layer, specifically targeting the affected parameters.\n\n**References**\n- OWASP Cross-Site Scripting (XSS) Cheat Sheet: https://owasp.org/www-community/attacks/xss/",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@dapperduckling/keycloak-connector-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.5.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/DapperDuckling/keycloak-connector/security/advisories/GHSA-w5rq-g9r6-vrcg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-53843"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/DapperDuckling/keycloak-connector"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-26T16:51:05Z",
    "nvd_published_at" : "2024-11-26T00:15:07Z"
  }
}