CVE-2019-14315: SunHater KCFinder XSS Vulnerability in upload.php

sunhater/kcfinder Updated 02 Oct 2025

Summary

24/05/2022
No i
Moderate
6.1

CVE-2019-14315: SunHater KCFinder cross-site scripting (XSS) vulnerability in upload.php. Affects sunhater/kcfinder versions < 3.20-test2. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

SunHater KCFinder is an open-source file manager for web applications. It provides a user-friendly interface for uploading, browsing, and managing files on a server. The vulnerability affects versions 3.20-test1, 3.20-test2, 3.12, and earlier. The package is commonly used in web applications that utilize the CKEditorFuncNum parameter. This parameter is vulnerable to cross-site scripting (XSS) attacks, allowing remote attackers to inject arbitrary web script or HTML into the application.

Vulnerability Detail

The vulnerability arises from a lack of proper input sanitization in the upload.php file of SunHater KCFinder. By manipulating the CKEditorFuncNum parameter, an attacker can inject malicious code into the application. This can lead to various security risks, including session hijacking, defacement of web pages, and theft of sensitive user information. The vulnerability has a CVSS score of 6.1, indicating a moderate severity level.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, developers can disable the affected functionality or implement input validation and sanitization measures to prevent the exploitation of the CKEditorFuncNum parameter. Here is an example of input validation using PHP:

$ckeditorFuncNum = $_GET['CKEditorFuncNum'];

if (!ctype_digit($ckeditorFuncNum)) {
    // Handle invalid input
    exit;
}

// Continue with the normal flow

This code snippet ensures that the CKEditorFuncNum parameter is a valid digit and rejects any input that does not meet this requirement.

Conclusion

The XSS vulnerability in SunHater KCFinder's upload.php file can have serious security implications for web applications utilizing the CKEditorFuncNum parameter. It is crucial to promptly update the package to a version that addresses this vulnerability and to implement proper input validation and sanitization measures. Regular security audits and code reviews are essential to identify and mitigate such vulnerabilities. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for sunhater/kcfinder →

Share this vulnerability

FAQ

The vulnerability allows remote attackers to inject malicious code into the application, potentially leading to various security risks such as session hijacking, defacement of web pages, and theft of sensitive user information.

Versions 3.20-test1, 3.20-test2, 3.12, and earlier are affected by this vulnerability.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities using just the composer.lock file.

Yes, it is recommended to update SunHater KCFinder to the latest version that includes the necessary security patches.

To prevent XSS attacks, ensure that all user input is properly validated and sanitized before being displayed or processed. Implement input validation measures and use secure coding practices to mitigate the risk of XSS vulnerabilities.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback