CVE-2024-48928: Piwigo's secret key can be brute forced
Piwigo is an open source photo gallery application for the web. In versions on the 14.x branch, when installing, the secretkey configuration parameter is set to MD5(RAND()) in MySQL. However, RAND() only has 30 bits of randomness, making it feasible to brute-force the secret key. The CSRF token is constructed partially from the secret key, and this can be used to check if the brute force succeeded. Trying all possible values takes approximately one hour. The impact of this is limited. The auto login key uses the user's password on top of the secret key. The pwg token uses the user's session identifier on top of the secret key. It seems that values for getephemeralkey can be generated when one knows the secret key. Version 15.0.0 contains a fix for the issue.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-48928?
CVE-2024-48928 is classified as a high severity vulnerability due to its potential for brute-forcing the secret key.
How do I fix CVE-2024-48928?
To fix CVE-2024-48928, upgrade to Piwigo version 15.0.0 or later where the secret_key parameter is securely generated.
What versions of Piwigo are affected by CVE-2024-48928?
CVE-2024-48928 affects Piwigo versions prior to 15.0.0.
What is the risk associated with CVE-2024-48928?
The risk associated with CVE-2024-48928 includes unauthorized access due to the weak randomness in the secret key used for CSRF token protection.
Is CVE-2024-48928 a remote exploit?
CVE-2024-48928 can potentially be exploited remotely, allowing attackers to target Piwigo installations exposed to the internet.