Skip to content

Improper Authorization in Comment Endpoint Allows User Impersonation

Moderate
lukevella published GHSA-hhfc-6gq7-rrpm Nov 19, 2025

Package

No package listed

Affected versions

< 4.5.4

Patched versions

>= 4.5.4

Description

Summary

An improper authorization flaw in the comment creation endpoint allows authenticated users to impersonate any other user by altering the authorName field in the API request. This enables attackers to post comments under arbitrary usernames, including privileged ones such as administrators, potentially misleading other users and enabling phishing or social engineering attacks.

Details

The issue resides in the polls.comments.add endpoint of the Rallly application. When a comment is created, the backend accepts a client-supplied authorName value without verifying that it matches the authenticated session.
This means that the server trusts user input for identity information instead of deriving it from the logged-in user context (e.g., via session token or user ID).

Vulnerable request example:

POST /api/trpc/polls.comments.add?batch=1 HTTP/1.1
Host: 192.168.11.109:3000
Content-Type: application/json
Cookie: better-auth.session_token=<valid_token>

{"0":{"json":{
  "authorName":"admin",
  "content":"Hello from fake admin!",
  "pollId":"2UewfU7cylgK"
}}}

This request succeeds even though the authenticated user is not “admin,” allowing impersonation of any username.

Root cause:
The backend fails to bind the authorName field to the authenticated user session and trusts the client input for identity.

PoC

Test Environment:

Target: Local Rallly instance at http://192.168.11.109:3000/

Victim: fairalien (poll owner)

Attacker: hehe (regular user)

Steps to reproduce:

  • Log in as the attacker (hehe) and participate in a poll.

  • Intercept the comment submission request using a proxy tool.

image(3)
  • Modify the JSON payload:
1-imperonate-poc
  • Forward the modified request.

  • Observe that the comment is posted successfully and displayed as authored by “fairalien”

2-impersonate-poc-2

Impact

This is an improper authorization / user impersonation vulnerability.

Affected users: All authenticated users (can impersonate any account)
Consequences:

  • Attackers can impersonate trusted users (admins, poll owners, moderators).

  • Potential for phishing or malicious link distribution under trusted names.

  • Damage to platform integrity and user trust.

Recommended fix:

The backend should ignore any authorName values supplied by the client and instead associate comments with the authenticated user derived from the session token.

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
High
Availability
None

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:H/A:N

CVE ID

CVE-2025-65031

Weaknesses

Improper Authorization

The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. Learn more on MITRE.

Authorization Bypass Through User-Controlled Key

The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. Learn more on MITRE.

Credits