Atlassian Bitbucket Server and Data Center Remote Code Execution (RCE) Vulnerability Advisory (CVE-2022-36804)
Executive & SecOps Summary
SECOPS ASSESSMENTAtlassian Bitbucket Server and Data Center versions 7.0.0 up to 8.3.0 (excluding specific patched releases)
Remote attackers with read permissions to a public or private repository can execute arbitrary OS commands via malicious HTTP requests
Immediately upgrade Bitbucket instances to the official patched versions (7.6.17, 7.17.10, 7.21.4, 8.0.3, 8.1.3, 8.2.2, 8.3.1 or higher)
Affected Products & Version Scope
Remediation & Live Workaround Commands
PATCH & WORKAROUND1. Official Patch & Version Upgrade Commands
The primary remediation is upgrading to a patched release. Below is an example workflow to stop the service, back up data, and perform the upgrade on a Linux server.
# 1. Stop the Bitbucket service
sudo systemctl stop bitbucket
# 2. Create a backup of the installation and home directories
tar -czvf bitbucket_backup_$(date +%F).tar.gz /opt/atlassian/bitbucket /var/atlassian/application-data/bitbucket
# 3. Download and run the installer for a patched version (e.g., 8.3.1)
wget https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-8.3.1-x64.bin
chmod +x atlassian-bitbucket-8.3.1-x64.bin
sudo ./atlassian-bitbucket-8.3.1-x64.bin2. Temporary Workaround & Hardening Configuration
If an immediate upgrade is not feasible, mitigate the risk by disabling public repository access to prevent unauthenticated attackers from exploiting public repositories.
# Edit the bitbucket.properties file to disable public access
sudo vi /var/atlassian/application-data/bitbucket/shared/bitbucket.properties
# Add or modify the following configuration line
feature.public.access=false
# Restart the service to apply changes
sudo systemctl restart bitbucket3. Log Audit & IoC Verification Commands
Inspect your Bitbucket access logs for potential exploitation attempts containing suspicious Git command arguments.
# Search access logs for common command injection payloads targeting Git parameters
grep -Ei '(%2d%2dexec|--exec|%2d%2dupload-pack|--upload-pack)' /var/atlassian/application-data/bitbucket/log/atlassian-bitbucket-access*.logScan Your Repositories for Transitive Vulnerable Dependencies in 30 Seconds
Automatically detect vulnerable packages across npm, PyPI, Maven, and Go, and open automated fix Pull Requests without breaking your build.
Technical Root Cause & Exploitation Mechanics
1. Vulnerability Overview & Root Cause
This vulnerability (CVE-2022-36804) is a critical command and argument injection flaw residing in multiple API endpoints of Atlassian Bitbucket Server and Data Center. The root cause lies in the improper validation and sanitization of user-supplied input before passing it to internal Git command executions (CWE-78, CWE-88). By injecting malicious arguments that are interpreted as command-line options by the underlying Git process, an attacker can bypass intended execution boundaries.
2. Exploitation Mechanics & Attack Scenario
To exploit this vulnerability, an attacker must have read access to at least one Bitbucket repository (either a public repository or a private one to which they have authorized access). The attacker crafts a malicious HTTP request targeting specific REST API endpoints that trigger Git operations under the hood. By embedding command-line flags such as --exec or --upload-pack into the request parameters, the attacker forces the server to execute arbitrary system commands. This vulnerability is actively exploited in the wild and is listed in the CISA KEV catalog.
3. Infrastructure & Business Impact
With a CVSS score of 8.8 (High), the impact of successful exploitation is severe. An attacker can gain arbitrary shell execution privileges under the context of the Bitbucket service account. This can lead to complete compromise of the host system, unauthorized exfiltration of proprietary source code, supply chain tampering, and lateral movement into the broader corporate network.
Official Vendor Advisories & References
Multiple API endpoints in Atlassian Bitbucket Server and Data Center 7.0.0 before version 7.6.17, from version 7.7.0 before version 7.17.10, from version 7.18.0 before version 7.21.4, from version 8.0.0 before version 8.0.3, from version 8.1.0 before version 8.1.3, and from version 8.2.0 before version 8.2.2, and from version 8.3.0 before 8.3.1 allows remote attackers with read permissions to a public or private Bitbucket repository to execute arbitrary code by sending a malicious HTTP request. This vulnerability was reported via our Bug Bounty Program by TheGrandPew.
Frequently Asked SecOps Questions (CVE-2022-36804)
FAQQ1. How critical is CVE-2022-36804 and is it actively exploited in the wild?
CVE-2022-36804 is rated CVSS 8.8 (HIGH) with a 30-day EPSS exploitation probability of 99.1%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.
Q2. Which vendors and products are affected by CVE-2022-36804?
Primary impacted vendors include atlassian across bitbucket server, bitbucket data center. Scope summary: Atlassian Bitbucket Server and Data Center 7.0.0 to 7.6.16, 7.7.0 to 7.17.9, 7.18.0 to 7.21.3, 8.0.0 to 8.0.2, 8.1.0 to 8.1.2, 8.2.0 to 8.2.1, and 8.3.0
Q3. What temporary mitigations or workarounds exist for CVE-2022-36804 before patching?
[Mitigation] Immediately upgrade Bitbucket instances to the official patched versions (7.6.17, 7.17.10, 7.21.4, 8.0.3, 8.1.3, 8.2.2, 8.3.1 or higher) Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.
Generate an Internal Engineering Notice or CISO Report for CVE-2022-36804
Instantly format this advisory into an executive CISO summary or engineering patch ticket.
🔗 Related Advisories in Similar Stack (atlassian)
View Category →Atlassian Data Center Arbitrary File Access Vulnerability Advisory (CVE-2026-21589)
[Affected Scope] Wide range of Atlassian Data Center products including Bitbucket, Confluence, Jira, Bamboo, and Crowd.
LiteLLM Proxy Server MCP Test Endpoints Remote Code Execution Vulnerability Advisory (CVE-2026-42271)
[Affected Scope] LiteLLM proxy server environments running versions 1.74.2 to before 1.83.7
GitLab CE/EE Unauthenticated Remote Code Execution (RCE) Advisory (CVE-2026-97229)
[Affected Scope] GitLab CE/EE versions 19.2 (< 19.2.8), 19.3 (< 19.3.5), and 19.4 (< 19.4.2)
GitLab CE/EE Unauthenticated Arbitrary File Read Vulnerability (CVE-2026-85706)
[Affected Scope] GitLab CE/EE versions from 18.7 through 19.3.1.
Subscribe to Daily Vulnerability Briefings & KEV Alerts
Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.