MediumGHSA-jgph-w8rh-xf5pCVE-2023-44401

View permissions are bypassed for paginated lists of ORM data

Published 23 Jan 2024 · Updated 16 Feb 2024

Is your project on an affected silverstripe/graphql?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
>=4.0.0 <4.3.7
Fixed in
4.3.7
Update to the fixed version for your release line, for example:composer require silverstripe/graphql:^4.3.7
Affected
>=5.0.0 <5.1.3
Fixed in
5.1.3
Update to the fixed version for your release line, for example:composer require silverstripe/graphql:^5.1.3

Details

Impact

canView permission checks are bypassed for ORM data in paginated GraphQL query results where the total number of records is greater than the number of records per page.

Note that this also affects GraphQL queries which have a limit applied, even if the query isn’t paginated per se.

This has been fixed by ensuring no new records are pulled in from the database after performing canView permission checks for each page of results. This may result in some pages in your query results having less than the maximum number of records per page even when there are more pages of results.

This behaviour is consistent with how pagination works in other areas of Silverstripe CMS, such as in GridField, and is a result of having to perform permission checks in PHP rather than in the database directly.

You can choose to disable these permission checks by disabling the CanViewPermission plugin following the instructions in overriding default plugins.

Note that this vulnerability does not affect version 3.x.

Base CVSS: 5.3 Reported by: Eduard Briem from Hothouse Creative, Nelson

References

https://www.silverstripe.org/download/security-releases/CVE-2023-44401

Is GHSA-jgph-w8rh-xf5p in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected silverstripe/graphql, and gives you the command that fixes it.

More advisories for silverstripe/graphql

  • HighGHSA-wjg9-v8cf-f5q2silverstripe/graphql Cross-Site Request Forgery vulnerability · 28 May 2024
  • HighCVE-2023-40180Silverstripe GraphQL has DDOS Vulnerability due to lack of protection against recursive queries · 17 Oct 2023
  • HighCVE-2023-28104DDOS attack on graphql endpoints · 16 Mar 2023
  • MediumCVE-2020-6165Silverstripe has Incorrect Default Permissions · 24 May 2022
  • HighCVE-2019-12437Silverstripe CSRF Protection Bypass via GraphQL · 24 May 2022
  • MediumCVE-2021-28661SilverStripe GraphQL Server permission checker not inherited by query subclass. · 12 Oct 2021
All 8 advisories for silverstripe/graphql

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.