Vulnerabilities in pkg:npm/keycloak-js
PACKAGECVE-2017-7474 is a CRITICAL (CVSS 9.8) keycloak-connect and keycloak-js improperly handle vulnerability (CWE-253: Incorrect Check of Function Return Value) affecting Keycloak connect libraries in the npm ecosystem. The issue involves keycloak-connect and keycloak-js improperly handle invalid tokens. Remediation is available by upgrading affected packages to version 3.1.0.
pkg:npm/keycloak-js
Vulnerability advisories affecting package pkg:npm/keycloak-js. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-mw35-24gh-f82w | CVE-2017-7474 | CRITICAL | keycloak-connect and keycloak-js improperly handle invalid tokens |
CVE-2017-7474 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2017-7474
To remediate this vulnerability, upgrade all affected Keycloak connect dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install keycloak-connect@3.1.0
npm install keycloak-js@3.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls keycloak-connect
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-7474, inspect your project dependencies using npm:
npm ls keycloak-connect
Analyze the terminal output to locate any version of Keycloak connect in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.0), your application is affected.
Note: The npm ls keycloak-connect 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-253: Incorrect Check of Function Return Value, where the product incorrectly checks a return value from a function, which prevents it from detecting errors or exceptional conditions. In Keycloak connect, 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
CVE-2017-7474 Affected Keycloak connect Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
keycloak-connect
|
npm |
≥ 2.5.0
< 3.1.0
|
3.1.0
|
|
keycloak-js
|
npm |
≥ 2.5.0
< 3.1.0
|
3.1.0
|
References
Frequently Asked Questions
What is CVE-2017-7474?
Which Keycloak connect versions are affected?
What version fixes CVE-2017-7474?
Is keycloak-connect affected?
Is keycloak-js affected?
What is the CVSS score of CVE-2017-7474?
What CWE is associated with CVE-2017-7474?
How can I check npm dependencies for CVE-2017-7474?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mw35-24gh-f82w",
"modified" : "2023-09-08T19:56:20Z",
"published" : "2017-11-15T20:41:51Z",
"aliases" : [ "CVE-2017-7474" ],
"summary" : "keycloak-connect and keycloak-js improperly handle invalid tokens",
"details" : "It was found that the Keycloak Node.js adapter 2.5 - 3.0 did not handle invalid tokens correctly. An attacker could use this flaw to bypass authentication and gain access to restricted information, or to possibly conduct further attacks.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "keycloak-connect"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.5.0"
}, {
"fixed" : "3.1.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "keycloak-js"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.5.0"
}, {
"fixed" : "3.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-7474"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1445271"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2017-1203.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-253" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:47:26Z",
"nvd_published_at" : null
}
}