CVE-2023-44690

7.5 HIGH

📋 TL;DR

CVE-2023-44690 is an inadequate encryption strength vulnerability in mycli 1.27.0 that allows attackers to decrypt sensitive configuration data. This affects users who store database credentials or other sensitive information in mycli configuration files. The vulnerability stems from weak encryption implementation in the config.py file.

💻 Affected Systems

Products:
  • mycli
Versions: 1.27.0
Operating Systems: All platforms running mycli
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems where mycli configuration files contain sensitive information. The vulnerability exists regardless of whether sensitive data is stored.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers gain access to database credentials, leading to full database compromise, data exfiltration, or lateral movement to other systems.

🟠

Likely Case

Local attackers or malware on the system can extract stored database credentials and potentially access databases with the privileges of the mycli user.

🟢

If Mitigated

With proper access controls and no sensitive data in config files, impact is limited to configuration file exposure without credential compromise.

🌐 Internet-Facing: LOW - mycli is typically a local command-line tool, not directly internet-facing.
🏢 Internal Only: MEDIUM - Internal attackers with local access or malware can exploit this to steal credentials from affected systems.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires local access to read the config.py file and knowledge of the weak encryption algorithm. Proof of concept is available in the GitHub issue.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.27.1 and later

Vendor Advisory: https://github.com/dbcli/mycli/issues/1131

Restart Required: No

Instructions:

1. Run: pip install --upgrade mycli
2. Verify installation with: mycli --version
3. Consider regenerating any stored credentials in configuration files.

🔧 Temporary Workarounds

Remove sensitive data from config

all

Clear any stored database credentials or sensitive information from mycli configuration files

rm ~/.myclirc
rm ~/.config/mycli/config

Use environment variables

all

Store database credentials in environment variables instead of configuration files

export MYSQL_PWD='your_password'
export MYSQL_USER='your_username'

🧯 If You Can't Patch

  • Ensure mycli configuration files have strict file permissions (chmod 600)
  • Avoid storing any sensitive credentials in mycli configuration files

🔍 How to Verify

Check if Vulnerable:

Check if mycli version is 1.27.0: mycli --version | grep '1.27.0'

Check Version:

mycli --version

Verify Fix Applied:

Verify mycli version is 1.27.1 or later: mycli --version

📡 Detection & Monitoring

Log Indicators:

  • Unusual access patterns to ~/.myclirc or ~/.config/mycli/config files
  • Failed authentication attempts to databases using credentials from mycli user

Network Indicators:

  • Database connections from mycli user's system to unexpected targets

SIEM Query:

source="*mycli*" OR file_path="*/.myclirc" OR file_path="*/.config/mycli/config"

🔗 References

📤 Share & Export