fix: os command injection vulnerability when in-memory Git is enabled #41525
+625
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Exploitation Proof
Set Malicious Git Profile:
Generated Bash Script (what BashService creates):
Trigger Git Operation:
GET /api/v1/git/pull/app/{applicationId}Result: The $(sleep 5) is executed during bash variable assignment, causing a 5-second delay confirming RCE.
More Dangerous Payloads
Fixes https://linear.app/appsmith/issue/V2-2529/vulnerability-os-command-injection-in-in-memory-git
Fixes https://github.com/appsmithorg/appsmith/security/advisories/GHSA-2j8h-44vf-xp8p
Shadow EE PR: https://github.com/appsmithorg/appsmith-ee/pull/8565
Automation
/ok-to-test tags="@tag.All"
🔍 Cypress test results
Warning
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/21347209127
Commit: f86dd26
Cypress dashboard.
Tags: @tag.All
Spec:
It seems like no tests ran 😔. We are not able to recognize it, please check workflow here.
Mon, 26 Jan 2026 05:32:56 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.