CVE-2024-36057

Published Apr 7, 2026 CVSS 3.1 · 9.8 Critical EPSS 1.9% KEV · Not listed
Description
Koha Library before 23.05.10 fails to sanitize user-controllable filenames prior to unzipping, leading to remote code execution. The line "qx/unzip $filename -d $dirname/;" in upload-cover-image.pl is vulnerable to command injection via shell metacharacters because input data can be controlled by an attacker and is directly included in a system command, i.e., an attack can occur via malicious filenames after uploading a .zip file and clicking Process Images.

Analysis

AI-generated

Technical impact

The Koha Library system fails to sanitize filenames provided by users before extracting ZIP archives. Consequently, the script upload‑cover‑image.pl executes the shell command qx/unzip $filename -d $dirname/; with the filename directly concatenated. An attacker can supply a crafted filename containing shell metacharacters, which are then executed by the underlying shell. This flaw is a form of code injection (CWE‑94) and enables remote code execution, allowing the attacker to run arbitrary commands with the web process's privileges. Confidentiality, integrity, and availability of the affected environment could be compromised as a result.

Affected Systems

The vulnerability exists in Koha Library releases before version 23.05.10. The public release notes for 23.05.10 and later indicate that the issue has been addressed. Users operating with Koha 23.05.09 or earlier versions are exposed, while those running 23.05.10 or newer are not affected. No additional vendor or product name beyond Koha Library is cited.

Risk and Exploitability

The CVSS score of 9.8 marks this flaw as Critical. The EPSS score is 2 %, indicating a low level of current exploitation activity, and the vulnerability is not listed in CISA’s KEV catalog. The attack vector is likely web‑based: an authenticated or unauthenticated user might upload a malicious ZIP file and trigger the Process Images action. Successful exploitation would give an attacker remote code execution on the server, with full authority to modify data, exfiltrate information, or extend the attack surface. Administrators should assess whether the upload functionality is exposed to untrusted users and understand that the risk hinges on whether they can trigger the vulnerable script.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Koha to version 23.05.10 or later, as the vulnerability has been patched in these releases.
  • If an upgrade is not immediately possible, disable or remove the ability for users to upload ZIP archives through the Process Images feature or restrict the permission to trusted administrators only.
  • Monitor application logs for attempts to use shell metacharacters or suspicious file names during the unzipping process.
  • Apply general security best practices by ensuring that any file input is validated and all external commands are executed with sanitized arguments.

Generated by OpenCVE AI on June 18, 2026 at 02:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Title Koha Library Remote Code Execution via Uncontrolled Filename Injection in ZIP Unzip
Type Values Removed Values Added
Title Koha Library Remote Code Execution via Uncontrolled Filename Injection in ZIP Unzip
Type Values Removed Values Added
Title Command Injection via Untrusted Filenames in Koha Library File Upload
Type Values Removed Values Added
Title Command Injection via Untrusted Filenames in Koha Library File Upload
Type Values Removed Values Added
Title Command Injection via Untrusted Filenames in Koha Library Cover‑Image Upload
Weaknesses CWE-78
Type Values Removed Values Added
Weaknesses CWE-94
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Koha-community
Koha-community koha Library Software
Vendors & Products Koha-community
Koha-community koha Library Software
Type Values Removed Values Added
Title Command Injection via Untrusted Filenames in Koha Library Cover‑Image Upload
Weaknesses CWE-78
Type Values Removed Values Added
Description Koha Library before 23.05.10 fails to sanitize user-controllable filenames prior to unzipping, leading to remote code execution. The line "qx/unzip $filename -d $dirname/;" in upload-cover-image.pl is vulnerable to command injection via shell metacharacters because input data can be controlled by an attacker and is directly included in a system command, i.e., an attack can occur via malicious filenames after uploading a .zip file and clicking Process Images.
References
Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Apr 9, 2026, 1:49 PM
Reserved
May 19, 2024, 12:00 AM
Status
Awaiting Analysis
Published
Apr 7, 2026, 4:16 PM
Modified
Nov 8, 2026, 8:10 PM