« Volver al listado

CVE-2021-41275

Estado: ModificadaAlta (8.8)—

spree_auth_devise is an open source library which provides authentication and authorization services for use with the Spree storefront framework by using an underlying Devise authentication framework. In affected versions spree_auth_devise is subject to a CSRF vulnerability that allows user account takeover. All applications using any version of the frontend component of spree_auth_devise are affected if protect_from_forgery method is both: Executed whether as: A before_action callback (the default).

Leer descripción completaMostrar menos

A prepend_before_action (option prepend: true given) before the :load_object hook in Spree::UserController (most likely order to find). Configured to use :null_session or :reset_session strategies (:null_session is the default in case the no strategy is given, but rails --new generated skeleton use :exception). Users are advised to update their spree_auth_devise gem. For users unable to update it may be possible to change your strategy to :exception. Please see the linked GHSA for more workaround details. ### Impact CSRF vulnerability that allows user account takeover. All applications using any version of the frontend component of `spree_auth_devise` are affected if `protect_from_forgery` method is both: * Executed whether as: * A before_action callback (the default) * A prepend_before_action (option prepend: true given) before the :load_object hook in Spree::UserController (most likely order to find). * Configured to use :null_session or :reset_session strategies (:null_session is the default in case the no strategy is given, but rails --new generated skeleton use :exception). That means that applications that haven't been configured differently from what it's generated with Rails aren't affected. Thanks @waiting-for-dev for reporting and providing a patch �� ### Patches Spree 4.3 users should update to spree_auth_devise 4.4.1 Spree 4.2 users should update to spree_auth_devise 4.2.1 ### Workarounds If possible, change your strategy to :exception: ```ruby class ApplicationController < ActionController::Base protect_from_forgery with: :exception end ``` Add the following to`config/application.rb `to at least run the `:exception` strategy on the affected controller: ```ruby config.after_initialize do Spree::UsersController.protect_from_forgery with: :exception end ``` ### References https://github.com/solidusio/solidus_auth_devise/security/advisories/GHSA-xm34-v85h-9pg2

CVSS

Probabilidad de explotación (EPSS)

EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).

Tecnologías afectadas (1)

CWE

Referencias

JSON original (NVD)

