Skip to content

Potential exposure of tokens to an Unauthorized Actor

Moderate severity GitHub Reviewed Published Jan 10, 2022 in replit/crosis • Updated Jul 24, 2023

Package

npm @replit/crosis (npm)

Affected versions

< 7.3.1

Patched versions

7.3.1

Description

Impact

When using this library as a way to programmatically communicate with Replit in a standalone fashion, if there are multiple failed attempts to contact Replit through a WebSocket, the library will attempt to communicate using a fallback poll-based proxy. The URL of the proxy has changed, so any communication done to the previous URL could potentially reach a server that is outside of Replit's control and the token used to connect to the Repl could be obtained by an attacker, leading to full compromise of that Repl (not of the account).

Patches

This was patched in 7.3.1, by updating the address of the fallback WebSocket polling proxy to the new one.

Workarounds

Specify the new address for the polling host (gp-v2.replit.com) in the ConnectArgs:

const connectOptions: ConnectArgs = {
  // ...
  pollingHost: 'gp-v2.replit.com',
};
client.connect(connectOptions);

For more information

Thanks to https://hackerone.com/orlserg for disclosing this.

If you have any questions or comments about this advisory:

References

@lhchavez lhchavez published to replit/crosis Jan 10, 2022
Reviewed Jan 10, 2022
Published by the National Vulnerability Database Jan 11, 2022
Published to the GitHub Advisory Database Jan 12, 2022
Last updated Jul 24, 2023

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
High
Integrity
None
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:H/I:N/A:N

EPSS score

0.063%
(28th percentile)

Weaknesses

CVE ID

CVE-2022-21671

GHSA ID

GHSA-7w54-gp8x-f33m

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.