Umami Reports API SQL Injection, No Fixed Release (CVE-2026-138445)
Umami through 3.5.0 lets a share-token holder inject SQL through a Reports API filter prefix; no fixed release exists, but commit 98937e7 fixes it.
TL;DR
- A share-token holder or signed-in user can put SQL in the
prefixfield of a Reports API object filter. Umami concatenates that value into a PostgreSQL column expression. - Every Umami release through 3.5.0 is affected, including the current 3.5.0. The attacker needs a share token or an account and a reachable Reports API.
- VulnCheck rates it CVSS v3.1 9.9 Critical (v4.0 9.4). No exploitation is known and no public proof of concept exists; it is not in CISA KEV as of 2026-11-30.
- No fixed release exists. Build from commit 98937e7 or restrict Reports API access to trusted users; see "How do I fix it?".
Am I affected?
An Umami instance is exposed when it runs an affected release and an attacker can reach the Reports API with a share token or an account. All of these conditions must hold:
- The instance runs Umami 3.5.0 or an earlier release.
- The Reports API under
/api/reports/is reachable from the attacker's network position. - The attacker holds a share token for any website, or a user account that can open a report section.
The share-token path matters. A dashboard share link carries a stateless token that never expires, and the Reports API accepts it when the x-umami-share-token and x-umami-share-context headers are present. The attacker does not need an administrator account. A deployment that blocks /api/reports/ from untrusted clients, or issues no share links, removes the reachable path but does not patch the code.
| Branch | Affected versions | Fixed version |
|---|---|---|
| 3.x | Through 3.5.0 | No fixed release; commit 98937e7 on master, 2026-11-25 |
For a source install, read the version and check for the vulnerable object-filter branch:
grep '"version"' package.json
git log -1 --format='%H %cs'
grep -n '\.\.\.filter,' src/lib/params.ts
The first command prints the release version. The third prints the line that spreads the client filter object; a match means the vulnerable branch is present. The fixed code writes the fields explicitly and has no ...filter in that branch.
For a container, inspect the image reference and build time:
docker inspect --format '{{.Config.Image}} {{.Image}}' umami
docker image inspect ghcr.io/umami-software/umami:latest --format '{{.Created}}'
The official image does not expose the application version inside the container. A tag of 3.5.0 or earlier is affected. For latest, compare the build time with the fix commit date and confirm the build source with your image publisher.
How do I fix it?
No fixed release exists as of 2026-11-30. Build from commit 98937e7 on master, or apply its change to src/lib/params.ts. The current release, 3.5.0 of 2026-11-12, is affected.
For a source deployment, build the fixed commit:
- Back up the database and the current
.envfile. - Fetch the repository and check out the fix commit.
- Install dependencies, build, and restart the application.
git fetch origin
git checkout 98937e71bd776a44c58190051a58cdac811a5daf
pnpm install
pnpm build
pnpm start
The fix commit changes only src/lib/params.ts and its test. It adds no database migration, so a restart is enough after the build.
For the official image, wait for a release that contains the commit. Pulling the 3.5.0 tag or latest does not install the fix, because the commit landed after the release.
If you cannot patch at once, restrict the reachable paths:
- Delete unused dashboard and board shares. Share tokens are stateless, so deleting the share is the revocation step.
- At the reverse proxy, reject requests to
/api/reports/that carry thex-umami-share-tokenheader. - Limit report access to accounts you trust until the code is fixed.
The proxy rule closes the share-token path only. A signed-in user with report access still reaches the vulnerable filter parser, and the rule does not fix the concatenation itself.
What is the root cause?
The Reports API accepts an object filter whose prefix value is copied into a SQL column expression without validation or binding. The request parser keeps only keys that name a known filter column, but it keeps the whole object value for those keys, including prefix.
filtersObjectToArray() in src/lib/params.ts at release 3.5.0 handles two filter shapes. The object branch spreads the client object first, then replaces name and column:
const baseName = key.replace(/\d+$/, '');
const paramName = key !== baseName ? key : undefined;
// Object filters come from request bodies. Derive name and paramName from the
// validated key; they become SQL placeholder names and must not be client-controlled.
if (filter?.name && filter?.value !== undefined) {
return arr.concat({
...filter,
name: baseName,
column: options?.columns?.[baseName] ?? FILTER_COLUMNS[baseName],
paramName,
});
}
The spread copies every other property from the request value. prefix is not one of the properties replaced afterwards, so a client-supplied prefix survives.
getFilterQuery() in src/lib/prisma.ts then builds the column expression by joining prefix and column before it reaches the SQL builder:
filtersObjectToArray(filters, options).forEach(
({ name, column, operator, prefix = '', paramName }) => {
if (isCohort) {
column = FILTER_COLUMNS[name.slice('cohort_'.length)];
}
if (column) {
const clause = mapFilter(`${prefix}${column}`, operator, name, '', paramName);
mapFilter() places that string after the table alias and interpolates it into the query text. Only the comparison value becomes a bind parameter:
const table = SESSION_COLUMNS.includes(name) ? 'session' : 'website_event';
switch (operator) {
case OPERATORS.equals:
return `${table}.${column} = ANY(${value})`;
The concatenated string is website_event. plus the attacker's prefix plus the real column name. A prefix that closes the identifier and adds SQL syntax changes the WHERE clause that PostgreSQL receives.
How is it exploited?
- The attacker obtains a share token for any website, or signs in to an account that can open a report section.
- The attacker sends a report request to
/api/reports/breakdownor another Reports API endpoint with afiltersobject. - The filter object uses a known column key such as
path1and suppliesname,operator,value, and a craftedprefix. getRequestFilters()keeps the key because its base name is a known filter column, andfiltersObjectToArray()spreads the object without removingprefix.getFilterQuery()concatenates the prefix into the column expression, and PostgreSQL executes the modified WHERE clause.- The query returns or changes rows outside the website the share or account was granted.
No public proof of concept or request body has been published. The CVE record describes the injection and its impact but does not publish a payload.
How does the attack flow?
A share token or an account reaches a Reports API object filter whose unvalidated prefix is concatenated into the PostgreSQL column expression, so the query escapes the website scope.
What can an attacker do?
An attacker can read analytics data outside the website the share or account was granted. The CVE record describes the impact as reading or modifying data beyond the requested website.
The conditions are a share token that still resolves or a user account, access to a report section, and a reachable Reports API. No administrator role is required. The report endpoints return query results, and the CVE record does not publish a request that writes data or executes code.
VulnCheck rates it CVSS v3.1 9.9, CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H, and CVSS v4.0 9.4, CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H. The record does not publish a victim count or evidence of use.
Why does the fix work?
The fix stops copying client-controlled fields into the filter object. Commit 98937e7 replaces the spread with an explicit list of fields and takes prefix from the server-side options:
- return arr.concat({
- ...filter,
- name: baseName,
- column: options?.columns?.[baseName] ?? FILTER_COLUMNS[baseName],
- paramName,
- });
+ return arr.concat({
+ name: baseName,
+ paramName,
+ column: options?.columns?.[baseName] ?? FILTER_COLUMNS[baseName],
+ operator: filter.operator,
+ value: filter.value,
+ prefix: options?.prefix,
+ });
Only operator and value now come from the request. name, paramName, column, and prefix are derived on the server. The added test checks that a client prefix and column are ignored and that a server-supplied prefix is kept.
The change is narrow and closes the object-filter path. The other branch in the same function already builds prefix from options, so it does not carry a client value. The fix is not in a release yet.
How do I check if I was compromised?
No vendor or researcher has published indicators of compromise. An attempt can leave no trace when statement logging is off, which is the PostgreSQL default.
If PostgreSQL statement logging is enabled, search for report queries whose column expression contains SQL comment markers or boolean tautologies:
grep -Ei 'website_event\..*(--|/\*| or 1=1)' /var/log/postgresql/postgresql-*.log
A hit is a lead, not proof. Report queries contain user filters, so review the surrounding statement and the source address. Enable log_statement = 'all' only for a bounded investigation, because it records query text for every session.
Review reverse-proxy access logs for Reports API requests that carry a share token from unexpected addresses:
grep -Ei 'POST /api/reports/' /var/log/nginx/access.log | grep -i 'x-umami-share-token'
Most proxies do not log request headers by default, so this search only works when header logging is on. Check the share list for tokens you no longer use and delete every stale share.
Timeline
- 2026-11-12: Umami 3.5.0 is released; it is the current release and is affected.
- 2026-11-25: Commit 98937e7 lands on master and fixes the object-filter path.
- 2026-11-29: VulnCheck publishes CVE-2026-138445 with CVSS v3.1 9.9.
- 2026-11-30: The GitHub Advisory Database publishes GHSA-ccj2-m35r-34fc.
FAQ
Does a share link alone expose the instance?
Yes, when the token still resolves and the share grants a report section. The server re-checks the share on every request, so deleting the share revokes the token. The token itself is stateless and never expires.
Is there a fixed release?
No. The latest release is 3.5.0 of 2026-11-12, and the fix is commit 98937e7 on master, dated 2026-11-25. A release published after that commit would carry the fix, but none existed on 2026-11-30.
Does the attacker need an administrator account?
No. A share-token holder or any signed-in user with access to a report section can reach the filter parser. The share-token path needs no account at all.
Can the flaw execute code?
No public source demonstrates code execution. The injection changes a PostgreSQL query, and the CVE record describes read or modify impact. Treat the database and the analytics data as exposed, not the host.
Does blocking /api/reports/ fix it?
No. It removes one reachable path and breaks report pages. A signed-in user still reaches the parser through other report routes, and the code remains vulnerable until the commit is deployed.
Is it exploited in the wild?
No exploitation is known and it is not in CISA KEV as of 2026-11-30. The CVE record and the GitHub advisory publish no campaign data.
References
- VulnCheck, CVE-2026-138445 record, published 2026-11-29 (checked November 30, 2026): https://www.cve.org/CVERecord?id=CVE-2026-138445
- VulnCheck, "Umami through 3.5.0 SQL Injection via Reports API Filter Prefix" (checked November 30, 2026): https://www.vulncheck.com/advisories/umami-through-3.5.0-sql-injection-via-reports-api-filter-prefix
- Umami, fix commit 98937e7, "Build object filters from operator and value only", committed 2026-11-25 (checked November 30, 2026): https://github.com/umami-software/umami/commit/98937e71bd776a44c58190051a58cdac811a5daf
- GitHub Advisory Database, GHSA-ccj2-m35r-34fc, published 2026-11-30 (checked November 30, 2026): https://github.com/advisories/GHSA-ccj2-m35r-34fc
- Umami, v3.5.0 release notes, published 2026-11-12 (checked November 30, 2026): https://github.com/umami-software/umami/releases/tag/v3.5.0
- Umami source at v3.5.0,
src/lib/params.ts(checked November 30, 2026): https://github.com/umami-software/umami/blob/v3.5.0/src/lib/params.ts - Umami source at v3.5.0,
src/lib/prisma.ts(checked November 30, 2026): https://github.com/umami-software/umami/blob/v3.5.0/src/lib/prisma.ts - Umami repository, 40,500 stars and 8,700 forks (checked November 30, 2026): https://github.com/umami-software/umami
- CISA, Known Exploited Vulnerabilities Catalog, checked 2026-11-30 (checked November 30, 2026): https://www.cisa.gov/known-exploited-vulnerabilities-catalog
Keep reading
