Skip to content

Security: /api/bundle/getunsendbundles does not verify the path userId matches the authenticated user #36415

Description

@hmoreras

Description

BundleResource#getUnsendBundles (path /api/bundle/getunsendbundles/userid/{userId}) reads the target userId from the URL path parameter (initData.getParamsMap().get("userid")) and passes it directly to BundleAPI.getUnsendBundles(userId, ...).

There is no check that the path userId matches the authenticated caller's user id — only requiredBackendUser(true) is enforced. Any authenticated backend user can therefore enumerate the draft bundles of any other backend user by editing the URL path.

Code location: dotCMS/src/main/java/com/dotcms/rest/BundleResource.java:181-232

Impact: horizontal information disclosure — bundle names and identifiers created by other backend users leak to any authenticated backend user. The shipped Publishing Queue UI only calls the endpoint with the current user's own id (via DotCurrentUserService), so there is no exploit path from the admin UI itself. The gap is exploitable via direct API calls (curl, Postman, browser dev console).

How it was surfaced: code review of PR #36413 (Publishing Queue Angular portlet).

Acceptance Criteria

To be refined. (Quick draft — details to be added after team confirms scope.)

  • Confirm with team whether the intended behavior is "own drafts only" or "all drafts visible to admins"
  • If own-drafts-only: reject requests where params.userid does not equal initData.getUser().getUserId() (return 403); allow admins to bypass if that's the intended model
  • Postman coverage: 403 when user A queries user B's userid; 200 when user A queries their own

Priority

Medium — no exploit path from the shipped UI, but the endpoint is publicly reachable to any authenticated backend user.

Additional Context

Same category as the retry/push gating gap filed in #36414 — hardening the v1/legacy Publishing endpoints as part of the Angular migration cleanup.

Metadata

Metadata

Assignees

Type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions