4.2medium
Saleor CSRF bypass in refreshToken mutation
- Severity
- 4.2medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.19% (higher than 9% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
Saleor is an e-commerce platform. Starting in version 3.10.0 and prior to versions 3.14.64, 3.15.39, 3.16.39, 3.17.35, 3.18.31, and 3.19.19, an attacker may bypass cross-set request forgery (CSRF) validation when calling refresh token mutation with empty string. When a user provides an empty string in `refreshToken` mutation, while the token persists in `JWT_REFRESH_TOKEN_COOKIE_NAME` cookie, application omits validation against CSRF token and returns valid access token. Versions 3.14.64, 3.15.39, 3.16.39, 3.17.35, 3.18.31, and 3.19.19 contain a patch for the issue. As a workaround, one may replace `saleor.graphql.account.mutations.authentication.refresh_token.py.get_refresh_token`. This will fix the issue, but be aware, that it returns `JWT_MISSING_TOKEN` instead of `JWT_INVALID_TOKEN`.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| saleor saleor | >= 3.10.0, < 3.14.64, >= 3.15.0, < 3.15.39, >= 3.16.0, < 3.16.39, >= 3.17.0, < 3.17.35, >= 3.18.0, < 3.18.31, >= 3.19.0, < 3.19.19, from 3.10.0 before 3.14.64, from 3.15.0 before 3.15.39 and 4 more | CVE List, NVD |
All scores
| GitHub_M | 4.2medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N |
| NVD | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Saleor is an e-commerce platform. Starting in version 3.10.0 and prior to versions 3.14.64, 3.15.39, 3.16.39, 3.17.35, 3.18.31, and 3.19.19, an attacker may bypass cross-set request forgery (CSRF) validation when calling refresh token mutation with empty string. When a user provides an empty string in `refreshToken` mutation, while the token persists in `JWT_REFRESH_TOKEN_COOKIE_NAME` cookie, application omits validation against CSRF token and returns valid access token. Versions 3.14.64, 3.15.39, 3.16.39, 3.17.35, 3.18.31, and 3.19.19 contain a patch for the issue. As a workaround, one may replace `saleor.graphql.account.mutations.authentication.refresh_token.py.get_refresh_token`. This will fix the issue, but be aware, that it returns `JWT_MISSING_TOKEN` instead of `JWT_INVALID_TOKEN`.
NVD (es)
Saleor es una plataforma de comercio electrónico. A partir de la versión 3.10.0 y anteriores a las versiones 3.14.64, 3.15.39, 3.16.39, 3.17.35, 3.18.31 y 3.19.19, un atacante puede omitir la validación de cross-set request forgery (CSRF) al llamar. actualizar la mutación del token con una cadena vacía. Cuando un usuario proporciona una cadena vacía en la mutación `refreshToken`, mientras el token persiste en la cookie `JWT_REFRESH_TOKEN_COOKIE_NAME`, la aplicación omite la validación contra el token CSRF y devuelve un token de acceso válido. Las versiones 3.14.64, 3.15.39, 3.16.39, 3.17.35, 3.18.31 y 3.19.19 contienen un parche para el problema. Como workaround, se puede reemplazar `saleor.graphql.account.mutations.authentication.refresh_token.py.get_refresh_token`. Esto solucionará el problema, pero tenga en cuenta que devuelve `JWT_MISSING_TOKEN` en lugar de `JWT_INVALID_TOKEN`.
References
| https://github.com/saleor/saleor/security/advisories/GHSA-ff69-fwjf-3c9w | mitigation, patch, vendor-advisory | |
| https://github.com/saleor/saleor/commit/36699c6f5c99590d24f46e3d5c5b1a3c2fd072e7 | patch | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-31205 changed 2024-08-02 | CVE Terms of Use |
| NVD | CVE-2024-31205 changed 2026-06-17 | Public domain |