CVE-2026-6146
Predictable Encryption Key in Amazon::Credentials
Publication date: 2026-05-11
Last updated on: 2026-05-11
Assigner: CPANSec
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| amazon | credentials | to 1.3.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-338 | The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-6146 is a vulnerability in the Amazon::Credentials Perl module versions through 1.2.0. The module uses the built-in rand function to generate 64-bit encryption keys for obfuscating stored credentials. However, rand is predictable and unsuitable for cryptographic purposes, making the encryption weak and potentially allowing attackers to recover the secrets from a data dump.
Additionally, when the module operates in 'insecure' mode, it logs debug messages that may inadvertently expose sensitive credential information such as access keys and session tokens. This insufficient protection of credential data in debug output can lead to unauthorized access if attackers gain access to these logs.
How can this vulnerability impact me? :
This vulnerability can impact you by exposing your AWS credentials through predictable encryption keys and insecure debug logging. Attackers who obtain access to debug logs or data dumps of the Amazon::Credentials object may be able to recover sensitive credentials, leading to unauthorized access to your AWS resources.
Such unauthorized access could result in data breaches, resource misuse, or other malicious activities within your AWS environment.
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 Amazon::Credentials Perl module version 1.2.0 or earlier is in use and if the 'insecure' mode is enabled, which causes sensitive credential information to be logged in debug messages.
To detect this on your system, you can:
- Check the installed version of Amazon::Credentials Perl module to see if it is version 1.2.0 or earlier.
- Search your application or system configuration for the 'insecure' flag being set to true or enabled.
- Inspect debug log files for any exposure of AWS credentials such as access keys or session tokens.
Example commands you might use include:
- To check the installed version of the module: perl -MAmazon::Credentials -e 'print $Amazon::Credentials::VERSION . "\n";'
- To search for the 'insecure' flag in your codebase or configuration: grep -r 'insecure' /path/to/your/application
- To search debug logs for AWS credential patterns: grep -E 'AKIA|ASIA|sessionToken' /var/log/your_debug_log.log
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include:
- Avoid enabling the 'insecure' mode in the Amazon::Credentials module to prevent sensitive credential information from being logged.
- If 'insecure' mode is currently enabled, disable it immediately.
- Secure and restrict access to debug log files to prevent unauthorized access to any sensitive information that may have been logged.
- Upgrade the Amazon::Credentials Perl module to version 1.3.0 or later, where the encryption key generation issue is resolved.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The vulnerability in Amazon::Credentials versions through 1.2.0 involves the use of a predictable rand function to generate encryption keys, leading to weak encryption of stored credentials.
This weak encryption and potential exposure of sensitive credential information in debug logs could lead to unauthorized access to protected data.
Such unauthorized access risks violating common standards and regulations like GDPR and HIPAA, which require strong protection of sensitive data and credentials to prevent data breaches.
Therefore, this vulnerability may negatively impact compliance by failing to adequately protect sensitive credentials, increasing the risk of data exposure.