Skip to main content
Vulnerability Database/CVE-2026-86066

CVE-2026-86066: Horilla HR Software CSRF Vulnerability

CVE-2026-86066 is a cross-site request forgery flaw in Horilla HR and CRM software that allows attackers to approve attendance requests using a manager's privileges. This post covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-86066 Overview

Horilla is an open-source Human Resources (HR) and Customer Relationship Management (CRM) application. A Cross-Site Request Forgery (CSRF) flaw [CWE-352] in versions prior to 2.0.0 allows unauthenticated attackers to trick an authenticated manager into approving attendance requests. The vulnerable endpoint approve_validate_attendance_request at /attendance/approve-validate-attendance-request/ mutates state through an HTTP GET request before calling attendance.save(). Because Django does not enforce CSRF validation on GET requests, the manager's SameSite=Lax session cookie is sent on a top-level navigation and the approval executes with the victim's privileges.

Critical Impact

An unauthenticated attacker can silently approve attendance records using a logged-in manager's session, with the forged approval attributed to the victim in the audit trail.

Affected Products

  • Horilla HR versions prior to 2.0.0
  • Horilla attendance module endpoint approve_validate_attendance_request
  • Horilla attendance module endpoint cancel-validate-attendance-request

Discovery Timeline

  • 2026-09-25 - CVE-2026-86066 published to the National Vulnerability Database (NVD)
  • 2026-09-30 - Last updated in NVD database

Technical Details for CVE-2026-86066

Vulnerability Analysis

The vulnerability resides in Horilla's attendance request handling. The approve_validate_attendance_request view accepts HTTP GET requests and uses them to change persistent model state, setting attendance_validated, is_validate_request_approved, and approved_by before invoking attendance.save(). Django's CSRF middleware applies only to unsafe methods such as POST, so GET-based state changes bypass CSRF token validation entirely.

A cancel endpoint, cancel-validate-attendance-request, exhibits the same pattern. An attacker can host a page containing an image tag, link, or redirect that targets the vulnerable URL. When a logged-in user with the attendance.change_attendance permission visits the attacker-controlled page, the browser attaches the session cookie because SameSite=Lax permits top-level GET navigations.

The approval runs with the victim's privileges and the audit trail records the victim as the approver, concealing the actual source of the action and corrupting attendance records.

Root Cause

The root cause is the use of unsafe HTTP methods for state-changing operations. Django exempts GET requests from CSRF validation under the assumption that GET is idempotent. The Horilla views violate this assumption by writing to the database on GET, breaking the browser security model that SameSite=Lax cookies rely on.

Attack Vector

Exploitation requires only that an authenticated manager visit an attacker-controlled URL or page. No user interaction with the Horilla application itself is required beyond having an active session. The attack is remote, network-based, and does not require attacker credentials.

html
<!-- Conceptual attack scenario: a top-level GET navigation carries the
     victim manager's SameSite=Lax session cookie to the vulnerable endpoint -->
<img src="https://victim-horilla.example/attendance/approve-validate-attendance-request/123/" />

Detection Methods for CVE-2026-86066

Indicators of Compromise

  • Attendance records showing is_validate_request_approved=True with approval timestamps that do not align with the approver's normal working hours or login activity.
  • Web server access logs containing GET requests to /attendance/approve-validate-attendance-request/ or /attendance/cancel-validate-attendance-request/ with external Referer headers.
  • Audit trail entries where the recorded approved_by user has no corresponding session activity in authentication logs at the approval time.

Detection Strategies

  • Review HTTP access logs for GET requests to attendance validation endpoints originating from unexpected Referer values or cross-origin sources.
  • Correlate approval timestamps in the Horilla database against user authentication and session telemetry to flag approvals that lack a matching interactive session.
  • Alert on bulk attendance approvals occurring within short time windows that deviate from managerial baselines.

Monitoring Recommendations

  • Enable verbose request logging on the Horilla web tier and forward logs to a centralized SIEM for correlation.
  • Monitor for outbound links or email campaigns targeting Horilla users that contain URLs pointing to the attendance endpoints.
  • Track changes to the attendance_validated and approved_by fields using database audit triggers or application-level change logs.

How to Mitigate CVE-2026-86066

Immediate Actions Required

  • Upgrade Horilla to version 2.0.0, which replaces vulnerable hx-get and href state-changing links with hx-post requests that enforce CSRF validation.
  • Audit recent attendance approvals and cancellations for records that may have been forged through CSRF exploitation.
  • Instruct managers with the attendance.change_attendance permission to log out of Horilla before browsing untrusted sites until the patch is applied.

Patch Information

The fix is included in Horilla version 2.0.0. The upstream commit 87a23ecaf2944c15dc5c131f813d2b83fd56eaa0 converts the attendance request action links from GET to POST and adds hx-confirm prompts. Review the GitHub Security Advisory GHSA-65vj-5p5g-pv5m and the GitHub Release v2.0.0 for release notes.

The patch converts action links to use HTMX POST requests:

html
{% if perms.attendance.change_attendance or can_manage %}
    <a
        href="#"
-       hx-get="{% url 'cancel-validate-attendance-request' instance.id %}"
+       hx-post="{% url 'cancel-validate-attendance-request' instance.id %}"
        hx-target="#validateAttendanceRequestModalBody"
        hx-swap="innerHTML"
        class="oh-btn oh-btn--danger w-100"

Source: GitHub Commit 87a23ec

A second template change adds hx-confirm and switches to POST:

html
<a
-   type="submit"
+   href="#"
    class="oh-btn oh-btn--danger oh-btn--light-bkg w-100"
    title="{% trans 'Re-validate Request' %}"
-   onclick="return confirm('{% trans "Are you sure want to cancel the request?" %}')"
-   href="{% url 'cancel-validate-attendance-request' attendance.id %}"
+   onclick="event.preventDefault();"
+   hx-confirm="{% trans 'Are you sure want to cancel the request?' %}"
+   hx-post="{% url 'cancel-validate-attendance-request' attendance.id %}"
+   hx-target="this"
>

Source: GitHub Commit 87a23ec

Workarounds

  • If immediate upgrade is not possible, place Horilla behind a reverse proxy that blocks GET requests to /attendance/approve-validate-attendance-request/ and /attendance/cancel-validate-attendance-request/.
  • Configure session cookies with SameSite=Strict to prevent the manager's session cookie from being sent on cross-site top-level navigations.
  • Restrict the attendance.change_attendance permission to a minimal set of accounts and require those accounts to use dedicated browser profiles.
bash
# Example Nginx rule to block GET requests to the vulnerable endpoints
location ~ ^/attendance/(approve-validate|cancel-validate)-attendance-request/ {
    if ($request_method = GET) {
        return 405;
    }
    proxy_pass http://horilla_backend;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.