{ "data_version": "4.0", "data_type": "CVE", "data_format": "MITRE", "CVE_data_meta": { "ID": "CVE-2024-24554", "ASSIGNER": "vulnerability@ncsc.ch", "STATE": "PUBLIC" }, "description": { "description_data": [ { "lang": "eng", "value": "Bludit uses predictable methods in combination with the MD5 hashing algorithm to generate sensitive tokens such as the API token and the user token. This allows attackers to authenticate against the Bludit API." } ] }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "eng", "value": "CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)", "cweId": "CWE-338" } ] }, { "description": [ { "lang": "eng", "value": "CWE-287 Improper Authentication", "cweId": "CWE-287" } ] } ] }, "affects": { "vendor": { "vendor_data": [ { "vendor_name": "Bludit", "product": { "product_data": [ { "product_name": "Bludit", "version": { "version_data": [ { "version_affected": "=", "version_value": "2.0" } ] } } ] } } ] } }, "references": { "reference_data": [ { "url": "https://www.redguard.ch/blog/2024/06/20/security-advisory-bludit/", "refsource": "MISC", "name": "https://www.redguard.ch/blog/2024/06/20/security-advisory-bludit/" } ] }, "generator": { "engine": "Vulnogram 0.2.0" }, "source": { "discovery": "UNKNOWN" }, "configuration": [ { "lang": "en", "supportingMedia": [ { "base64": false, "type": "text/html", "value": "Admin must enable the API (API is disabled by default).
" } ], "value": "Admin must enable the API (API is disabled by default)." } ], "work_around": [ { "lang": "en", "supportingMedia": [ { "base64": false, "type": "text/html", "value": "Disable API." } ], "value": "Disable API." } ], "solution": [ { "lang": "en", "supportingMedia": [ { "base64": false, "type": "text/html", "value": "Generating secure API and user auth tokens in PHP involves creating unique and cryptographically secure strings that can be used as tokens for authentication purposes. The following code snippet is a basic example of how to generate secure API tokens in PHP:

```php
function generateApiToken($length = 32) {
    $token = bin2hex(random_bytes($length));
    return $token;
}
```
" } ], "value": "Generating secure API and user auth tokens in PHP involves creating unique and cryptographically secure strings that can be used as tokens for authentication purposes. The following code snippet is a basic example of how to generate secure API tokens in PHP:\n\n```php\nfunction generateApiToken($length = 32) {\n\u00a0 \u00a0 $token = bin2hex(random_bytes($length));\n\u00a0 \u00a0 return $token;\n}\n```" } ], "credits": [ { "lang": "en", "value": "Andreas Pfefferle, Redguard AG" } ] }