Vulnerabilities in pkg:npm/express-openid-connect
PACKAGECVE-2022-24794 is a HIGH (CVSS 7.5) url redirection to untrusted site vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Express openid connect libraries in the npm ecosystem. The issue involves url redirection to untrusted site ('open redirect') in express-openid-connect. Remediation is available by upgrading affected packages to version 2.7.2.
pkg:npm/express-openid-connect
Vulnerability advisories affecting package pkg:npm/express-openid-connect. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-7p99-3798-f85c | CVE-2022-24794 | HIGH | URL Redirection to Untrusted Site ('Open Redirect') in express-openid-connect |
| GHSA-7rg2-qxmf-hhx9 | CVE-2021-41246 | MODERATE | Session fixation in express-openid-connect |
CVE-2022-24794 at a Glance
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:H/PR:N/UI:N/S:C/C:H/I:L/A:N).
How to Fix CVE-2022-24794
To remediate this vulnerability, upgrade all affected Express openid 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 express-openid-connect@2.7.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls express-openid-connect
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2022-24794, inspect your project dependencies using npm:
npm ls express-openid-connect
Analyze the terminal output to locate any version of Express openid connect in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.7.2), your application is affected.
Note: The npm ls express-openid-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-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Express openid 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-2022-24794 Affected Express openid connect Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
express-openid-connect
|
npm |
< 2.7.2
|
2.7.2
|
References
Frequently Asked Questions
What is CVE-2022-24794?
Which Express openid connect versions are affected?
What version fixes CVE-2022-24794?
Is express-openid-connect affected?
What is the CVSS score of CVE-2022-24794?
What CWE is associated with CVE-2022-24794?
How can I check npm dependencies for CVE-2022-24794?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7p99-3798-f85c",
"modified" : "2022-03-31T22:44:47Z",
"published" : "2022-03-31T22:44:47Z",
"aliases" : [ "CVE-2022-24794" ],
"summary" : "URL Redirection to Untrusted Site ('Open Redirect') in express-openid-connect",
"details" : "### Impact\nUsers of the `requiresAuth` middleware, either directly or through the default `authRequired` option, are vulnerable to an Open Redirect when the middleware is applied to a catch all route.\n\nIf all routes under `example.com` are protected with the `requiresAuth` middleware, a visit to `http://example.com//google.com` will be redirected to `google.com` after login because the original url reported by the Express framework is not properly sanitised.\n\n### Am I affected?\nYou are affected by this vulnerability if you are using the `requiresAuth` middleware on a catch all route or the default `authRequired` option and `express-openid-connect` version `<=2.7.1`.\n\n### How to fix that?\nUpgrade to version `>=2.7.2`\n\n### Will this update impact my users?\nThe fix provided in the patch will not affect your users.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "express-openid-connect"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.7.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/auth0/express-openid-connect/security/advisories/GHSA-7p99-3798-f85c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24794"
}, {
"type" : "WEB",
"url" : "https://github.com/auth0/express-openid-connect/commit/0947b92164a2c5f661ebcc183d37e7f21de719ad"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/auth0/express-openid-connect"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-03-31T22:44:47Z",
"nvd_published_at" : "2022-03-31T23:15:00Z"
}
}