CVE-2026-138445 in Umami
Summary
by MITRE • 11/30/2026
Umami through 3.5.0 contains an sql injection vulnerability that allows share token holders or authenticated users to inject SQL by supplying a crafted prefix field in Reports API object filters. Attackers can send crafted filters to /api/reports/ endpoints, which getFilterQuery concatenates unquoted into Postgres WHERE clauses, to read or modify data beyond the requested website.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/30/2026
The vulnerability identified in Umami versions through 3.5.0 represents a critical SQL injection flaw within its reporting infrastructure, specifically targeting the /api/reports/ endpoints. This security defect allows attackers who possess valid share tokens for dashboards or authenticated user credentials to execute arbitrary Structured Query Language commands against the underlying PostgreSQL database. The root cause lies in how the application handles input validation and query construction during report generation. When a request is made to generate a report, the system processes various filter parameters provided by the client. Among these filters is a prefix field that is intended to restrict or format data retrieval based on specific criteria. However, the internal function getFilterQuery fails to properly sanitize this input before incorporating it into the database query string. Instead of using parameterized queries or prepared statements which would safely escape special characters, the application directly concatenates the unquoted user-supplied prefix value into the WHERE clause of a SQL statement sent to PostgreSQL.
This architectural oversight creates a classic injection vector where an attacker can manipulate the logic of the SQL query by injecting malicious syntax. By supplying a crafted string in the prefix field that includes SQL metacharacters such as single quotes, semicolons, or logical operators like OR and AND combined with tautologies, an adversary can alter the intended filtering conditions. For instance, an attacker might inject a payload designed to bypass authentication checks for other websites tracked by Umami or extract sensitive data from tables outside the scope of the authorized dashboard. Because the vulnerability affects share token holders as well as authenticated users, the attack surface is significantly broadened. Share tokens are often distributed more widely and may have less stringent security monitoring than primary administrative accounts, making them an attractive entry point for exploitation. The ability to read or modify data beyond the requested website implies that a compromise of one dashboard could potentially lead to a full database takeover if privilege escalation techniques are applied within the injected SQL commands.
The operational impact of this vulnerability is severe, encompassing both confidentiality and integrity risks against the Umami analytics platform. Confidentiality is compromised as attackers can exfiltrate sensitive visitor data, including IP addresses, user agents, referral sources, and potentially personally identifiable information if such data was collected by the tracked websites. Integrity is threatened because malicious actors could inject false traffic data to skew analytics results or delete existing records to cover their tracks. Furthermore, depending on the database configuration and permissions granted to the application's database user, there may be potential for remote code execution through advanced SQL injection techniques that interact with server-level features such as stored procedures or file system access functions in PostgreSQL. This elevates the risk from simple data theft to complete infrastructure compromise.
To mitigate this vulnerability, immediate action is required by upgrading Umami to version 3.5.1 or later where the issue has been patched. The fix involves implementing proper input validation and ensuring that all database queries utilize parameterized statements rather than string concatenation for dynamic values. Administrators should also enforce strict access controls on their databases, adhering to the principle of least privilege by ensuring the application user account does not have excessive permissions such as superuser rights or file system write capabilities unless absolutely necessary. Additionally, deploying a Web Application Firewall can provide an additional layer of defense by detecting and blocking common SQL injection patterns in HTTP requests before they reach the application logic. Regular security audits and code reviews focusing on database interaction layers are recommended to prevent similar flaws from being introduced in future updates.
From a classification perspective, this vulnerability aligns with CWE-89 Improper Neutralization of Special Elements used in an SQL Command, which describes failures to neutralize special elements that could alter the intent of a command. In terms of offensive security frameworks, it maps directly to MITRE ATT&CK technique T1059 Command and Scripting Interpreter under the sub-technique for SQL commands, specifically within the context of data exfiltration or modification via injection attacks. Understanding these mappings helps in categorizing the threat correctly during incident response and ensures that appropriate countermeasures from both application security and network defense domains are applied to secure the environment against this specific type of exploitation.