Skip to main content
Menu
Advisories

Cross-application partial export leaks private actions and JS collections by mixing an authorized applicationId with an unrelated pageId

GHSA-9XFC-9F97-X524Published Updated GitHub

Description

A Broken Object-Level Authorization (BOLA/IDOR) vulnerability exists in the Appsmith partial application export flow.

The endpoint:

POST /api/v1/applications/export/partial/{branchedApplicationId}/{branchedPageId}

appears to authorize the supplied branchedApplicationId, but later uses the separately supplied branchedPageId without verifying that the page belongs to the authorized application.

As a result, an authenticated user with access to export or edit their own application may be able to export private page-scoped resources, such as actions and JS collections, from another application or workspace if the attacker knows the victim page/action/collection identifiers.

Affected Endpoint

POST /api/v1/applications/export/partial/{branchedApplicationId}/{branchedPageId}

Affected Components

The issue appears to involve the following components:

app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/ApplicationControllerCE.java

app/server/appsmith-server/src/main/java/com/appsmith/server/exports/internal/partial/PartialExportServiceCEImpl.java

app/server/appsmith-server/src/main/java/com/appsmith/server/newpages/base/NewPageServiceCEImpl.java

app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewPageRepositoryCEImpl.java

app/server/appsmith-server/src/main/java/com/appsmith/server/newactions/base/NewActionServiceCEImpl.java

app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomNewActionRepositoryCEImpl.java

app/server/appsmith-server/src/main/java/com/appsmith/server/actioncollections/base/ActionCollectionServiceCEImpl.java

app/server/appsmith-server/src/main/java/com/appsmith/server/repositories/ce/CustomActionCollectionRepositoryCEImpl.java

Details

The partial export endpoint accepts both an application identifier and a page identifier:

POST /api/v1/applications/export/partial/{branchedApplicationId}/{branchedPageId}

The vulnerable execution flow appears to be:

ApplicationControllerCE.exportApplicationPartially()
→ PartialExportServiceCEImpl.getPartialExportResources()
→ applicationService.findById(branchedApplicationId, MANAGE_APPLICATIONS)
→ newPageService.getNameByPageId(branchedPageId, false)
→ actionCollectionService.findByPageId(branchedPageId)
→ newActionService.findByPageId(branchedPageId)
→ repository-level reads by pageId without ACL validation

The application-level permission check is performed on branchedApplicationId. However, the code later uses the attacker-controlled branchedPageId to fetch page name, actions, and action collections.

The issue is that PartialExportServiceCEImpl does not appear to verify that the supplied branchedPageId belongs to the already-authorized branchedApplicationId.

This creates an object relationship validation failure:

Permission is checked on application A,
but export data may be fetched from page B.

If page B belongs to another application or workspace, the partial export response may include resources that the caller should not be allowed to export.

Root Cause

The root cause is that authorization is enforced on one object, but later data access is performed using another independently supplied object ID.

Specifically:

  1. The caller-controlled branchedApplicationId is authorized.
  2. The caller-controlled branchedPageId is then trusted.
  3. The code does not appear to verify that the page belongs to the authorized application.
  4. Page-scoped resources are fetched through methods such as:
newPageService.getNameByPageId(...)
newActionService.findByPageId(...)
actionCollectionService.findByPageId(...)
  1. These reads are not constrained to the authorized application context.

The endpoint should reject a request where branchedPageId does not belong to branchedApplicationId.

Security Impact

An authenticated attacker may be able to export private application logic from another application or workspace, provided they know or can obtain the relevant victim identifiers.

The confirmed impact is unauthorized read/export of page-scoped resources such as:

action definitions
query/action metadata
JS collection names and contents
page-scoped application logic

I did not find code evidence that datasource credentials are exported through this path. Therefore, the impact should be limited to unauthorized disclosure of exportable page-scoped application resources unless further investigation shows otherwise.

Safe Reproduction Plan

A safe reproduction can be performed with two controlled users and two separate workspaces.

Setup

  1. Create User A with access to Workspace A.
  2. Create User B with access to Workspace B.
  3. User B creates a private application in Workspace B.
  4. In User B’s application, create:
  • one page
  • one action/query
  • one JS collection
  1. Record User B’s:
  • branchedPageId
  • action ID
  • action collection ID
  1. User A creates a separate application in Workspace A.
  2. Record User A’s branchedApplicationId.

Test

As User A, send a partial export request using:

User A's branchedApplicationId
User B's branchedPageId
User B's action/actionCollection IDs in the request body

Example structure:

POST /api/v1/applications/export/partial/{USER_A_BRANCHED_APPLICATION_ID}/{USER_B_BRANCHED_PAGE_ID}

The request body should include the selected action or action collection identifiers from User B’s page.

Expected Secure Behavior

The server should reject the request because the supplied page does not belong to the authorized application.

Expected result:

403 Forbidden

or an application/page relationship validation error such as:

Page does not belong to the application

Vulnerable Behavior

The server returns a partial export response that includes User B’s page-scoped resources, such as action definitions or JS collection content, even though User A is only authorized on User A’s application.

Why This Is Distinct From My Previous Report

This finding is distinct from my previous accepted report:

Broken Object-Level Authorization in PUT /api/v1/pages/{pageId}/dependencyMap Allows Unauthorized Cross-Workspace Modification

The previous report involved:

Unauthorized write/modification of a page dependencyMap

This report involves:

Unauthorized read/export through the partial application export flow

The affected endpoint, affected service flow, security impact, and vulnerable operation are different.

This issue is caused by mixing an authorized branchedApplicationId with an unchecked and unrelated branchedPageId, followed by page-scoped export reads.

Recommended Fix

After authorizing branchedApplicationId, Appsmith should verify that every supplied object ID belongs to the authorized application context.

Recommended changes:

  1. Resolve branchedPageId through an application-scoped and permission-checked lookup.
  2. Reject the request if:
page.applicationId != branchedApplicationId
  1. Validate that each requested action ID belongs to the authorized page/application.
  2. Validate that each requested action collection ID belongs to the authorized page/application.
  3. Avoid permissionless findByPageId and getNameByPageId calls in the partial export path.
  4. Reuse the safer full export pattern where pages and child resources are derived from the authorized application context.
  5. Add regression tests for:
  • cross-workspace page ID mismatch
  • cross-application page ID mismatch
  • action ID from unrelated page
  • action collection ID from unrelated page

Affected versions

References

GitHub · appsmithorg/appsmith