Skip to content

receiving subscription objects with deleted session

Moderate severity GitHub Reviewed Published Oct 21, 2020 in parse-community/parse-server • Updated Feb 1, 2023

Package

npm parse-server (npm)

Affected versions

< 4.4.0

Patched versions

4.4.0

Description

Original Message:
Hi,

I create objects with one client with an ACL of all users with a specific column value. Thats working so far.

Then I deleted the session object from one user to look if he can receive subscription objects and he can receive them.
The client with the deleted session cant create new objects, which Parse restricts right.

The LiveQueryServer doesnt detect deleted sessions after the websocket connection was established.
There should be a mechanism that checks in an specific interval if the session exists.
I dont know if its true with expired sessions.

Any solutions?

Parse version: 4.3.0
Parse js SDK version: 2.17

Solution:
Hi guys.

I've found and fixed the problem. It happens because there are two caches in place for the session token:

  • at Parse Server level, which, according with the docs, should be changed via cacheTTL option and defaults to 5 seconds;
  • at Parse Live Query level, which, according with the docs, should be changed via liveQueryServerOptions.cacheTimeout and defaults to 30 days.

But there are three problems:

  • cacheTTL has currently no effect over Live Query Server;
  • cacheTimeout also has currently no effect over Live Query Server;
  • cacheTimeout actually defaults to 1h.

So, currently, if you wait 1 hour after the session token was invalidated, the clients using the old session token are not able to receive the events.

What I did:

  • Added a test case for the problem;
  • Fixed cacheTTL for Live Query Server;
  • Fixed cacheTimeout for Live Query Server;
  • Changed the cacheTimeout to default 5s;
  • Changed the docs to reflect the actual 5s default for cacheTimeout.

References

@davimacedo davimacedo published to parse-community/parse-server Oct 21, 2020
Reviewed Oct 22, 2020
Published by the National Vulnerability Database Oct 22, 2020
Published to the GitHub Advisory Database Oct 27, 2020
Last updated Feb 1, 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
Low
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:L/I:N/A:N

EPSS score

0.060%
(27th percentile)

Weaknesses

CVE ID

CVE-2020-15270

GHSA ID

GHSA-2xm2-xj2q-qgpj

Credits

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