ghsa-6g6m-m6h5-w9gf
Vulnerability from github
Overview
Versions before and including 5.3.3, we are not enforcing the algorithms entry to be specified in the configuration. When algorithms is not specified in the configuration, with the combination of jwks-rsa, it may lead to authorization bypass.
Am I affected?
You are affected by this vulnerability if all of the following conditions apply:
You are using express-jwt AND You do not have algorithms configured in your express-jwt configuration. AND You are using libraries such as jwks-rsa as the secret.
How to fix that?
Specify algorithms in the express-jwt configuration. The following is an example of a proper configuration
const checkJwt = jwt({
secret: jwksRsa.expressJwtSecret({
rateLimit: true,
jwksRequestsPerMinute: 5,
jwksUri: `https://${DOMAIN}/.well-known/jwks.json`
}),
// Validate the audience and the issuer.
audience: process.env.AUDIENCE,
issuer: `https://${DOMAIN}/`,
// restrict allowed algorithms
algorithms: ['RS256']
});
Will this update impact my users?
The fix provided in patch will not affect your users if you specified the algorithms allowed. The patch now makes algorithms a required configuration.
Credit
IST Group
{ "affected": [ { "database_specific": { "last_known_affected_version_range": "\u003c= 5.3.3" }, "package": { "ecosystem": "npm", "name": "express-jwt" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "6.0.0" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2020-15084" ], "database_specific": { "cwe_ids": [ "CWE-285", "CWE-863" ], "github_reviewed": true, "github_reviewed_at": "2020-06-30T16:04:48Z", "nvd_published_at": "2020-06-30T16:15:00Z", "severity": "HIGH" }, "details": "### Overview\nVersions before and including 5.3.3, we are not enforcing the **algorithms** entry to be specified in the configuration.\nWhen **algorithms** is not specified in the configuration, with the combination of jwks-rsa, it may lead to authorization bypass. \n\n### Am I affected?\nYou are affected by this vulnerability if all of the following conditions apply:\n\nYou are using express-jwt\nAND \nYou do not have **algorithms** configured in your express-jwt configuration.\nAND\nYou are using libraries such as jwks-rsa as the **secret**. \n\n### How to fix that?\nSpecify **algorithms** in the express-jwt configuration. The following is an example of a proper configuration\n\n``` \nconst checkJwt = jwt({\n secret: jwksRsa.expressJwtSecret({\n rateLimit: true,\n jwksRequestsPerMinute: 5,\n jwksUri: `https://${DOMAIN}/.well-known/jwks.json`\n }),\n // Validate the audience and the issuer.\n audience: process.env.AUDIENCE,\n issuer: `https://${DOMAIN}/`,\n // restrict allowed algorithms\n algorithms: [\u0027RS256\u0027]\n}); \n```\n\n### Will this update impact my users?\nThe fix provided in patch will not affect your users if you specified the algorithms allowed. The patch now makes **algorithms** a required configuration. \n\n\n### Credit\nIST Group", "id": "GHSA-6g6m-m6h5-w9gf", "modified": "2021-01-07T23:49:22Z", "published": "2020-06-30T16:05:24Z", "references": [ { "type": "WEB", "url": "https://github.com/auth0/express-jwt/security/advisories/GHSA-6g6m-m6h5-w9gf" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-15084" }, { "type": "WEB", "url": "https://github.com/auth0/express-jwt/commit/7ecab5f8f0cab5297c2b863596566eb0c019cdef" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N", "type": "CVSS_V3" } ], "summary": "Authorization bypass in express-jwt" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.