CVE DatabaseCVE-2022-36804
한국어 권고문 →
CVE-2022-368048.8/HIGHCISA KEVCWE-78CWE-88CWE-78CWE-88

Atlassian Bitbucket Server and Data Center Remote Code Execution (RCE) Vulnerability Advisory (CVE-2022-36804)

⚡ Jump to Patch
Affected Vendors
atlassian
Affected Components
bitbucket server, bitbucket data center
Published Date
2022-08-25
CVSS v3.1
8.8
HIGH
EPSS (30d)
99.1%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Atlassian Bitbucket Server and Data Center versions 7.0.0 up to 8.3.0 (excluding specific patched releases)

Impact

Remote attackers with read permissions to a public or private repository can execute arbitrary OS commands via malicious HTTP requests

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)

Affected Products & Version Scope

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

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. 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.

bash
# 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.bin

2. 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.

bash
# 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 bitbucket

3. Log Audit & IoC Verification Commands

Inspect your Bitbucket access logs for potential exploitation attempts containing suspicious Git command arguments.

bash
# 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*.log
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Snyk Open Source & Container Security
Due to active exploitation in the wild (CISA KEV), immediately upgrade all affected Bitbucket instances to a secure patched version.

Scan 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.

Free Forever Tier · 1-Click GitHub/GitLab Auto-PR
Master DevSecOps: Automated SAST/SCA in GitHub Actions & Kubernetes
View Course Curriculum

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

NVD Original English Description

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)

FAQ

Q1. 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.

SECOPS WORKBENCH INTEGRATION

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.

Generate Report →

🔗 Related Advisories in Similar Stack (atlassian)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2022-36804 Atlassian Bitbucket Server and Data Center Remote Code Execution (RCE) Vulnerability Advisory (CVE-2022-36804) (CVSS 8.8) - Patch & Workaround | CVE Pulse