Skip to content

Fix sharing: enforce authorization and validate credential references in sharing and revision APIs - #888

Merged
binsky08 merged 8 commits into
masterfrom
fix/enumeration-attack-etc
Oct 10, 2026
Merged

binsky08 merged 8 commits into
masterfrom
fix/enumeration-attack-etc

Conversation

@binsky08

Copy link
Copy Markdown
Collaborator

Fixes several authorization issues in the sharing and revision APIs, reported via the Nextcloud HackerOne program and extended by further findings during the analysis. Details will be published in a security advisory after the release.

…tion by adding ownership checks and adding cross validation between ACL's item_guid and item_id

Any authenticated user was able to create or modify a public share (ACL entry)
for credentials of other users, and the ACL's item_id was never checked against
its item_guid. The latter allowed resolving arbitrary credentials by their
sequential id through the public share endpoint, using any owned credential guid.

Signed-off-by: binsky <timo@binsky.org>
Signed-off-by: binsky <timo@binsky.org>
`occ passman:sharing:check-acls [--json]` lists sharing ACL entries whose
item_id does not reference the credential identified by their item_guid,
including the owners of both credentials. Such entries can be the result of
the item id injection fixed before (passman <= 2.6.3) or leftovers of deleted
credentials.

Signed-off-by: binsky <timo@binsky.org>
Every legitimate share (link or user) requires the shared credential to have
a shared key, which is only removed again by unsharing, which also deletes all
ACLs. So ACL entries whose item_guid credential has no shared key cannot be
legitimate, even if item_id and item_guid match.

Signed-off-by: binsky <timo@binsky.org>
…heck in the corresponding acl mapper class

Signed-off-by: binsky <timo@binsky.org>
Signed-off-by: binsky <timo@binsky.org>
@binsky08
binsky08 merged commit 818b071 into master Oct 10, 2026
44 checks passed
@binsky08
binsky08 deleted the fix/enumeration-attack-etc branch October 14, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant