CVE-2024-53843
JSON

8.1high

Reflected XSS Vulnerability in Authentication Flow URL Handling in @dapperduckling/keycloak-connector-server

Severity
8.1high CVSS:3.1 by GitHub_M
Exploit likelihood
0.54% (higher than 46% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-w5rq-g9r6-vrcg

Description

@dapperduckling/keycloak-connector-server is an opinionated series of libraries for Node.js applications and frontend clients to interface with keycloak. 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. 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. The vulnerability has been patched in version 2.5.5 by ensuring proper sanitization and escaping of user input in the affected URL parameters. Users are strongly encouraged to upgrade. If upgrading is not immediately possible, users can implement the following workarounds: 1. Employ a Web Application Firewall (WAF) to block malicious requests containing suspicious URL parameters. or 2. Apply input validation and escaping directly within the application’s middleware or reverse proxy layer, specifically targeting the affected parameters.

Affected

Product or packageVersionsReported by
DapperDuckling keycloak-connector< 2.5.5CVE List
cloud_native_computing_foundation keycloak-connectorbefore 2.5.5CVE List
@dapperduckling/keycloak-connector-server (npm)before 2.5.5GitHub Advisory Database

All scores

GitHub_M8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
GitHub8.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
GitHubmedium CVSS:4.0CVSS: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

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

@dapperduckling/keycloak-connector-server is an opinionated series of libraries for Node.js applications and frontend clients to interface with keycloak. 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. 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. The vulnerability has been patched in version 2.5.5 by ensuring proper sanitization and escaping of user input in the affected URL parameters. Users are strongly encouraged to upgrade. If upgrading is not immediately possible, users can implement the following workarounds: 1. Employ a Web Application Firewall (WAF) to block malicious requests containing suspicious URL parameters. or 2. Apply input validation and escaping directly within the application’s middleware or reverse proxy layer, specifically targeting the affected parameters.

GitHub Advisory Database

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

NVD (es)

@dapperduckling/keycloak-connector-server es una serie de bibliotecas para aplicaciones Node.js y clientes frontend para interactuar con keycloak. Se descubrió una vulnerabilidad de Cross-Site Scripting (XSS) reflejado en el flujo de autenticación de la aplicación. Este problema surge debido a una desinfección inadecuada de los parámetros de la URL, lo que permite que el contenido de la barra de URL se inyecte y se refleje en la página HTML. Un atacante podría manipular una URL maliciosa para ejecutar JavaScript arbitrario en el navegador de una víctima que visite el enlace. Cualquier aplicación que utilice esta biblioteca de autenticación es vulnerable. Los usuarios de la aplicación corren riesgo si se les puede engañar para que hagan clic en un enlace malicioso manipulado. La vulnerabilidad se ha corregido en la versión 2.5.5 al garantizar la limpieza adecuada y el escape de la entrada del usuario en los parámetros de URL afectados. Se recomienda encarecidamente a los usuarios que actualicen. Si la actualización no es posible de inmediato, los usuarios pueden implementar las siguientes soluciones alternativas: 1. Emplear un firewall de aplicaciones web (WAF) para bloquear las solicitudes maliciosas que contengan parámetros de URL sospechosos. o 2. Aplicar la validación de entrada y el escape directamente dentro de la capa de proxy inverso o middleware de la aplicación, apuntando específicamente a los parámetros afectados.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-53843 changed 2024-11-26CVE Terms of Use
GitHub Advisory DatabaseGHSA-w5rq-g9r6-vrcg changed 2024-11-26CC-BY-4.0
NVDCVE-2024-53843 changed 2026-06-17Public domain