ghsa-c9p4-xwr9-rfhx
Vulnerability from github
Summary
The group data stored for users in the boltdb database (meta.db) is an append-list so group revocations/removals are ignored in the API.
Details
SetUserGroups is alled on login, but instead of replacing the group memberships, they are appended. This may be due to some conflict with the group definitions in the config file, but that wasn't obvious to me if it were the case.
PoC
Login with group claims, logout, remove the user from a group from at IdP and log in again, the API still grants access and the new list of groups is appended creating meaningless duplicate entries and no longer mathing the expected groups from the IdP. The behavior can be verified by seeing the API or UI still presenting images it should not or by viewing the data directly: bbolt get meta.db UserData <user>
, eg:
Note this example also has duplicates due to group hierarchy changes that were left in the database.
Impact
Any Zot configuration that relies on group-based authorization will not respect group remove/revocation by an IdP.
{ "affected": [ { "database_specific": { "last_known_affected_version_range": "\u003c= 2.1.1" }, "package": { "ecosystem": "Go", "name": "zotregistry.dev/zot" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.1.2" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-23208" ], "database_specific": { "cwe_ids": [ "CWE-269" ], "github_reviewed": true, "github_reviewed_at": "2025-01-17T22:02:26Z", "nvd_published_at": "2025-01-17T23:15:13Z", "severity": "HIGH" }, "details": "### Summary\nThe group data stored for users in the boltdb database (meta.db) is an append-list so group revocations/removals are ignored in the API.\n\n### Details\n[SetUserGroups](https://github.com/project-zot/zot/blob/5e30fec65c49e3139907e2819ccb39b2e3bd784e/pkg/meta/boltdb/boltdb.go#L1665) is alled on login, but instead of replacing the group memberships, they are appended. This may be due to some conflict with the group definitions in the config file, but that wasn\u0027t obvious to me if it were the case.\n\n### PoC\nLogin with group claims, logout, remove the user from a group from at IdP and log in again, the API still grants access and the new list of groups is appended creating meaningless duplicate entries and no longer mathing the expected groups from the IdP. The behavior can be verified by seeing the API or UI still presenting images it should not or by viewing the data directly: `bbolt get meta.db UserData \u003cuser\u003e`, eg:\n\n\n\nNote this example also has duplicates due to group hierarchy changes that were left in the database.\n\n### Impact\nAny Zot configuration that relies on group-based authorization will not respect group remove/revocation by an IdP.\n", "id": "GHSA-c9p4-xwr9-rfhx", "modified": "2025-01-21T18:31:05Z", "published": "2025-01-17T22:02:26Z", "references": [ { "type": "WEB", "url": "https://github.com/project-zot/zot/security/advisories/GHSA-c9p4-xwr9-rfhx" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-23208" }, { "type": "WEB", "url": "https://github.com/project-zot/zot/commit/002ac62d8a15bf0cba010b3ba7bde86f9837b613" }, { "type": "PACKAGE", "url": "https://github.com/project-zot/zot" }, { "type": "WEB", "url": "https://github.com/project-zot/zot/blob/5e30fec65c49e3139907e2819ccb39b2e3bd784e/pkg/meta/boltdb/boltdb.go#L1665" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L", "type": "CVSS_V3" } ], "summary": "Zot IdP group membership revocation ignored" }
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.