Umami SQL Injection CVE-2026-138445: Who’s Exposed, the Fix

Umami SQL injection CVE-2026-138445 lets share-link holders inject SQL via Reports API filters. Check versions through 3.5.0, patch and block the endpoint.

TL;DR

  • What happened: CVE-2026-138445 is a critical SQL injection in Umami’s Reports API filters.
  • Who is affected: Self-hosted Umami through 3.5.0, reachable by share-link holders or logged-in users.
  • What to do now: Pull the fix commit or block /api/reports/ from untrusted callers until a release ships.
  • Interview angle: Why bind parameters protect values but not identifiers, and why spreading request objects is risky.

The Umami SQL injection (CVE-2026-138445) lets anyone holding a share token, or any signed-in user with report access, smuggle a crafted prefix field into a Reports API filter. Umami placed that field directly into PostgreSQL query text. Versions through 3.5.0 are affected. A fix exists on master, but no fixed release had shipped as of 30 November 2026.

SQL injection happens when data from a request becomes part of the SQL text itself instead of being sent as a separate parameter. Parameterised queries protect values. They cannot protect table or column names, so those must come from a fixed allow-list on the server.

Umami is a popular open-source, privacy-focused web analytics tool built on Node.js and Next.js. Many teams self-host it next to their main app. This Umami SQL injection matters because the attacker does not need an admin account. A public share link can be enough.

What changed and who is affected by the Umami SQL injection?

The CVE record was published on 29 November 2026 by VulnCheck as the CNA. GitHub added GHSA-ccj2-m35r-34fc on 30 November; that entry is still marked unreviewed.

CVE-2026-138445 at a glance (as of 30 November 2026)
Item Detail Source
Affected Umami through 3.5.0 VulnCheck
Latest release v3.5.0, released 12 November; its notes do not mention this fix GitHub release
Fix Commit 98937e7, “Build object filters from operator and value only” GitHub commit
Fixed release None yet Ostorlab
Severity CVSS 3.1: 9.9; CVSS 4.0: 9.4 (critical) CVE record via OpenCVE
Weakness CWE-89 (SQL injection) GHSA
Exploited in the wild? None known; not in CISA KEV Ostorlab

The advisory names PostgreSQL WHERE clauses. No source we found says whether other database backends are affected, so treat any self-hosted Umami 3.5.0 or older as exposed until proven otherwise.

How does it work?

Umami’s Reports API accepts a filters property in the request body. Endpoints such as funnel, journey and retention reports use it. According to the advisory, the bug follows this path:

  1. A caller with a share token or a session sends a report request with object-style filters.
  2. The filter builder copied every property of each client filter, including prefix.
  3. getFilterQuery joined that prefix to the column name and placed it, unquoted, into the SQL text.
  4. Only the comparison value was a bind parameter, so the prefix bypassed the protection.
  5. The caller could read or change data beyond the website the share link was meant to expose.

The fix commit stops spreading the client object. It takes only the operator and value from the request. The column comes from a server-side map and the prefix comes from server options.

The pattern, reproduced safely in Node.js

This is not Umami’s code. It is a minimal illustration of the “spread versus pick” pattern. We ran it on Node.js v22.23.5 with the built-in test runner. The client field is a harmless marker string, not an attack payload.

const FILTER_COLUMNS = { browser: 'browser', os: 'os', path: 'url_path' };
const OPERATORS = { eq: '=', neq: '!=' };

// Risky: every client property flows through
function buildFilterUnsafe(key, clientFilter) {
  return { name: key, column: FILTER_COLUMNS[key], ...clientFilter };
}

// Safer: pick operator + value; identifiers come from the server
function buildFilterSafe(key, clientFilter, options = {}) {
  const column = FILTER_COLUMNS[key];
  if (!column) throw new Error(`Unknown filter: ${key}`);
  const operator = OPERATORS[clientFilter.operator];
  if (!operator) throw new Error(`Bad operator: ${clientFilter.operator}`);
  return { name: key, column, operator, value: clientFilter.value, prefix: options.prefix ?? '' };
}

function toSql(f, i) {
  return { text: `${f.prefix ?? ''}${f.column} ${f.operator ?? '='} $${i}`, param: f.value };
}

We fed both builders one client filter: { operator: 'eq', value: 'Chrome', prefix: 'CLIENT_CONTROLLED.', column: 'other_col' }. A small script printed the result of toSql(), then node --test ran four assertions. Raw output:

unsafe: {"text":"CLIENT_CONTROLLED.other_col eq $1","param":"Chrome"}
safe:   {"text":"browser = $1","param":"Chrome"}
safe+server prefix: {"text":"session.browser = $2","param":"Chrome"}
# tests 4
# pass 4
# fail 0

The unsafe version let the client rewrite both the identifier and the operator. The value stayed parameterised in every case. That is exactly why parameters alone were not enough.

