CVE-2024-56137

6.8 MEDIUM

📋 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

Products:
  • MaxKB (Max Knowledge Base)
Versions: All versions before 1.9.0
Operating Systems: All platforms running MaxKB
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated user with privileges to create or modify custom scripts in the function library module.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

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

all

Limit user permissions to only trusted administrators who need to create or modify custom scripts in the function library.

Disable Custom Script Functionality

all

If 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"]

🔗 References

📤 Share & Export