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-96795 Overview
CVE-2026-96795 is a code injection vulnerability [CWE-94] in Horilla, an open-source Human Resources (HR) and Customer Relationship Management (CRM) software. The flaw resides in the HorillaListView.export_data method located in horilla_views/generic/cbv/views.py. An authenticated attacker can craft a malicious columns POST parameter that is interpolated into Python source code and passed to exec(), enabling arbitrary operating system command execution. In the shipped Docker image, the application process runs as root, so successful exploitation yields root-level command execution on the container. The issue is fixed in Horilla version 2.0.0.
Critical Impact
Authenticated attackers can execute arbitrary OS commands with application privileges, including root in the default Docker deployment.
Affected Products
- Horilla HR and CRM software prior to version 2.0.0
- Horilla Docker image prior to 2.0.0 (process runs as root)
- Deployments exposing the HorillaListView.export_data endpoint to authenticated users
Discovery Timeline
- 2026-09-25 - CVE-2026-96795 published to the National Vulnerability Database (NVD)
- 2026-09-28 - Last updated in NVD database
Technical Details for CVE-2026-96795
Vulnerability Analysis
The vulnerability lives in HorillaListView.export_data within horilla_views/generic/cbv/views.py. The handler reads the columns POST parameter supplied by an authenticated user and parses the value using ast.literal_eval. It then takes field_tuple[1] and interpolates that string directly into dynamic_fn_str, which contains Python source code assembled at runtime. That source is then handed to exec() to materialize a function.
Because the interpolated value is placed inside a default-argument expression that is evaluated when the function is defined, any Python syntax the attacker smuggles through ast.literal_eval is executed during the exec() call. The attacker does not need to invoke the resulting function. Simply defining it is enough to trigger payload execution.
Root Cause
The root cause is unsafe code construction and execution [CWE-94]. The developers assumed ast.literal_eval provided sufficient sanitization, but strings that remain valid literals can still contain Python syntax once concatenated into source code. The combination of string interpolation into executable source and dynamic function definition via exec() breaks the trust boundary between user input and application code.
Attack Vector
Exploitation requires an authenticated session with access to a list view that invokes export_data. The attacker submits a crafted columns POST body where one tuple's second element contains a payload. When Horilla builds dynamic_fn_str and calls exec(), Python evaluates the attacker-controlled default argument. This allows invocation of OS primitives such as os.system or subprocess calls. In the official Docker image, the Horilla process executes as root, giving the attacker root command execution inside the container and a pivot point into connected HR data stores.
See the GitHub Security Advisory GHSA-5g4v-4rv4-r26f for full technical details.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-96795
Indicators of Compromise
- POST requests to Horilla list-view export endpoints containing unusual columns payloads with embedded Python callables such as __import__, os.system, subprocess, or eval.
- Unexpected child processes spawned by the Horilla application (for example /bin/sh, curl, wget, python -c) under the Horilla user or root inside the container.
- Outbound network connections initiated by the Horilla process to unknown hosts shortly after an export_data request.
- New or modified files in the Horilla application directory, cron entries, or SSH authorized_keys inside the container.
Detection Strategies
- Inspect application access logs for POST requests to export_data endpoints and flag columns parameters whose values deviate from the expected list of tuples.
- Correlate authenticated session activity with process execution events on the Horilla host or container to identify command execution originating from the Python runtime.
- Deploy runtime application monitoring that alerts when the Horilla process invokes exec() with input-derived source containing dunder attributes or import statements.
Monitoring Recommendations
- Forward Horilla web, container runtime, and host process telemetry to a centralized analytics platform for correlation of web requests with process and network activity.
- Baseline the normal child-process tree for the Horilla container and alert on deviations such as shell interpreters or network utilities.
- Monitor privileged container activity for unexpected file writes, package installations, or credential access.
How to Mitigate CVE-2026-96795
Immediate Actions Required
- Upgrade Horilla to version 2.0.0 or later, which removes the unsafe exec() path in HorillaListView.export_data.
- Restrict access to Horilla to trusted networks and enforce strong authentication to reduce the pool of users who can reach export_data.
- Reconfigure the Horilla Docker image to run as a non-root user to limit blast radius if exploitation occurs.
- Review authentication, process, and network logs for signs of prior exploitation attempts against list-view export endpoints.
Patch Information
The maintainers fixed the vulnerability in Horilla version 2.0.0. Patch and release notes are available at Horilla HR Release 2.0.0. Administrators should plan an upgrade window, back up the database, and validate custom views that extend HorillaListView after patching.
Workarounds
- If immediate upgrade is not possible, place Horilla behind a reverse proxy or web application firewall that blocks POST requests whose columns parameter contains Python dunder syntax, imports, or callable invocations.
- Rebuild the Horilla container with a non-root USER directive and drop Linux capabilities such as CAP_SYS_ADMIN to constrain the impact of code execution.
- Temporarily disable or restrict access to list-view export functionality for non-administrative roles until the upgrade is applied.
# Example: upgrade Horilla via Docker to the patched release
docker pull horilla/horilla-hr:2.0.0
docker stop horilla && docker rm horilla
docker run -d --name horilla \
--user 1000:1000 \
--read-only \
--cap-drop ALL \
-p 8000:8000 \
horilla/horilla-hr:2.0.0
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

