{"id":"CVE-2021-43777","published":"2021-11-23T23:30:10Z","modified":"2024-08-04T04:03:08Z","title":"Vulnerability in Redash OAuth2 flows due to misuse of state field (should be a nonce)","vendor":"getredash","product":"redash","tier":"tail","description":{"text":"Redash is a package for data visualization and sharing. In Redash version 10.0 and prior, the implementation of Google Login (via OAuth) incorrectly uses the `state` parameter to pass the next URL to redirect the user to after login. The `state` parameter should be used for a Cross-Site Request Forgery (CSRF) token, not a static and easily predicted value. This vulnerability does not affect users who do not use Google Login for their instance of Redash. A patch in the `master` and `release/10.x.x` branches addresses this by replacing `Flask-Oauthlib` with `Authlib` which automatically provides and validates a CSRF token for the state variable. The new implementation stores the next URL on the user session object. As a workaround, one may disable Google Login to mitigate the vulnerability.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00306,"percentile":0.23308,"provenance":"source"},"cwes":[{"id":"CWE-352","name":"Cross-Site Request Forgery"}],"references":[{"url":"https://github.com/getredash/redash/security/advisories/GHSA-vhc7-w7r8-8m34","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/getredash/redash/commit/da696ff7f84787cbf85967460fac52886cbe063e","tags":["x_refsource_MISC"]}],"priority":{"score":9.4,"factors":[{"name":"EPSS percentile","points":4.66},{"name":"CVSS severity","points":4.76}]},"vendorSlug":"getredash","affectedVersions":[{"vendor":"getredash","product":"redash","versions":["<= 10.0"]}],"euvd":{"id":"EUVD-2021-30682","exploited":false,"provenance":"source"}}