Skip to content

Lookup operations do not take into account wildcards in SpiceDB

High severity GitHub Reviewed Published Jan 11, 2022 in authzed/spicedb • Updated Feb 3, 2023

Package

gomod github.com/authzed/spicedb (Go)

Affected versions

= 1.3.0

Patched versions

1.4.0

Description

Impact

Any user making use of a wildcard relationship under the right hand branch of an exclusion or within an intersection operation will see Lookup/LookupResources return a resource as "accessible" if it is not accessible by virtue of the inclusion of the wildcard in the intersection or the right side of the exclusion.

For example, given schema:

definition user {}

definition resource {
   relation viewer: user
   relation banned: user | user:*
   permission view = viewer - banned
}

If user:* is placed into the banned relation for a particular resource, view should return false for all resources. in v1.3.0, the wildcard is ignored entirely in lookup's dispatch, resulting in the banned wildcard being ignored in the exclusion.

Workarounds

Don't make use of wildcards on the right side of intersections or within exclusions.

References

authzed/spicedb#358

For more information

If you have any questions or comments about this advisory:

References

@josephschorr josephschorr published to authzed/spicedb Jan 11, 2022
Reviewed Jan 11, 2022
Published by the National Vulnerability Database Jan 11, 2022
Published to the GitHub Advisory Database Jan 13, 2022
Last updated Feb 3, 2023

Severity

High

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

EPSS score

0.089%
(39th percentile)

CVE ID

CVE-2022-21646

GHSA ID

GHSA-7p8f-8hjm-wm92

Source code

Credits

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