Skip to content

HTML Injection with Tolgee email - Org

Moderate
JanCizmar published GHSA-gx3w-rwh5-w5cg Sep 7, 2023

Package

tolgee/tolgee (DockerHub)

Affected versions

<= v3.29.1

Patched versions

v3.29.2

Description

Summary

Due to lack of validation field - Org Name, bad actor can send emails with HTML injected code to the victims.
At this moment registered user (as a bad actor) can attack (victim) with real email from Tolgee - HTML Injection (Server-Side Injection - Content Spoofing).

Details

Occurrences:
https://github.com/tolgee/tolgee-platform/blob/main/backend/data/src/main/kotlin/io/tolgee/component/email/InvitationEmailSender.kt#L26

PoC

Payload example (name of Org - from invitation): Org<a href="www.github.com">s

Repro steps:

  1. As logged in user Create New Org https://app.tolgee.io/organizations/add for Name field use HTML Injection payload (provided above).
  2. Next go to https://app.tolgee.io/organizations/[NAME]/profile - this Org Settings and click Organization members - click btn INVITE USER and type email address there.
  3. Receive and open email with invitation - see HTML Injected. (Please use second Test email for Repro steps here)

Result - screenshot:
poc-tolgee

For Repro steps please use own emails, but please notice that bad actors can make this with victims email addresses (which not own).

Proposed remediation: Sanitize/purify mentioned input data from users - don't allow to this.

Impact

Bad actors can use this to phishing actions for example. Email is really send from Tolgee, but bad actors can add there HTML code injected.

Additional informations:
References:
CAPEC-242: Code Injection - https://capec.mitre.org/data/definitions/242.html
Server-Side Injection Content Spoofing Email HTML Injection - https://bugcrowd.com/vulnerability-rating-taxonomy
CWE-20: Improper Input Validation - https://cwe.mitre.org/data/definitions/20.html

Best regards,

Severity

Moderate

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
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

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:L/UI:N/S:U/C:N/I:N/A:H

CVE ID

No known CVE

Weaknesses

Credits