☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 4.3 🐛 CWE-73
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-65799

CVE-2025-65799 Path Traversal in Usememos
📅 PUBLISHED: 2025-12-08 00:00 UTC 🔄 UPDATED: 2026-09-24 06:01 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.21%
👁️
0.21% probability
5.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
4.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-65799 is a path traversal vulnerability in the Attachment service of usememos/memos v0.25.2. The vulnerability arises from a lack of file name validation or verification, allowing an attacker to traverse directories and read arbitrary files on the server. This can lead to unauthorized access to sensitive configuration files, source code, or other data stored on the host system. The CVSS score is 0.0 due to incomplete NVD data, but based on the description and CWE-22 classification, the actual severity is likely high (CVSS 7.5 or higher) with a network attack vector and low complexity. No public exploit code or patch is currently available.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The vulnerability is exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions are required.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
  • Confidentiality (C): High (H) – Arbitrary file read is possible.
  • Integrity (I): None (N) – No file modification.
  • Availability (A): None (N) – No denial of service.

Threat Level: High (estimated CVSS 7.5). The vulnerability allows unauthenticated remote attackers to read arbitrary files, potentially exposing credentials, database configurations, or source code.

Deep Dive & Mechanics

The vulnerability exists in the Attachment service of usememos/memos. When handling file uploads or retrieval, the application fails to sanitize or validate the file name or path provided by the user. An attacker can craft a request with path traversal sequences (e.g., ../../../etc/passwd) to read files outside the intended upload directory.

Root Cause: The application likely constructs file paths by concatenating a base directory with user-supplied file names without checking for ../ sequences. This allows an attacker to escape the intended directory.

Attack Flow:

  1. The attacker sends a GET or POST request to the attachment endpoint (e.g., /api/attachment/upload or /api/attachment/read).
  2. The request includes a file name parameter containing path traversal sequences.
  3. The server processes the request and reads the file from the traversed path.
  4. The file content is returned in the response.

Impact: An attacker can read sensitive files such as:

  • /etc/passwd (user enumeration)
  • /etc/shadow (password hashes, if permissions allow)
  • Application configuration files (e.g., config.yaml, .env)
  • Database files (e.g., memos.db)
  • Source code files

Vulnerable vs. Patched Code

Vulnerable Code (v0.25.2):

// Attachment service handler
func (s *AttachmentService) ReadAttachment(c *gin.Context) {
    attachmentID := c.Param("id")
    // Fetch attachment record from database
    attachment, err := s.Store.GetAttachment(attachmentID)
    if err != nil {
        c.JSON(404, gin.H{"error": "Attachment not found"})
        return
    }
    // Directly use the stored filename without validation
    filePath := filepath.Join(s.UploadDir, attachment.Filename)
    c.File(filePath)
}

Patched Code (Hypothetical):

func (s *AttachmentService) ReadAttachment(c *gin.Context) {
    attachmentID := c.Param("id")
    attachment, err := s.Store.GetAttachment(attachmentID)
    if err != nil {
        c.JSON(404, gin.H{"error": "Attachment not found"})
        return
    }
    // Sanitize the filename to prevent path traversal
    safeFilename := filepath.Base(attachment.Filename)
    filePath := filepath.Join(s.UploadDir, safeFilename)
    // Ensure the resolved path is within the upload directory
    absPath, _ := filepath.Abs(filePath)
    absUploadDir, _ := filepath.Abs(s.UploadDir)
    if !strings.HasPrefix(absPath, absUploadDir) {
        c.JSON(403, gin.H{"error": "Forbidden"})
        return
    }
    c.File(filePath)
}

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A running instance of usememos v0.25.2.
  • Network access to the attachment endpoint.

Exploitation Steps:

  1. Identify the attachment endpoint (e.g., /api/attachment/read?id=1).
  2. Craft a request with a path traversal payload in the filename parameter:
    GET /api/attachment/read?id=1&filename=../../../etc/passwd HTTP/1.1
    Host: target.com
    
  3. If the endpoint uses a different parameter (e.g., path), adjust accordingly.
  4. Observe the response containing the file content.

Example using curl:

curl -X GET "http://target.com/api/attachment/read?id=1&filename=../../../etc/passwd"

Automated Scanning:

# Using ffuf to fuzz for path traversal
ffuf -u "http://target.com/api/attachment/read?id=1&filename=FUZZ" -w /path/to/traversal_wordlist.txt -mr "root:"

Blue Team

Detection:

  • Monitor for requests containing ../ or ..\\ in attachment-related endpoints.
  • Look for unusual file paths in access logs (e.g., /etc/passwd, /proc/self/environ).
  • Alert on multiple failed attempts to access non-existent attachments.

Hunting Query (Splunk):

index=web sourcetype=access_combined
uri_path="/api/attachment/*"
uri_query=*../*
| stats count by src_ip, uri_query
| where count > 5

Lab Setup:

  1. Deploy usememos v0.25.2 using Docker:
    docker run -d -p 8080:8080 --name memos neosmemo/memos:v0.25.2
    
  2. Create a test attachment via the UI.
  3. Attempt to exploit using the curl command above.
  4. Verify file read by checking the response.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP requests to /api/attachment/read or /api/attachment/upload containing ../ or ..\\ in parameters.
    • Outbound connections from the server to unknown IPs (if data exfiltration occurs).
  • File System IOCs:
    • Unexpected file reads in server logs (e.g., /etc/passwd, /etc/shadow).
    • Modified access times on sensitive files.
  • Log IOCs:
    • Web server logs showing 200 responses for requests with path traversal patterns.
    • Application logs showing errors like "file not found" for traversed paths.

Detection Engineering

YARA Rule

rule CVE_2025_65799_Path_Traversal {
    meta:
        description = "Detects path traversal attempts in HTTP requests to usememos attachment endpoints"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-65799"
    strings:
        $traversal1 = "../"
        $traversal2 = "..\\"
        $traversal3 = "%2e%2e%2f"
        $traversal4 = "%2e%2e%5c"
        $endpoint = "/api/attachment/"
    condition:
        any of ($traversal*) and $endpoint
}

Sigma Rule

title: CVE-2025-65799 Path Traversal in usememos Attachment Service
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects path traversal attempts targeting the attachment service of usememos
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-uri-query|contains:
            - '../'
            - '..\\'
            - '%2e%2e%2f'
            - '%2e%2e%5c'
        cs-uri-stem|contains: '/api/attachment/'
    condition: selection
falsepositives:
    - Legitimate use of '..' in filenames (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-65799 Path Traversal in usememos Attachment Service"; flow:to_server; content:"/api/attachment/"; http_uri; content:"../"; http_uri; distance:0; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the attachment service if not required, or restrict access to trusted IPs only.
  2. Apply input validation on all file name parameters to reject any containing ../ or ..\\.
  3. Use a Web Application Firewall (WAF) to block path traversal patterns.

Long-term Fix:

  • Upgrade to a patched version once available.
  • Implement proper file path sanitization using filepath.Base() and ensure the resolved path is within the intended directory.
  • Use a secure file storage mechanism (e.g., object storage with signed URLs) to avoid direct file system access.

Workaround:

  • Modify the application code to use a whitelist of allowed file names or generate random file names on upload.

Valters IT – Securing your digital frontier.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-65799/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.