Description
Chamilo LMS is a learning management system. Prior to 1.11.38 and 2.0.0-RC.3, REST API keys are generated using md5(time() + (user_id * 5) - rand(10000, 10000)). The rand(10000, 10000) call always returns exactly 10000 (min == max), making the formula effectively md5(timestamp + user_id*5 - 10000). An attacker who knows a username and approximate key creation time can brute-force the API key. This vulnerability is fixed in 1.11.38 and 2.0.0-RC.3.
Problem types
CWE-330: Use of Insufficiently Random Values
Product status
>= 2.0.0-alpha.1, < 2.0.0-RC.3
References
github.com/...lo-lms/security/advisories/GHSA-rpmg-j327-mr39
github.com/...ommit/4448701bb8ec557e94ef02d19c72cbe9c49c2d09
github.com/...ommit/e7400dd840586ae134b286d0a2374f3d269a9a9d