Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
OpenSMTPD-CVE-2020-7247- — Docker-based lab demonstrating CVE-2020-7247 remote code execution in OpenSMTPD 6.6.1p1 with a Python PoC for educational security testing. | Kitploit
Tools/GitHubGitHub/solmin111/opensmtpd-cve-2020-7247-
Vulnerability AnalysisExploitationPenetration TestingLearning & EducationEmail SecurityLabs & Practice
GitHubsolmin111/opensmtpd-cve-2020-7247-

OpenSMTPD-CVE-2020-7247-

Docker-based lab demonstrating CVE-2020-7247 remote code execution in OpenSMTPD 6.6.1p1 with a Python PoC for educational security testing.

View Repository
32 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

OpenSMTPD Remote Command Execution Vulnerability CVE-2020-7247

WHS 4th Park Solmin

Original link: https://github.com/vulhub/vulhub/blob/43eae7170d09e7748c3aac64cd6a8e5af508a8ef/opensmtpd/CVE-2020-7247/README.md

Overview

OpenSMTPD is an SMTP server program used on Unix-like operating systems. It can be used on BSD, macOS, GNU/Linux, etc., and operates based on the RFC 5321 SMTP protocol.

CVE-2020-7247 is a remote command execution vulnerability in OpenSMTPD caused by insufficient validation of sender or recipient addresses. An attacker can send a crafted SMTP request to execute arbitrary commands on the server.

This vulnerability was patched in OpenSMTPD version 6.6.2p1.

Vulnerable Environment

ItemContent
Vulnerability IDCVE-2020-7247
Vulnerable SoftwareOpenSMTPD
Vulnerable VersionOpenSMTPD 6.6.1p1
Vulnerability TypeRemote Code Execution
Lab EnvironmentDocker / Vulhub
Port Used8825:25

Environment Setup

image

Run the vulnerable OpenSMTPD environment using the following command.

root@kitploit:~
docker compose up -d

Verify that the container is running properly.

root@kitploit:~
docker compose ps
image

Connect to port 8825 to check that the SMTP service is working.

root@kitploit:~
nc 127.0.0.1 8825 -v

If connected successfully, the OpenSMTPD banner will be displayed as follows.

root@kitploit:~
220 <container-id> ESMTP OpenSMTPD

Vulnerability Reproduction

image

Use the PoC code to send a command to the target server. In this lab, a command to create a /tmp/proof.txt file was used instead of a dangerous command.

root@kitploit:~
python3 poc.py 127.0.0.1 8825 'touch /tmp/proof.txt'

Then check if the file was created inside the container.

root@kitploit:~
docker compose exec smtpd ls -l /tmp/proof.txt

If the /tmp/proof.txt file is found, it means the command sent from outside was executed inside the container.

Result

It was confirmed that if input validation is insufficient during OpenSMTPD's SMTP request processing, an attacker can execute arbitrary commands on the server through crafted requests.

This lab was conducted only in a local Docker environment and should not be performed against real servers or unauthorized systems.

Countermeasures

  • Update OpenSMTPD to version 6.6.2p1 or later.
  • Restrict access to SMTP services exposed externally.
  • Block unnecessary port access via firewall.
  • Regularly check mail server logs.
  • Perform patch management to avoid running known vulnerable versions.

References

  • Vulhub OpenSMTPD CVE-2020-7247
  • OpenSMTPD Security Advisory
  • Exploit-DB CVE-2020-7247 PoC
  • MITRE CVE-2020-7247
Download Tool