# CVE-2021-43177: Improper one time password handling in devise-two-factor

Source: https://junglewise.ai/threats/cve-2021-43177-improper-one-time-password-handling-in-devise-two-factor  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-04-07  
License: CC BY 4.0 with a link back

CVE-2021-43177 · Severity: low · CVSS 3.1 · Published 2022-04-07

Improper one time password handling in devise-two-factor

Technologies: [devise-two-factor (RubyGems)](https://junglewise.ai/threats/technologies/devise-two-factor). Vendors: [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2021-43177 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-43177 being exploited in the wild.

**How severe is CVE-2021-43177?** Low severity, with a CVSS score of 3.1, published 7 April 2022.

**Which products and versions are affected?** devise-two-factor (RubyGems) ECOSYSTEM:introduced=0,fixed=4.0.2.

**Is there a fix for CVE-2021-43177?** Yes. devise-two-factor (RubyGems): upgrade to 4.0.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-43177?** Check whether you run devise-two-factor (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- devise-two-factor (RubyGems): upgrade to 4.0.2 or later

  ```sh
  bundle update devise-two-factor
  ```


## Affected products

- devise-two-factor (RubyGems) ECOSYSTEM:introduced=0,fixed=4.0.2

## Identifiers

- CVE-2021-43177
- GHSA-jm35-h8q2-73mp

## Related threats

- [Devise-Two-Factor Authentication Uses Insufficient Default OTP Shared Secret Length](https://junglewise.ai/threats/cve-2024-8796-devise-two-factor-authentication-uses-insufficient-default-otp)
- [Devise-Two-Factor vulnerable to brute force attacks](https://junglewise.ai/threats/cve-2024-0227-devise-two-factor-vulnerable-to-brute-force-attacks)
- [Tinfoil Devise-two-factor does not "burn" a successfully validated one-time password (OTP)](https://junglewise.ai/threats/cve-2015-7225-tinfoil-devise-two-factor-does-not-burn-a-successfully-validated)
