{"answers":{"affected":"4 open source packages ship an affected version, including uptime-kuma.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-56331 exists.","fix":"Upgrade uptime-kuma to a fixed version for your release line: 1.23.16 or 2.0.0-beta.1.","what":"CVE-2024-56331 is a medium-severity path traversal vulnerability in louislam uptime-kuma, published on 20 Dec 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-56331 and fix it if it is affected.\n\nWhat it is: CVE-2024-56331 is a medium-severity path traversal vulnerability in louislam uptime-kuma, published on 20 Dec 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-56331 exists.\n\nAffected packages and fixed versions:\n- uptime-kuma (npm): affected from 1.23.0; fixed in 1.23.16\n- uptime-kuma (npm): affected from 1.23.0; fixed in 1.23.16\n- uptime-kuma (npm): affected from 2.0.0-beta.0; fixed in 2.0.0-beta.1\n- uptime-kuma (npm): affected from 2.0.0-beta.0; fixed in 2.0.0-beta.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/CVE-2024-56331/ (Markdown: https://insights.sbomify.com/CVE-2024-56331/index.md)","id":"CVE-2024-56331","markdown":"https://insights.sbomify.com/CVE-2024-56331/index.md","name":"CVE-2024-56331","record":{"aliases":["GHSA-2qgm-m29m-cj2h"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Uptime Kuma monitoring tool","requires_auth":"low_privilege","summary":"Authenticated attackers can read sensitive local server files by exploiting improper URL validation in the real-browser monitor feature.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":6.8,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"Uptime Kuma is an open source, self-hosted monitoring tool. An **Improper URL Handling Vulnerability** allows an attacker to access sensitive local files on the server by exploiting the `file:///` protocol. This vulnerability is triggered via the **\"real-browser\"** request type, which takes a screenshot of the URL provided by the attacker. By supplying local file paths, such as `file:///etc/passwd`, an attacker can read sensitive data from the server. This vulnerability arises because the system does not properly validate or sanitize the user input for the URL field. Specifically: 1. The URL input (`\u003cinput data-v-5f5c86d7=\"\" id=\"url\" type=\"url\" class=\"form-control\" pattern=\"https?://.+\" required=\"\"\u003e`) allows users to input arbitrary file paths, including those using the `file:///` protocol, without server-side validation. 2. The server then uses the user-provided URL to make a request, passing it to a browser instance that performs the \"real-browser\" request, which takes a screenshot of the content at the given URL. If a local file path is entered (e.g., `file:///etc/passwd`), the browser fetches and captures the file’s content. Since the user input is not validated, an attacker can manipulate the URL to request local files (e.g., `file:///etc/passwd`), and the system will capture a screenshot of the file's content, potentially exposing sensitive data. Any **authenticated user** who can submit a URL in \"real-browser\" mode is at risk of exposing sensitive data through screenshots of these files. This issue has been addressed in version 1.23.16 and all users are advised to upgrade. There are no known workarounds for this vulnerability.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2024-11-25","github_poc":1,"max_poc_stars":1,"metasploit":0,"nuclei":0,"refs":[{"date":"2024-11-25T08:16:38Z","kind":"github_poc","ref":"https://github.com/griisemine/CVE-2024-56331","stars":1,"title":null}],"tier":"weaponised"},"has_fix":true,"headline":"Local File Inclusion (LFI) via Improper URL Handling in uptime-kuma's `Real-Browser` monitor","id":"CVE-2024-56331","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2024"},"n_packages":4,"n_references":2,"next":{"headline":"Next.js Vulnerable to Denial of Service (DoS) with Server Actions","id":"CVE-2024-56332"},"packages":[{"ecosystem":"npm","fixed":["1.23.16"],"introduced":["1.23.0"],"last_affected":[],"package":"uptime-kuma","purl":null,"source":"GHSA-2qgm-m29m-cj2h"},{"ecosystem":"npm","fixed":["1.23.16"],"introduced":["1.23.0"],"last_affected":[],"package":"uptime-kuma","purl":"pkg:npm/uptime-kuma","source":"GHSA-2qgm-m29m-cj2h"},{"ecosystem":"npm","fixed":["2.0.0-beta.1"],"introduced":["2.0.0-beta.0"],"last_affected":[],"package":"uptime-kuma","purl":null,"source":"GHSA-2qgm-m29m-cj2h"},{"ecosystem":"npm","fixed":["2.0.0-beta.1"],"introduced":["2.0.0-beta.0"],"last_affected":[],"package":"uptime-kuma","purl":"pkg:npm/uptime-kuma","source":"GHSA-2qgm-m29m-cj2h"}],"prev":{"headline":"Session VNC may be accessed by other sessions on the same host in stardust","id":"CVE-2024-56330"},"products":["uptime-kuma"],"published":"2024-12-20","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-12-27","vendors":["louislam"]},"summary":"Authenticated attackers can read sensitive local server files by exploiting improper URL validation in the real-browser monitor feature.","url":"https://insights.sbomify.com/CVE-2024-56331/"}