CVE-2023-52077 (TypeScript, published 2023-12-27T19:15Z)
Description: value: Nexkey is a lightweight fork of Misskey v12 optimized for small to medium size servers. Prior to 12.23Q4.5, Nexkey allows external apps using tokens issued by administrators and moderators to call admin APIs.  This allows malicious third-party apps to perform operations such as updating server settings, as well as compromise object storage and email server credentials. This issue has been patched in 12.23Q4.5.
Severity: nan (CVSS v3 base score: 9.8)
Weakness: CWE-863 \u2014 Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.
Repository: https://github.com/misskey-dev/misskey
Files changed:
CHANGELOG.md
packages/backend/src/server/api/endpoints/admin/abuse-user-reports.ts
packages/backend/src/server/api/endpoints/admin/accounts/create.ts
packages/backend/src/server/api/endpoints/admin/accounts/delete.ts
packages/backend/src/server/api/endpoints/admin/accounts/find-by-email.ts
packages/backend/src/server/api/endpoints/admin/ad/create.ts
packages/backend/src/server/api/endpoints/admin/ad/delete.ts
packages/backend/src/server/api/endpoints/admin/ad/list.ts
packages/backend/src/server/api/endpoints/admin/ad/update.ts
packages/backend/src/server/api/endpoints/admin/announcements/create.ts
packages/backend/src/server/api/endpoints/admin/announcements/delete.ts
packages/backend/src/server/api/endpoints/admin/announcements/list.ts
packages/backend/src/server/api/endpoints/admin/announcements/update.ts
packages/backend/src/server/api/endpoints/admin/avatar-decorations/create.ts
packages/backend/src/server/api/endpoints/admin/avatar-decorations/delete.ts
packages/backend/src/server/api/endpoints/admin/avatar-decorations/list.ts
packages/backend/src/server/api/endpoints/admin/avatar-decorations/update.ts
packages/backend/src/server/api/endpoints/admin/delete-account.ts
packages/backend/src/server/api/endpoints/admin/delete-all-files-of-a-user.ts
packages/backend/src/server/api/endpoints/admin/drive/clean-remote-files.ts
packages/backend/src/server/api/endpoints/admin/drive/cleanup.ts
packages/backend/src/server/api/endpoints/admin/drive/files.ts
packages/backend/src/server/api/endpoints/admin/drive/show-file.ts
packages/backend/src/server/api/endpoints/admin/emoji/add-aliases-bulk.ts
packages/backend/src/server/api/endpoints/admin/emoji/add.ts
packages/backend/src/server/api/endpoints/admin/emoji/copy.ts
packages/backend/src/server/api/endpoints/admin/emoji/delete-bulk.ts
packages/backend/src/server/api/endpoints/admin/emoji/delete.ts
packages/backend/src/server/api/endpoints/admin/emoji/import-zip.ts
packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts
packages/backend/src/server/api/endpoints/admin/emoji/list.ts
packages/backend/src/server/api/endpoints/admin/emoji/remove-aliases-bulk.ts
packages/backend/src/server/api/endpoints/admin/emoji/set-aliases-bulk.ts
packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts
packages/backend/src/server/api/endpoints/admin/emoji/set-license-bulk.ts
packages/backend/src/server/api/endpoints/admin/emoji/update.ts
packages/backend/src/server/api/endpoints/admin/federation/delete-all-files.ts
packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts
packages/backend/src/server/api/endpoints/admin/federation/remove-all-following.ts
packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts
packages/backend/src/server/api/endpoints/admin/get-index-stats.ts
packages/backend/src/server/api/endpoints/admin/get-table-stats.ts
packages/backend/src/server/api/endpoints/admin/get-user-ips.ts
packages/backend/src/server/api/endpoints/admin/invite/create.ts
packages/backend/src/server/api/endpoints/admin/invite/list.ts
packages/backend/src/server/api/endpoints/admin/meta.ts
packages/backend/src/server/api/endpoints/admin/promo/create.ts
packages/backend/src/server/api/endpoints/admin/queue/clear.ts
packages/backend/src/server/api/endpoints/admin/queue/deliver-delayed.ts
packages/backend/src/server/api/endpoints/admin/queue/inbox-delayed.ts
packages/backend/src/server/api/endpoints/admin/queue/promote.ts
packages/backend/src/server/api/endpoints/admin/queue/stats.ts
packages/backend/src/server/api/endpoints/admin/relays/add.ts
packages/backend/src/server/api/endpoints/admin/relays/list.ts
packages/backend/src/server/api/endpoints/admin/relays/remove.ts
packages/backend/src/server/api/endpoints/admin/reset-password.ts
packages/backend/src/server/api/endpoints/admin/resolve-abuse-user-report.ts
packages/backend/src/server/api/endpoints/admin/roles/assign.ts
packages/backend/src/server/api/endpoints/admin/roles/create.ts
packages/backend/src/server/api/endpoints/admin/roles/delete.ts
packages/backend/src/server/api/endpoints/admin/roles/list.ts
packages/backend/src/server/api/endpoints/admin/roles/show.ts
packages/backend/src/server/api/endpoints/admin/roles/unassign.ts
packages/backend/src/server/api/endpoints/admin/roles/update-default-policies.ts
packages/backend/src/server/api/endpoints/admin/roles/update.ts
packages/backend/src/server/api/endpoints/admin/roles/users.ts
packages/backend/src/server/api/endpoints/admin/send-email.ts
packages/backend/src/server/api/endpoints/admin/server-info.ts
packages/backend/src/server/api/endpoints/admin/show-moderation-logs.ts
packages/backend/src/server/api/endpoints/admin/show-user.ts
packages/backend/src/server/api/endpoints/admin/show-users.ts
packages/backend/src/server/api/endpoints/admin/suspend-user.ts
packages/backend/src/server/api/endpoints/admin/unset-user-avatar.ts
packages/backend/src/server/api/endpoints/admin/unset-user-banner.ts
packages/backend/src/server/api/endpoints/admin/unsuspend-user.ts
packages/backend/src/server/api/endpoints/admin/update-meta.ts
packages/backend/src/server/api/endpoints/admin/update-user-note.ts
Commit message: fix(backend): add missing kind definition for admin endpoints to improve security


Vulnerable code:
	secure: true,
	

Fixed code:
- Fix: 管理者用APIのアクセス権限が適切に設定されていない問題を修正
	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',
	kind: 'read:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'read:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'read:admin',

	kind: 'read:admin',

	kind: 'read:admin',

	kind: 'read:admin',

	kind: 'write:admin',

	kind: 'write:admin',


	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',

	kind: 'write:admin',