critical

CVE

CVE-2026-138445

CWE

CWE-89, CWE-78, CWE-639

Affected Surface

  • Umami 3.5.0 (GitHub release and `ghcr.io/umami-software/umami:3.5.0` / `:latest`, built 12 November 2026): SQL injection through the `prefix` field of Reports API object filters (CVE-2026-138445). Fixed only on master in commit `98937e7` (25 November 2026)
  • Umami up to 3.4.1: SQL injection through the `paramName` field of Reports API object filters (GHSA-vhf9-rcmp-v5fc). The advisory lists `<= 3.4.0`, but 3.4.1 was tagged before the fix commit `4fa9769`, which first shipped in 3.5.0
  • Any Umami instance with a public share link (triggerable without an account) or with low-privilege user accounts; remote code execution as the `postgres` OS user when `DATABASE_URL` points at a superuser role, as in the shipped `docker-compose.yml`

TL;DR

Umami is a privacy-focused, self-hosted alternative to Google Analytics, with about 40,000 GitHub stars. Its compatibility Reports API (/api/reports/*) turns filter objects from the request body into PostgreSQL WHERE clauses. Two fields in those objects ended up in SQL text instead of bound parameters:

  • paramName (GHSA-vhf9-rcmp-v5fc, CVSS 9.9). The name was pasted into a {{placeholder}}. Only the first {{word}} became a bound parameter, and everything after it ran as SQL. Umami published the advisory on 13 November 2026, credited to Yo1o-sir, with no CVE. It includes a full exploit chain. The advisory says the only prerequisite is a public share link, and that on the project’s own docker-compose.yml the database role is a superuser, so the injection becomes file write and a reverse shell as postgres. The fix, commit 4fa9769, shipped in Umami 3.5.0 on 12 November.
  • prefix (CVE-2026-138445, CVSS 9.4 v4 / 9.9 v3.1). The 3.5.0 fix kept copying the client’s whole filter object with ...filter, so a client-supplied prefix still flowed into the column expression. VulnCheck published this on 29 November, credited to OrolXamraev and Umami maintainer Francis Cao. The fix, commit 98937e7 from 25 November, is on master only. The latest release is still 3.5.0, and ghcr.io/umami-software/umami:latest is the same image as :3.5.0.

Share tokens are issued without authentication by GET /api/share/<slug>, and share links are often public on purpose. Read “authenticated” in both advisories as “anyone with a share link”. A PoC repository for CVE-2026-138445 was published on GitHub on 30 November. The CVE isn’t in CISA KEV and has no EPSS score yet.

What to do now:

  1. Upgrade anything older than 3.5.0 to 3.5.0. It closes the paramName RCE chain.
  2. On 3.5.0, build from master at 98937e7 or later, or apply that commit’s change to src/lib/params.ts. Until then, turn off share links on every website.
  3. Point DATABASE_URL at a PostgreSQL role that isn’t a superuser. That turns either bug from RCE back into a data breach.
  4. Check PostgreSQL for the RCE artifacts listed below: large objects, session_preload_libraries, and changes to postgresql.auto.conf.

Affected packages and projects

EcosystemPackageAffected versionsFixed or safe version
GitHub / sourceumami-software/umami, paramName injection (GHSA-vhf9-rcmp-v5fc)<= 3.4.0 per the advisory; 3.4.1 also lacks the fix3.5.0 (commit 4fa9769)
GitHub / sourceumami-software/umami, prefix injection (CVE-2026-138445)<= 3.5.0master at 98937e7 or later. No release yet
Container (ghcr.io)ghcr.io/umami-software/umami:3.5.0, :latest (both sha256:b64f40400d77…5dbc, built 12 November 2026) and earlier tagsNone published. The :master tag was last built in November 2025

The advisory’s range for GHSA-vhf9 stops at 3.4.0, but Umami 3.4.1 was tagged at 08:26 UTC on 23 October and the fix commit landed at 21:39 UTC the same day. The 3.4.1 tag still has the vulnerable paramName: paramName ?? filter.paramName line, and GitHub’s compare view puts 4fa9769 after it. Treat 3.4.1 as affected.

Technical analysis

The sink: placeholder rewriting in executeRawQuery

Umami writes its PostgreSQL queries with {{name}} placeholders and converts them to $1, $2 and so on just before execution (src/lib/prisma.ts, 3.5.0):

const query = sql?.replaceAll(/\{\{\s*(\w+)(::\w+)?\s*}}/g, (...args) => {
  const [, name, type] = args;
  const value = data[name];
  params.push(value);
  return `$${params.length}${type ?? ''}`;
});

Values are bound, but everything else in sql, including the placeholder names and column expressions, is trusted text. Filters are turned into SQL in mapFilter, which builds both the column and the placeholder from its arguments:

function mapFilter(column: string, operator: string, name: string, type: string = '', paramName?: string) {
  const param = paramName ?? name;
  const value = `{{${param}${type ? `::${type}` : ''}}}`;
  ...
  switch (operator) {
    case OPERATORS.equals:
      return `${table}.${column} = ANY(${value})`;

getFilterQuery calls it with the filter’s prefix glued onto the column:

filtersObjectToArray(filters, options).forEach(
  ({ name, column, operator, prefix = '', paramName }) => {
    ...
    const clause = mapFilter(`${prefix}${column}`, operator, name, '', paramName);

So paramName, name, column and prefix all have to come from the server. The bugs come from filtersObjectToArray in src/lib/params.ts letting the request body choose them.

GHSA-vhf9: breaking out of the placeholder (3.4.x)

In 3.4.1, an object filter from the request body was copied whole:

if (filter?.name && filter?.value !== undefined) {
  return arr.concat({
    ...filter,
    column: options?.columns?.[baseName] ?? FILTER_COLUMNS[baseName],
    paramName: paramName ?? filter.paramName,
  });
}

The advisory’s worked example sets paramName to p}} or 1=1 --. mapFilter produces {{p}} or 1=1 --}}. The regex matches only {{p}} and replaces it with $2, which binds to NULL, and or 1=1 --}} stays in the query. The trailing -- comments out the rest of the line. The injection sits inside a WHERE expression, so any SQL expression works without stacked statements. The report endpoints also accept arbitrary nested keys, because reportResultSchema declares filters with .passthrough().

The advisory explains why no account is needed:

  • The /api/reports/* handlers authenticate through parseRequest(), and checkAuth accepts a share token.
  • GET /api/share/<slug> hands out a signed token and the websiteId without authentication.
  • canViewWebsiteSection grants every section when the share’s parameters contain no section flags.
  • The injected SQL isn’t limited to the shared website, so it can read every tenant’s data, bcrypt password hashes, API key hashes and 2FA records.

The RCE step depends on the database role. The shipped docker-compose.yml sets POSTGRES_USER: umami and DATABASE_URL: postgresql://umami:umami@db:5432/umami. The official Postgres image runs initdb as that user, so umami is the cluster’s bootstrap superuser. The advisory’s chain uses six single-expression injections. It stores a shared library as a large object (lo_from_bytea) and writes it to /tmp/shell.so with lo_export. It then writes session_preload_libraries = '/tmp/shell.so' into postgresql.auto.conf the same way and calls pg_reload_conf(). Finally it runs pg_terminate_backend() on the app’s pooled connections, so the next backend loads the library and opens a reverse shell. On managed databases or least-privileged roles, the impact drops to reading the database and some files.

The 3.5.0 fix and why it wasn’t enough

Commit 4fa9769 (23 October) took name and paramName from the validated key instead of the body:

     if (filter?.name && filter?.value !== undefined) {
       return arr.concat({
         ...filter,
+        name: baseName,
         column: options?.columns?.[baseName] ?? FILTER_COLUMNS[baseName],
-        paramName: paramName ?? filter.paramName,
+        paramName,
       });
     }

...filter is still there, and prefix isn’t overwritten afterwards. Whatever the client sends as prefix reaches ${prefix}${column} in getFilterQuery, and from there mapFilter writes it into the WHERE clause as ${table}.${prefix}${column} = ANY($n). That is CVE-2026-138445. VulnCheck describes the same audience as the first bug: share token holders and authenticated users sending crafted filters to /api/reports/ endpoints, reading or changing data beyond the requested website. VulnCheck doesn’t mention RCE. The injected text runs under the same DATABASE_URL role as before, though, so the superuser path in the GHSA-vhf9 chain is worth closing either way.

The real fix

Commit 98937e7 (25 November) stops spreading the body object. Only operator and value come from the client, and prefix comes from server-side options:

-    // 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.
+    // Object filters come from request bodies. Only operator and value are taken from the
+    // client; everything else is derived server-side because it ends up in SQL text.
     if (filter?.name && filter?.value !== undefined) {
       return arr.concat({
-        ...filter,
         name: baseName,
-        column: options?.columns?.[baseName] ?? FILTER_COLUMNS[baseName],
         paramName,
+        column: options?.columns?.[baseName] ?? FILTER_COLUMNS[baseName],
+        operator: filter.operator,
+        value: filter.value,
+        prefix: options?.prefix,
       });
     }

The new tests check that a client-supplied prefix and column are ignored and a server-supplied prefix (e.) survives. operator still comes from the client. In the 3.5.0 mapFilter it only selects a switch case, and it’s never interpolated.

The PoC

googlesky/CVE-2026-138445 went up at 05:10 UTC on 30 November. It doesn’t attack a real Umami install. It ships a Python model of the vulnerable and fixed filtersObjectToArray, a small HTTP service around it and a client that reports whether an injected prefix reached the generated SQL. It shows the bug clearly but isn’t a ready-made exploit against Umami itself. The GHSA-vhf9 advisory already includes request-level exploitation steps for the older bug, including the reverse shell.

IOCs

No exploitation in the wild has been reported, and no attacker infrastructure has been published. These artifacts come from the two advisories and the RCE chain in GHSA-vhf9:

  • Requests to /api/share/<slug> followed shortly by POST /api/reports/<type> from the same client, with the x-umami-share-token and x-umami-share-context: 1 headers.
  • Report request bodies whose filters objects carry paramName, prefix or column keys, or values containing }}, --, pg_sleep, pg_read_file, lo_from_bytea, lo_export or pg_reload_conf.
  • Report requests that take about as long as a pg_sleep() argument (the advisory’s time-based check uses 3 seconds).
  • PostgreSQL large objects you didn’t create, a non-empty session_preload_libraries, a postgresql.auto.conf changed outside your own config management, or unexpected .so files under /tmp on the database host.
  • Outbound connections from the postgres process.

Detection and remediation

Find out what you’re running. :latest and :3.5.0 are the same image:

docker image inspect ghcr.io/umami-software/umami:latest --format '{{index .RepoDigests 0}}'
# ghcr.io/umami-software/umami@sha256:b64f40400d77bcadd39cf5c62a1e368c99524ca442024f96e1133355a19a5dbc = 3.5.0

# From a source checkout: is the CVE-2026-138445 fix present?
git merge-base --is-ancestor 98937e71bd776a44c58190051a58cdac811a5daf HEAD && echo fixed || echo vulnerable
grep -n -A3 'filter?.name && filter?.value !== undefined' src/lib/params.ts   # "...filter," means vulnerable

Check the database role and look for the RCE chain’s leftovers:

-- Is the role in DATABASE_URL a superuser?
SELECT current_user, rolsuper FROM pg_roles WHERE rolname = current_user;

-- Large objects (Umami's own schema doesn't create any)
SELECT oid, lomowner::regrole FROM pg_largeobject_metadata;

-- Preload libraries and settings written through ALTER SYSTEM / postgresql.auto.conf
SHOW session_preload_libraries;
SELECT name, setting, sourcefile FROM pg_settings WHERE sourcefile LIKE '%postgresql.auto.conf';

On the database host:

cat /var/lib/postgresql/data/postgresql.auto.conf
ls -la /tmp/*.so 2>/dev/null

Search proxy logs for share-token report traffic:

grep -E '"(GET /api/share/|POST /api/reports/)' /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -rn

Then:

  1. Patch. Anything below 3.5.0: upgrade to 3.5.0 now. On 3.5.0: build from master at 98937e7 or later, or cherry-pick that commit. It only touches src/lib/params.ts and its tests. Move to the next tagged release when it ships.
  2. Close the unauthenticated path. Until you’ve patched, delete or disable every share link. GET /api/share/<slug> returns 404 for a share that no longer exists, so it stops handing out tokens. Where you must share, put the share URL behind your own authentication.
  3. Drop superuser. Create a dedicated, non-superuser role that owns only the Umami database, and point DATABASE_URL at it. In the stock compose file the umami role is the bootstrap superuser, so you need a new role rather than changing that one.
  4. If you find artifacts: treat the database host as compromised. Rebuild it. Then rotate the database password, APP_SECRET (Umami derives its token-signing secret from it), every Umami user password and API key, and any credentials stored on that host.

Timeline

  • 2026-10-23: Umami 3.4.1 tagged (08:26 UTC). Commit 4fa9769 fixes the paramName injection on the main line (21:39 UTC).
  • 2026-11-12: Umami 3.5.0 released (02:57 UTC), including 4fa9769. The ghcr.io 3.5.0 and latest images are built at 02:59 UTC.
  • 2026-11-13: Umami publishes GHSA-vhf9-rcmp-v5fc (20:12 UTC, CVSS 9.9, affected <= 3.4.0, no CVE) with a full RCE proof of concept.
  • 2026-11-25: Commit 98937e7 (“Build object filters from operator and value only”) closes the prefix path on master (18:54 UTC).
  • 2026-11-29: VulnCheck publishes CVE-2026-138445 for Umami through 3.5.0 (CVSS 4.0 9.4, CVSS 3.1 9.9). NVD lists it at 23:17 UTC.
  • 2026-11-30: googlesky/CVE-2026-138445 PoC repository published (05:10 UTC). No Umami release includes the fix.

From research to remediation

Check whether this pattern exists in your codebase

Turn this research into a remediation workflow. Use AI-native static analysis to find similar application vulnerabilities and generate review-ready fixes.

References