Skip to main content
Menu
Advisories

Storefront password reset endpoint allows for account enumeration

GHSA-MHWQ-2V9W-R659Published Updated GitHub

Description

Impact

The storefront password endpoint (/password/recover) allows for account enumeration and Devise's paranoid mode is ignored.

Patches

The storefront generator templates are fixed in Solidus, so new stores will get the patched code.

Upgrading the Solidus gem does not fix existing stores. The vulnerable code was copied into your application when the storefront was generated, so every existing store must patch its own UserPasswordsController. The fix is in the Workarounds section below.

The admin password reset endpoint has the same issue and is fixed in solidus_auth_devise 2.6.1. See GHSA-mc6q-7qq6-ghg8.

Workarounds

In your application, edit app/controllers/user_passwords_controller.rb so that create uses Devise's successfully_sent?:

    set_flash_message(:notice, :send_instructions) if is_navigational_format?

-   if resource.errors.empty?
+   if successfully_sent?(resource)
      respond_with resource, location: login_path
    else
      respond_with_navigational(resource) { render :new }

This change applies to any Solidus version; you do not need to upgrade first.

Credits

Originally reported on HackerOne by: George Managadze <georgemanagadze1@gmail.com>

Affected versions

References

GitHub · solidusio/solidus