CVE-2024-48928
Predictable Secret Key Brute-Force in Piwigo 14.x Installation
Publication date: 2026-02-24
Last updated on: 2026-02-25
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| piwigo | piwigo | From 14.0.0 (inc) to 14.5.0 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-330 | The product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers. |
Attack-Flow Graph
AI Powered Q&A
How can this vulnerability impact me? :
This vulnerability allows an attacker to brute force the secret key used internally by Piwigo within approximately one hour due to insufficient randomness in its generation.
With knowledge of the secret key, an attacker could potentially generate certain ephemeral keys, which might affect some internal security mechanisms.
However, the overall impact is limited because critical tokens like the auto login key and pwg token also incorporate user-specific data such as passwords and session identifiers, reducing the risk of full account compromise.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
Can you explain this vulnerability to me?
[{'type': 'paragraph', 'content': 'CVE-2024-48928 is a vulnerability in Piwigo version 14.x where the secret_key configuration parameter is generated using MD5(RAND()) in MySQL during installation. The RAND() function only provides 30 bits of randomness, making the secret key feasible to brute force within about one hour.'}, {'type': 'paragraph', 'content': 'The secret key is partially used to construct the CSRF token, which allows an attacker to verify if their brute force attempt was successful. Although the impact is limited because other tokens incorporate user-specific data like passwords and session identifiers, knowing the secret key could allow generation of certain ephemeral keys.'}, {'type': 'paragraph', 'content': "A fix was introduced in version 15.0.0 that replaces the weak secret key generation method with a more secure one using PHP's cryptographically secure random_bytes function."}] [2, 1]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by checking if the secret_key configuration parameter in Piwigo version 14.x was generated using the weak method MD5(RAND()) in MySQL, which has only 30 bits of randomness.
Since the CSRF token is partially constructed from the secret_key, it is possible to attempt brute forcing the secret_key by trying all possible values, which takes approximately one hour.
To detect the vulnerability on your system, you can verify the secret_key value stored in the configuration and check if it matches the weak generation pattern.
No specific commands are provided in the available resources, but a practical approach would be to extract the secret_key from the Piwigo configuration database and analyze its generation method or attempt to brute force the CSRF token using scripts that iterate over possible RAND() outputs.
What immediate steps should I take to mitigate this vulnerability?
[{'type': 'paragraph', 'content': 'The immediate mitigation step is to replace the weak secret_key generated by MD5(RAND()) with a more secure key generated using a cryptographically secure random function.'}, {'type': 'paragraph', 'content': "Specifically, the fix involves generating the secret_key using PHP's random_bytes function to produce 1000 bytes of secure random data, then hashing it with SHA-1, as implemented in the patch for this vulnerability."}, {'type': 'paragraph', 'content': 'For existing installations, running the upgrade script `install/db/174-database.php` will update the secret_key configuration parameter to a securely generated value.'}, {'type': 'paragraph', 'content': 'Since version 15.0.0 contains the fix, upgrading to this or a later version is recommended once available.'}] [1, 2]