fix(security): validate page belongs to application in partial export (GHSA-9xfc-9f97-x524)#41832
fix(security): validate page belongs to application in partial export (GHSA-9xfc-9f97-x524)#41832subrata71 wants to merge 2 commits into
Conversation
… (GHSA-9xfc-9f97-x524) The partial export endpoint authorized the branchedApplicationId but used the attacker-controlled branchedPageId to fetch page-scoped resources (actions, JS collections, page names) without verifying the page belongs to the authorized application. Add page-application relationship validation in PartialExportServiceCEImpl.getPartialExportResources() that rejects requests where the page does not belong to the specified application, using the existing PAGE_DOESNT_BELONG_TO_APPLICATION error. Add regression test that verifies cross-application page ID is rejected.
WalkthroughThis PR adds page ownership validation to the partial export service: it verifies the requested page exists and belongs to the specified application before continuing the export pipeline, and includes a test that asserts cross-application page export is rejected. ChangesBOLA Protection in Partial Export
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
||
| return applicationMono | ||
| Mono<String> validatedPageIdMono = applicationMono.flatMap(application -> newPageService | ||
| .findById(branchedPageId, null) |
There was a problem hiding this comment.
There is another call to the page collection in the same flow, let's combine them both to avoid two calls?
Description
Fixes a BOLA/IDOR vulnerability (GHSA-9xfc-9f97-x524, CVSS 6.5 Medium) in the partial application export endpoint.
Root cause:
POST /api/v1/applications/export/partial/{branchedApplicationId}/{branchedPageId}authorized thebranchedApplicationIdbut used the attacker-controlledbranchedPageIdto fetch page-scoped resources (actions, JS collections, page names) without verifying the page belongs to the authorized application. An authenticated user could mix their own application ID with a victim's page ID to export private resources from another application.Fix: Add page-application relationship validation in
PartialExportServiceCEImpl.getPartialExportResources(). After authorizing the application, the page is looked up and verified to belong to that application. If the page doesn't belong, the request is rejected withPAGE_DOESNT_BELONG_TO_APPLICATION(400 Bad Request). This mirrors the established pattern inApplicationPageServiceCEImpl.makePageDefault().Files changed:
PartialExportServiceCEImpl.java— addvalidatedPageIdMonostep before page-scoped operationsPartialExportServiceTest.java— add regression test: cross-application page ID is rejectedFixes APP-15244
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Communication
Should the DevRel and Marketing teams inform users about this change?
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/26208533855
Commit: 88b12ce
Cypress dashboard.
Tags:
@tag.AllSpec:
Thu, 21 May 2026 08:30:15 UTC
Summary by CodeRabbit
Bug Fixes
Tests