Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS03dzU0LWdwOHgtZjMzbc0hUQ

Potential exposure of tokens to an Unauthorized Actor

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:

Permalink: https://github.com/advisories/GHSA-7w54-gp8x-f33m
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS03dzU0LWdwOHgtZjMzbc0hUQ
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: over 2 years ago
Updated: 12 months ago


CVSS Score: 6.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Identifiers: GHSA-7w54-gp8x-f33m, CVE-2022-21671
References: Repository: https://github.com/replit/crosis
Blast Radius: 6.8

Affected Packages

npm:@replit/crosis
Dependent packages: 12
Dependent repositories: 11
Downloads: 128,414 last month
Affected Version Ranges: < 7.3.1
Fixed in: 7.3.1
All affected versions: 0.0.1, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 2.0.0, 2.0.1, 2.1.0, 2.2.0, 2.3.0, 3.0.2, 4.0.0, 4.0.1, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.1.0, 5.1.1, 5.2.0, 5.2.1, 5.2.2, 5.2.3, 6.0.0, 6.0.1, 6.0.4, 6.1.0, 6.2.0, 6.3.0, 7.0.0, 7.1.0, 7.1.1, 7.2.0, 7.3.0
All unaffected versions: 7.3.1, 7.3.2, 8.0.0, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 9.0.4, 9.1.0, 9.1.1, 9.1.2, 9.2.0, 9.2.1, 10.0.0, 10.1.0, 10.1.1, 10.1.2, 10.1.3, 10.2.0, 11.0.0, 12.0.0, 12.0.1, 13.0.0, 13.1.0, 13.1.1, 13.2.0, 13.3.0, 13.3.1, 13.4.1, 13.5.0, 13.5.1