CVE-2025-2976
Executive Summary
CVE-2025-2976 is a stored cross-site scripting (XSS) vulnerability in GFI KerioConnect version 10.0.6. The flaw resides in an unknown file upload function, allowing an attacker to inject malicious scripts via crafted file names or metadata. The vulnerability is remotely exploitable with low complexity and does not require authentication, but does require user interaction (e.g., an admin viewing the uploaded file). The vendor was contacted but did not respond, leaving the product unpatched. A public proof-of-concept (PoC) exists, increasing the risk of active exploitation.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability does not affect NPM, PyPI, Go, or Ruby packages. It is a proprietary enterprise email and collaboration suite (KerioConnect). No open-source package dependencies are involved.
CVSS Breakdown & Threat Level
- CVSS Score: 4.3 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – victim must view the malicious file
- Scope: Changed (S:C) – impact may extend to other components
- Confidentiality Impact: Low (C:L) – limited data exposure
- Integrity Impact: Low (I:L) – limited script injection
- Availability Impact: None (A:N)
Threat Level: Medium. The vulnerability is easy to exploit but requires user interaction. However, the lack of a patch and public PoC elevates the risk for unpatched instances.
Deep Dive & Mechanics
The vulnerability is a stored XSS in the file upload functionality of KerioConnect 10.0.6. When a user uploads a file, the application does not properly sanitize the file name or associated metadata (e.g., description, tags). An attacker can craft a file name containing JavaScript payloads, such as:
<script>alert('XSS')</script>.txt
When an administrator or another user views the uploaded file in the web interface (e.g., file manager, email attachment preview), the malicious script executes in the context of the victim’s browser. This can lead to session hijacking, credential theft, or further attacks within the KerioConnect environment.
The root cause is insufficient input validation and output encoding on the server side. The application likely reflects the file name in HTML without proper escaping.
Vulnerable vs. Patched Code
Vulnerable Code (KerioConnect 10.0.6):
// Example of vulnerable file upload handler
$fileName = $_FILES['file']['name'];
// No sanitization
echo "<div>Uploaded file: $fileName</div>";
Patched Code (Hypothetical):
// Secure version with output encoding
$fileName = htmlspecialchars($_FILES['file']['name'], ENT_QUOTES, 'UTF-8');
echo "<div>Uploaded file: $fileName</div>";
Since no official patch exists, the above is a recommended fix. The vendor has not responded, so users must implement their own mitigations.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- KerioConnect 10.0.6 instance accessible via web
- Ability to upload files (e.g., via email attachment or file manager)
Exploit Steps:
- Craft a malicious file name:
<img src=x onerror=alert(document.cookie)>.txt - Upload the file to the KerioConnect server (e.g., via the web interface or SMTP attachment).
- Wait for an administrator to view the file in the file manager or email preview.
- The JavaScript executes, exfiltrating cookies or performing actions on behalf of the victim.
Proof-of-Concept (PoC) Script:
import requests
target = "https://target-kerio-connect.com"
payload = "<img src=x onerror=alert('XSS')>.txt"
files = {'file': (payload, 'dummy content', 'text/plain')}
cookies = {'session': 'valid_session_cookie'} # Attacker must have a valid session
response = requests.post(f"{target}/upload_endpoint", files=files, cookies=cookies)
print("File uploaded. Trigger XSS by viewing the file.")
Blue Team (Detection & Defense)
Detection:
- Monitor file upload logs for suspicious file names containing HTML/JavaScript characters.
- Use WAF rules to block file names with
<script>,<img,onerror, etc. - Deploy endpoint detection rules for XSS patterns in web application logs.
Defense:
- Implement strict input validation and output encoding for all user-supplied data.
- Disable file upload functionality if not required.
- Apply a virtual patch via WAF (e.g., ModSecurity rule to block XSS in file names).
Indicators of Compromise (IOCs)
- File Names: Any file name containing
<script>,<img,onerror,onload,javascript:, or similar XSS payloads. - Log Entries: HTTP requests to
/upload_endpointwithfilenameparameter containing HTML tags. - Network Traffic: Outbound HTTP requests from the KerioConnect server to attacker-controlled domains (if payload exfiltrates data).
- Session Anomalies: Unexpected session cookie changes or admin actions performed without user interaction.
Detection Engineering
YARA Rule
rule CVE_2025_2976_XSS_FileUpload {
meta:
description = "Detects XSS payloads in file names targeting KerioConnect"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-2976"
strings:
$xss1 = /<script[^>]*>/i
$xss2 = /<img[^>]*onerror/i
$xss3 = /<svg[^>]*onload/i
$xss4 = /javascript:/i
condition:
any of ($xss*)
}
Sigma Rule
title: CVE-2025-2976 KerioConnect File Upload XSS
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects file uploads with XSS payloads in file names
author: Valters IT
date: 2025-04-10
logsource:
category: web
product: kerioconnect
detection:
selection:
http.method: POST
http.url: "*upload*"
http.filename|contains:
- "<script"
- "<img"
- "onerror"
- "onload"
- "javascript:"
condition: selection
falsepositives:
- Legitimate file names containing these strings (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-2976 KerioConnect File Upload XSS Attempt"; flow:to_server; content:"POST"; http_method; content:"upload"; http_uri; pcre:"/<script|<img|onerror|onload|javascript:/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable file upload functionality in KerioConnect if not critical.
- Apply a WAF rule to block file names containing HTML/JavaScript characters.
- Restrict access to the KerioConnect web interface to trusted IPs only.
Long-Term Fix:
- Since the vendor is unresponsive, consider migrating to an alternative email/collaboration platform.
- If migration is not possible, implement a reverse proxy with input sanitization (e.g., Nginx with
ngx_http_sub_moduleto strip XSS patterns). - Regularly audit file upload logs for suspicious activity.
Patch Status: No official patch available. Users must rely on compensating controls.
Valters IT