Description
The random_password_generator (aka RandomPasswordGenerator) gem through 1.0.0 for Ruby uses Kernel#rand to generate passwords, which, due to its cyclic nature, can facilitate password prediction.
References (4)
Core 4
Core References
Third Party Advisory x_refsource_misc
https://github.com/bvsatyaram/random_password_generator/blob/2855e8d7d8803dbb580ddd6cf13846394eb4530e/lib/random_password_generator.rb#L23
Third Party Advisory x_refsource_misc
https://ruby-doc.org/core-3.1.2/Random.html
Exploit, Third Party Advisory x_refsource_misc
https://stackoverflow.com/questions/42170239/security-of-rand-in-ruby-compared-to-other-methods/42170560
Issue Tracking, Third Party Advisory x_refsource_misc
https://github.com/bvsatyaram/random_password_generator/pull/1
Scores
CVSS v3
7.5
EPSS
0.0034
EPSS Percentile
56.7%
Attack Vector
NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Details
CWE
CWE-335
Status
published
Products (2)
random_password_generator_project/random_password_generator
< 1.0.0
rubygems/random_password_generator
0RubyGems
Published
May 18, 2022
Tracked Since
Feb 18, 2026