Mostrar
{
  "id": "CVE-2021-41275",
  "cveTags": [],
  "metrics": {
    "cvssMetricV2": [
      {
        "type": "Primary",
        "source": "nvd@nist.gov",
        "cvssData": {
          "version": "2.0",
          "baseScore": 6.8,
          "accessVector": "NETWORK",
          "vectorString": "AV:N/AC:M/Au:N/C:P/I:P/A:P",
          "authentication": "NONE",
          "integrityImpact": "PARTIAL",
          "accessComplexity": "MEDIUM",
          "availabilityImpact": "PARTIAL",
          "confidentialityImpact": "PARTIAL"
        },
        "acInsufInfo": false,
        "impactScore": 6.4,
        "baseSeverity": "MEDIUM",
        "obtainAllPrivilege": false,
        "exploitabilityScore": 8.6,
        "obtainUserPrivilege": false,
        "obtainOtherPrivilege": false,
        "userInteractionRequired": true
      }
    ],
    "cvssMetricV31": [
      {
        "type": "Secondary",
        "source": "security-advisories@github.com",
        "cvssData": {
          "scope": "CHANGED",
          "version": "3.1",
          "baseScore": 9.3,
          "attackVector": "NETWORK",
          "baseSeverity": "CRITICAL",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N",
          "integrityImpact": "HIGH",
          "userInteraction": "REQUIRED",
          "attackComplexity": "LOW",
          "availabilityImpact": "NONE",
          "privilegesRequired": "NONE",
          "confidentialityImpact": "HIGH"
        },
        "impactScore": 5.8,
        "exploitabilityScore": 2.8
      },
      {
        "type": "Primary",
        "source": "nvd@nist.gov",
        "cvssData": {
          "scope": "UNCHANGED",
          "version": "3.1",
          "baseScore": 8.8,
          "attackVector": "NETWORK",
          "baseSeverity": "HIGH",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "integrityImpact": "HIGH",
          "userInteraction": "REQUIRED",
          "attackComplexity": "LOW",
          "availabilityImpact": "HIGH",
          "privilegesRequired": "NONE",
          "confidentialityImpact": "HIGH"
        },
        "impactScore": 5.9,
        "exploitabilityScore": 2.8
      }
    ]
  },
  "affected": [
    {
      "source": "security-advisories@github.com",
      "affectedData": [
        {
          "vendor": "spree",
          "product": "spree_auth_devise",
          "versions": [
            {
              "status": "affected",
              "version": ">= 4.3.0, < 4.4.1"
            },
            {
              "status": "affected",
              "version": ">= 4.2.0, < 4.2.1"
            },
            {
              "status": "affected",
              "version": ">= 4.1.0, < 4.1.1"
            },
            {
              "status": "affected",
              "version": "< 4.0.1"
            }
          ]
        }
      ]
    }
  ],
  "published": "2021-11-17T20:15:10.527",
  "references": [
    {
      "url": "https://github.com/spree/spree_auth_devise/commit/adf6ed4cd94d66091776b5febd4ff3767362de63",
      "tags": [
        "Patch",
        "Third Party Advisory"
      ],
      "source": "security-advisories@github.com"
    },
    {
      "url": "https://github.com/spree/spree_auth_devise/security/advisories/GHSA-26xx-m4q2-xhq8",
      "tags": [
        "Third Party Advisory"
      ],
      "source": "security-advisories@github.com"
    },
    {
      "url": "https://github.com/spree/spree_auth_devise/commit/adf6ed4cd94d66091776b5febd4ff3767362de63",
      "tags": [
        "Patch",
        "Third Party Advisory"
      ],
      "source": "af854a3a-2127-422b-91ae-364da2661108"
    },
    {
      "url": "https://github.com/spree/spree_auth_devise/security/advisories/GHSA-26xx-m4q2-xhq8",
      "tags": [
        "Third Party Advisory"
      ],
      "source": "af854a3a-2127-422b-91ae-364da2661108"
    }
  ],
  "vulnStatus": "Modified",
  "weaknesses": [
    {
      "type": "Secondary",
      "source": "security-advisories@github.com",
      "description": [
        {
          "lang": "en",
          "value": "CWE-352"
        }
      ]
    },
    {
      "type": "Primary",
      "source": "nvd@nist.gov",
      "description": [
        {
          "lang": "en",
          "value": "CWE-352"
        }
      ]
    }
  ],
  "descriptions": [
    {
      "lang": "en",
      "value": "spree_auth_devise is an open source library which provides authentication and authorization services for use with the Spree storefront framework by using an underlying Devise authentication framework. In affected versions spree_auth_devise is subject to a CSRF vulnerability that allows user account takeover. All applications using any version of the frontend component of spree_auth_devise are affected if protect_from_forgery method is both: Executed whether as: A before_action callback (the default). A prepend_before_action (option prepend: true given) before the :load_object hook in Spree::UserController (most likely order to find). Configured to use :null_session or :reset_session strategies (:null_session is the default in case the no strategy is given, but rails --new generated skeleton use :exception). Users are advised to update their spree_auth_devise gem. For users unable to update it may be possible to change your strategy to :exception. Please see the linked GHSA for more workaround details. ### Impact CSRF vulnerability that allows user account takeover. All applications using any version of the frontend component of `spree_auth_devise` are affected if `protect_from_forgery` method is both: * Executed whether as: * A before_action callback (the default) * A prepend_before_action (option prepend: true given) before the :load_object hook in Spree::UserController (most likely order to find). * Configured to use :null_session or :reset_session strategies (:null_session is the default in case the no strategy is given, but rails --new generated skeleton use :exception). That means that applications that haven't been configured differently from what it's generated with Rails aren't affected. Thanks @waiting-for-dev for reporting and providing a patch �� ### Patches Spree 4.3 users should update to spree_auth_devise 4.4.1 Spree 4.2 users should update to spree_auth_devise 4.2.1 ### Workarounds If possible, change your strategy to :exception: ```ruby class ApplicationController < ActionController::Base protect_from_forgery with: :exception end ``` Add the following to`config/application.rb `to at least run the `:exception` strategy on the affected controller: ```ruby config.after_initialize do Spree::UsersController.protect_from_forgery with: :exception end ``` ### References https://github.com/solidusio/solidus_auth_devise/security/advisories/GHSA-xm34-v85h-9pg2"
    },
    {
      "lang": "es",
      "value": "spree_auth_devise es una librería de código abierto que proporciona servicios de autenticación y autorización para su uso con el marco de trabajo de la tienda Spree mediante el uso de un marco de trabajo de autenticación Devise subyacente. En las versiones afectadas, spree_auth_devise está sujeto a una vulnerabilidad CSRF que permite la toma de posesión de cuentas de usuario. Todas las aplicaciones que utilizan cualquier versión del componente frontend de spree_auth_devise están afectadas si el método protect_from_forgery es ambos: Se ejecuta como: Un callback before_action (el predeterminado). Un prepend_before_action (opción prepend: true dada) antes del hook :load_object en Spree::UserController (orden más probable de encontrar). Configurado para utilizar las estrategias :null_session o :reset_session (:null_session es la predeterminada en caso de que no se dé ninguna estrategia, pero los raíles --nuevo esqueleto generado utilizan :exception). Se recomienda a los usuarios que actualicen su gema spree_auth_devise. Para los usuarios que no puedan actualizar, puede ser posible cambiar su estrategia a :exception. Por favor, consulte el GHSA vinculado para más detalles de la solución. ### Impacto Vulnerabilidad CSRF que permite la toma de cuenta del usuario. Todas las aplicaciones que utilizan cualquier versión del componente frontend de `spree_auth_devise` están afectadas si el método `protect_from_forgery` es a la vez: * Se ejecuta ya sea como: * Un callback before_action (el predeterminado) * Un prepend_before_action (opción prepend: true dada) antes del hook :load_object en Spree::UserController (orden más probable de encontrar). * Configurado para usar las estrategias :null_session o :reset_session (:null_session es la predeterminada en caso de que no se dé ninguna estrategia, pero el esqueleto generado por rails --new usa :exception). Eso significa que las aplicaciones que no han sido configuradas de forma diferente a la generada con Rails no se ven afectadas. Gracias @waiting-for-dev por informar y proporcionar un parche ? ### Parches Los usuarios de Spree 4.3 deben actualizar a spree_auth_devise 4.4.1 Los usuarios de Spree 4.2 deben actualizar a spree_auth_devise 4.2.1 ### Soluciones Si es posible, cambia tu estrategia a :exception: ```ruby class ApplicationController &lt; ActionController::Base protect_from_forgery with: :exception end ``` Añade lo siguiente a `config/application. rb ``para ejecutar al menos la estrategia `:exception` en el controlador afectado: ```ruby config.after_initialize do Spree::UsersController.protect_from_forgery with: :exception end ``` ### Referencias https://github.com/solidusio/solidus_auth_devise/security/advisories/GHSA-xm34-v85h-9pg2"
    }
  ],
  "lastModified": "2026-06-17T04:08:13.250",
  "configurations": [
    {
      "nodes": [
        {
          "negate": false,
          "cpeMatch": [
            {
              "criteria": "cpe:2.3:a:spreecommerce:spree_auth_devise:*:*:*:*:*:ruby:*:*",
              "vulnerable": true,
              "matchCriteriaId": "1B29C2AC-BE4D-4BA9-9EE6-F10E3DB02F3A",
              "versionEndIncluding": "4.0.1"
            },
            {
              "criteria": "cpe:2.3:a:spreecommerce:spree_auth_devise:*:*:*:*:*:ruby:*:*",
              "vulnerable": true,
              "matchCriteriaId": "1779B068-94FF-47BC-8A5D-FF423AC1DEF4",
              "versionEndExcluding": "4.4.1",
              "versionStartIncluding": "4.3.0"
            },
            {
              "criteria": "cpe:2.3:a:spreecommerce:spree_auth_devise:4.1.0:-:*:*:*:ruby:*:*",
              "vulnerable": true,
              "matchCriteriaId": "D26C42FF-BA82-45FC-994A-383C5C1E5E81"
            },
            {
              "criteria": "cpe:2.3:a:spreecommerce:spree_auth_devise:4.1.0:rc1:*:*:*:ruby:*:*",
              "vulnerable": true,
              "matchCriteriaId": "6D1DB81F-F324-48AE-9641-4862AB5F2304"
            },
            {
              "criteria": "cpe:2.3:a:spreecommerce:spree_auth_devise:4.2.0:*:*:*:*:ruby:*:*",
              "vulnerable": true,
              "matchCriteriaId": "F6936681-9A4A-4876-B918-4D9585CF6B3A"
            }
          ],
          "operator": "OR"
        }
      ]
    }
  ],
  "sourceIdentifier": "security-advisories@github.com"
}