CVE-2021-31581

7.9 HIGH

📋 TL;DR

This vulnerability allows authenticated users to escape the restricted shell in Akkadian Provisioning Manager Engine by exploiting the 'Edit MySQL Configuration' command, which launches a vi editor that can be escaped to gain full shell access. It affects Akkadian OVA appliances, Provisioning Manager, and Appliance Manager running vulnerable versions. Attackers with legitimate user credentials can escalate privileges to execute arbitrary commands.

💻 Affected Systems

Products:
  • Akkadian OVA Appliance
  • Akkadian Provisioning Manager
  • Akkadian Appliance Manager
Versions: All versions before Akkadian OVA 3.0, Provisioning Manager 5.0.2, and Appliance Manager 3.3.0.314-4a349e0
Operating Systems: Linux-based appliance OS
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated access to the restricted shell interface; default installations are vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An authenticated attacker gains full root shell access, enabling complete system compromise, data exfiltration, lateral movement, and persistence.

🟠

Likely Case

Privileged users or attackers with stolen credentials escape the restricted shell to execute unauthorized commands, modify configurations, or access sensitive data.

🟢

If Mitigated

With proper access controls and network segmentation, impact is limited to the affected appliance with no lateral movement to other systems.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires authenticated access; the technique is publicly documented in Rapid7's disclosure.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Akkadian OVA 3.0+, Provisioning Manager 5.0.2+, Appliance Manager 3.3.0.314-4a349e0+

Vendor Advisory: https://www.rapid7.com/blog/post/2021/06/08/akkadian-provisioning-manager-multiple-vulnerabilities-disclosure/

Restart Required: Yes

Instructions:

1. Identify current version using version check command. 2. Download and apply the appropriate updated version from Akkadian. 3. Restart the appliance or service to apply changes. 4. Verify the fix by checking the version and testing shell escape attempts.

🔧 Temporary Workarounds

Restrict Access to Restricted Shell

all

Limit user access to the restricted shell interface to only necessary personnel using network controls.

Monitor and Audit Shell Usage

linux

Implement logging and monitoring for shell access and vi editor usage to detect exploitation attempts.

🧯 If You Can't Patch

  • Isolate the appliance on a segmented network to limit lateral movement and potential damage.
  • Implement strict access controls and multi-factor authentication to reduce the risk of credential compromise.

🔍 How to Verify

Check if Vulnerable:

Check the appliance version; if it's below the patched versions listed, it is vulnerable. Attempt to access the restricted shell and test the 'Edit MySQL Configuration' command for vi editor escape.

Check Version:

Check via the appliance web interface or CLI commands specific to Akkadian products (exact command varies by product).

Verify Fix Applied:

After patching, confirm the version is at or above the fixed versions and test that the vi editor no longer allows shell escape from the restricted shell.

📡 Detection & Monitoring

Log Indicators:

  • Unusual vi editor usage from restricted shell sessions
  • Shell escape commands like '!sh' or '!bash' in logs
  • Multiple failed or successful authentication attempts to the restricted shell

Network Indicators:

  • Unexpected outbound connections from the appliance post-authentication
  • Traffic to command-and-control servers

SIEM Query:

Example: 'source="akkadian_logs" AND (event="vi_editor_launch" OR command="!sh" OR command="!bash")'

🔗 References

📤 Share & Export