
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
MailMitt is a tool for performing regression testing on email delivery code. It allows applications to send emails to an SMTP server without actual emails being delivered to anyone.
It also provides both a web interface and a RESTful JSON API for reviewing the content of the emails that you send.
Nothing is actually delivered, and any emails that MailMitt receives are just stored in memory.
It is inspired by https://github.com/ThiefMaster/maildump, although it is re-written from the ground up using an asyncio-based event loop rather than gevent.
Because of this, it only runs on Python 3.5 and above, whereas MailDump only runs on Python 2.
pip3 install mailmitt
mailmitt --help
produces a list of available command line arguments.
By default mailmitt runs its webserver on port 1080 and its SMTP server on port 1025 (both only available via localhost). If you want to access it from another machine, use something like this:
mailmitt --http-ip 0.0.0.0 --smtp-ip 0.0.0.0
GET http://localhost:1080/messages
GET http://localhost:1080/messages/0.source
0
with the index of the email you wish to retrieveGET http://localhost:1080/messages/0.plain
GET http://localhost:1080/messages/0.html
GET http://localhost:1080/messages/0.json
DELETE http://localhost:1080/messages
Run this in one terminal:
mailmitt
And then in a python3 session:
import requests
import smtplib
from email.message import EmailMessage
message = EmailMessage()
message['Subject'] = "Sample Subject"
message['To'] = "to@example.com"
message['From'] = "from@example.com"
message.set_content("""\
Hello
This is a sample email
""")
message.add_alternative("""
<h1>Hello</h1>
<p>This is a sample email</p>
""", subtype='html')
with smtplib.SMTP('localhost',port=1025) as smtp:
smtp.sendmail(message['From'],message['To'],message.as_string())
print(requests.get('http://localhost:1080/messages/0.plain').text.strip())
Although this example is in Python, MailMitt can be accessed from SMTP client libraries in any language.
Hello
This is a sample email
You will also be able to review your emails at http://localhost:1080/
FAQs
Simple SMTP server for testing mailing code.
We found that mailmitt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.