CVE-2019-1010259

9.8 CRITICAL

📋 TL;DR

This SQL injection vulnerability in SaltStack Salt allows attackers to execute arbitrary SQL commands through the mysql.user_chpass function. Attackers can escalate privileges on MySQL servers deployed by cloud providers, potentially leading to remote code execution. Organizations using affected SaltStack versions with MySQL modules are at risk.

💻 Affected Systems

Products:
  • SaltStack Salt
Versions: 2018.3 to 2018.3.3, 2019.2 to 2019.2.1
Operating Systems: All platforms running SaltStack
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when using the MySQL module's user_chpass function. Cloud deployments with MySQL servers managed by Salt are particularly at risk.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of MySQL servers, privilege escalation to root, and remote code execution on underlying systems, potentially affecting entire cloud deployments.

🟠

Likely Case

Database compromise, data exfiltration, and lateral movement within the affected infrastructure.

🟢

If Mitigated

Limited impact if proper network segmentation, least privilege access, and input validation are implemented.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires access to execute Salt commands. The SQL injection is straightforward once an attacker gains initial access to the Salt environment.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2018.3.4, 2019.2.2

Vendor Advisory: https://github.com/saltstack/salt/security/advisories/GHSA-xxxx-xxxx-xxxx

Restart Required: No

Instructions:

1. Update SaltStack to version 2018.3.4 or 2019.2.2 or later. 2. Run: pip install salt==2018.3.4 or pip install salt==2019.2.2. 3. Verify the update with: salt --version.

🔧 Temporary Workarounds

Disable MySQL module

all

Temporarily disable the vulnerable MySQL module if not required

salt '*' sys.disable_module mysql

Restrict Salt command execution

all

Limit who can execute Salt commands, especially MySQL module functions

Configure Salt's access controls and external auth systems

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate Salt masters from MySQL servers
  • Apply input validation and parameterized queries at the application layer

🔍 How to Verify

Check if Vulnerable:

Check Salt version: salt --version. If version is between 2018.3-2018.3.3 or 2019.2-2019.2.1, system is vulnerable.

Check Version:

salt --version

Verify Fix Applied:

Verify version is 2018.3.4 or 2019.2.2 or later. Test mysql.user_chpass function with controlled inputs.

📡 Detection & Monitoring

Log Indicators:

  • Unusual mysql.user_chpass function calls
  • SQL error messages in Salt logs
  • Unexpected privilege changes in MySQL

Network Indicators:

  • Unusual database connections from Salt masters
  • SQL injection patterns in network traffic

SIEM Query:

source="salt-master" AND "mysql.user_chpass" AND ("SQL" OR "syntax" OR "error")

🔗 References

📤 Share & Export