CVE-2024-56137
📋 TL;DR
CVE-2024-56137 is a remote command execution vulnerability in MaxKB's function library module that allows privileged users to execute arbitrary operating system commands through custom scripts. This affects MaxKB versions before 1.9.0. The vulnerability enables authenticated users with script creation privileges to potentially compromise the underlying server.
💻 Affected Systems
- MaxKB (Max Knowledge Base)
📦 What is this software?
Maxkb by Maxkb
⚠️ Risk & Real-World Impact
Worst Case
Privileged authenticated users could execute arbitrary OS commands with the same privileges as the MaxKB service account, potentially leading to full system compromise, data exfiltration, or lateral movement within the network.
Likely Case
Malicious or compromised privileged users could execute limited OS commands to escalate privileges, access sensitive data, or disrupt service availability.
If Mitigated
With proper access controls limiting script creation to trusted administrators only, the attack surface is significantly reduced to only those with administrative privileges.
🎯 Exploit Status
Exploitation requires authenticated access with script creation privileges. The advisory suggests the vulnerability is in how custom scripts handle OS command execution.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.9.0
Vendor Advisory: https://github.com/1Panel-dev/MaxKB/security/advisories/GHSA-76w2-2g72-cg85
Restart Required: Yes
Instructions:
1. Backup your MaxKB configuration and data. 2. Stop the MaxKB service. 3. Update to version 1.9.0 or later using your deployment method (Docker, package manager, or source). 4. Restart the MaxKB service. 5. Verify the update was successful.
🔧 Temporary Workarounds
Restrict Script Creation Privileges
allLimit user permissions to only trusted administrators who need to create or modify custom scripts in the function library.
Disable Custom Script Functionality
allIf custom scripts are not required, disable the function library module entirely through configuration.
🧯 If You Can't Patch
- Implement strict access controls to limit who can create or modify custom scripts to only essential, trusted administrators.
- Monitor and audit all script creation and modification activities in the function library module for suspicious patterns.
🔍 How to Verify
Check if Vulnerable:
Check your MaxKB version. If it's below 1.9.0 and you have the function library module enabled with custom script capabilities, you are vulnerable.
Check Version:
Check the MaxKB web interface admin panel or run: docker exec maxkb-container cat /app/version.txt (if using Docker)
Verify Fix Applied:
After updating, verify the version is 1.9.0 or higher and test that custom scripts no longer allow arbitrary OS command execution.
📡 Detection & Monitoring
Log Indicators:
- Unusual script creation/modification events
- OS command execution patterns from MaxKB process
- Failed privilege escalation attempts
Network Indicators:
- Unexpected outbound connections from MaxKB server
- Command and control traffic patterns
SIEM Query:
source="maxkb" AND (event="script_creation" OR event="script_modification") AND user NOT IN ["admin1", "admin2"]