What should developers do right now?

  1. Find instances. List every self-hosted Umami deployment and its version. Anything at 3.5.0 or older is affected.
  2. Patch from source if you can. Build from a master commit that includes 98937e7. The commit only touches src/lib/params.ts and its test. Watch the releases page for an official tag.
  3. Review share links. Share URLs live under Websites → Edit → Share URL in the Umami docs. Remove any you do not need. The docs do not say whether removing a link revokes old tokens, so do not rely on that alone.
  4. Restrict the endpoint. At your reverse proxy, allow /api/reports/ only from trusted networks or authenticated staff until you patch.
  5. Limit the database user. Give Umami’s database role access only to its own schema. That caps the blast radius of any future injection.
  6. Verify. Check database logs for unusual report queries since you exposed share links, and confirm the running build includes the fix.

If you run other Node.js services, our guide to npm supply chain defence layers covers the dependency side of the same hardening work.

Interview questions this update prepares you for

Why don’t parameterised queries stop every SQL injection?

Bind parameters send values separately from the SQL text, so the database never parses them as code. But identifiers such as table names, column names and sort directions cannot be bound in most drivers. They must be part of the query text. If any of them come from user input, injection is still possible. The safe pattern is an allow-list: map a user-chosen key to a fixed server-side identifier, and reject anything not in the map. Quoting functions help, but an allow-list is easier to reason about and review.

Follow-up they may ask: How would you safely support a user-chosen ORDER BY column?

What is mass assignment, and how does it relate to this bug?

Mass assignment is when code copies a whole request object into an internal object or model, so the client can set fields the developer never meant to expose. The classic case is a user setting isAdmin on signup. Here, spreading the client filter let a prefix field reach the query builder. The defence is the same in both cases: pick named fields explicitly, or validate the body against a strict schema that rejects unknown keys.

Follow-up they may ask: How would a schema validator like Zod help here?

What is a scope change in CVSS, and why does it matter here?

In CVSS 3.1, “Scope: Changed” means a flaw in one component lets an attacker affect resources managed by a different security authority. The advisory scores this bug with S:C. A share token is meant to expose one website’s dashboard. Through the database, the attacker can reach data for other websites. That jump across a trust boundary is what pushes the score to 9.9 rather than a lower high-severity rating.

Follow-up they may ask: What does PR:L mean in the same vector?

How would you design share links for a multi-tenant dashboard?

Treat a share link as a low-privilege credential. Bind it to one tenant and a read-only set of views. Enforce that scope on the server for every query, not just in the UI. Give links an expiry and a way to revoke them, and log their use. Keep the query layer tenant-aware, for example with row-level security, so a bug in one handler cannot cross tenants.

Follow-up they may ask: Stateless signed tokens or database-backed tokens: which is easier to revoke?

How do you limit damage if SQL injection does happen?

Defence in depth. Run the app with a database role that can touch only its own schema and cannot create functions or read system tables. Separate read and write roles where practical. Put sensitive endpoints behind authentication at the proxy. Monitor for unusual query shapes and error spikes. Least privilege does not prevent injection, but it turns a full compromise into a contained incident.

Follow-up they may ask: Where would PostgreSQL row-level security fit in?

The NexGismo verdict: My recommendation is to treat every Umami share link as a credential today. Build from the fixed commit if you can. If you can’t, close /api/reports/ to the public until the official release lands. The real lesson is bigger than Umami: never spread a request object into anything that builds SQL.

  • CVE-2026-138445 is a SQL injection in Umami’s Reports API filter handling.
  • Umami through 3.5.0 is affected, according to the VulnCheck advisory.
  • A share-token holder or signed-in user with report access can trigger it; no admin role is needed.
  • The fix is commit 98937e7 on master; no fixed release existed as of 30 November 2026.
  • Bind parameters protect values only; identifiers need a server-side allow-list.

Frequently Asked Questions

Is Umami safe to use after CVE-2026-138445?

Umami is safe once you run a build that includes the fix commit 98937e7. As of 30 November 2026, no tagged release included it, and every version through 3.5.0 is affected. Until a release ships, build from the patched master branch or block public access to the /api/reports/ endpoints at your proxy.

Does the Umami SQL injection need an admin account?

No. The advisory says a share-token holder or any authenticated user with report access can trigger it. That means a public dashboard link may be enough. Removing share links you do not need and restricting the Reports API are sensible steps while you patch.

Is CVE-2026-138445 being exploited?

As of 30 November 2026, Ostorlab reported no known exploitation and no public proof of concept, and the flaw was not in the CISA Known Exploited Vulnerabilities catalog. That can change quickly for a 9.9-rated bug, so patch or mitigate now rather than waiting.

How do I check which Umami version I’m running?

Check the image tag in your Docker Compose file or the version in package.json for a source install. Compare it to the GitHub releases page. Anything at 3.5.0 or older is affected unless you built from a master commit that includes 98937e7, titled “Build object filters from operator and value only”.

The Umami SQL injection is a short fix with a long lesson. The patch changes a handful of lines, yet it closes a 9.9-rated hole reachable from a share link. Patch or block the endpoint today, then audit your own code for spread request objects near query builders. For more on locking down JavaScript apps, read our Next.js 16 auth security mistakes and Node.js permission model gotchas.

Sources