Skip to content

Content spoofing - real Hoppscotch emails

Moderate
AndrewBastin published GHSA-8r6h-8r68-q3pp Feb 26, 2024

Package

No package listed

Affected versions

<= 2023.12.5

Patched versions

2023.12.6

Description

Hi, I've sent a report to you by email, but unfortunately no answer (after 9 days, but here https://github.com/hoppscotch/hoppscotch/security we can see 48 hours period).

Summary

Due to lack of validation for fields like Label (Edit Team) - TeamName, bad actors can send emails with Spoofed Content as Hoppscotch (because in fact these emails are real Hoppscotch emails) at this moment.
Please notice that there are allowed different characters like (@, :, <>, //) spaces etc, that allows to create all sentences by bad actors.
Part of payload (external link) is presented in clickable form - easier to achieve own goals by malicious actors.

Details

Repro steps:

  1. As logged in user https://hoppscotch.io/ select your Team and Edit the Team Name - set Name with payload (provided below) and Save (see allowed and saved)
  2. Click Invite member to this team and type victim's email address or addresses
  3. Open email with invitation and Spoofed content

Note: Please use your second email address or alias for POC steps for convenient.

Payload example:
SWAG - visit www.evilsite.com and CELEBRATE

Vulnerable part of code:
code
Code:
https://github.com/hoppscotch/hoppscotch/blob/main/packages/hoppscotch-backend/src/team-invitation/team-invitation.service.ts#L153

PoC

Result:
"A Hoppscotch User invited you to join SWAG - visit www.evilsite.com and CELEBRATE in Hoppscotch" or
"A Hoppscotch User with SWAG - visit www.evilsite.com and CELEBRATE (...)" and so on.

POC - screenshot result:
poc

Impact

Impact
Spoofed email content - user see real Hoppscotch email, so is more exposed to malicious actions (like visit site xyz, download from xzy - even just because of prepared endpoint). Other scenario can be associated with disinformation (lost of trust and reputation) - using there bad words (vulgar), weird content etc. Part of payload (external link) is presented in clickable form - easier to achieve own goals by malicious actors.

Proposed remediation: please don't allow to malicious actions like this - proper validation for these fields (Sanitize/purify input data from users).

Additional informations:
Content Spoofing - https://owasp.org/www-community/attacks/Content_Spoofing
CAPEC-148: Content Spoofing - https://capec.mitre.org/data/definitions/148.html
CWE-20: Improper Input Validation - https://cwe.mitre.org/data/definitions/20.html
CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') - https://cwe.mitre.org/data/definitions/79.html

Best regards,

Severity

Moderate
5.4
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

CVE ID

CVE-2024-27092

Credits