cbcvebase.
CVE-2022-36804
published 2022-08-25

CVE-2022-36804: 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…

PriorityP195high8.8CVSS 3.1
AVNACLPRLUINSUCHIHAH
KEVITWEXPLOITInitial access
CISA Known Exploited Vulnerabilitydue 2022-10-21
Exploited in the wild
EPSS
99.08%
99.9th percentile
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.

Affected

35 ranges· showing 25
VendorProductVersion rangeFixed in
atlassianbitbucket
atlassianbitbucket>= 7.0.0 < 7.6.177.6.17
atlassianbitbucket>= 7.18.0 < 7.21.47.21.4
atlassianbitbucket>= 7.7.0 < 7.17.107.17.10
atlassianbitbucket>= 8.0.0 < 8.0.38.0.3
atlassianbitbucket>= 8.1.0 < 8.1.38.1.3
atlassianbitbucket>= 8.2.0 < 8.2.28.2.2
atlassianbitbucket_data_center>= 7.0.0 < unspecifiedunspecified
atlassianbitbucket_data_center>= 7.18.0 < unspecifiedunspecified
atlassianbitbucket_data_center>= 7.7.0 < unspecifiedunspecified
atlassianbitbucket_data_center>= 8.0.0 < unspecifiedunspecified
atlassianbitbucket_data_center>= 8.1.0 < unspecifiedunspecified
atlassianbitbucket_data_center>= 8.2.0 < unspecifiedunspecified
atlassianbitbucket_data_center>= 8.3.0 < unspecifiedunspecified
atlassianbitbucket_data_center>= unspecified < 7.6.177.6.17
atlassianbitbucket_data_center>= unspecified < 7.17.107.17.10
atlassianbitbucket_data_center>= unspecified < 7.21.47.21.4
atlassianbitbucket_data_center>= unspecified < 8.0.38.0.3
atlassianbitbucket_data_center>= unspecified < 8.1.38.1.3
atlassianbitbucket_data_center>= unspecified < 8.2.28.2.2
atlassianbitbucket_data_center>= unspecified < 8.3.18.3.1
atlassianbitbucket_server>= 7.0.0 < unspecifiedunspecified
atlassianbitbucket_server>= 7.18.0 < unspecifiedunspecified
atlassianbitbucket_server>= 7.7.0 < unspecifiedunspecified
atlassianbitbucket_server>= 8.0.0 < unspecifiedunspecified

Detection & IOCsextracted from sources · hover to see the quote

url/rest/api/latest/projects/{projectKey}/repos/{repositorySlug}/archive?prefix=ax%00--exec=%60{cmd}%60%00--remote=origin
commandprefix=ax%00--exec=%60{cmd}%60%00--remote=origin
snort
alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Atlassian Bitbucket CVE-2022-36804 Exploit Attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/rest/api/"; content:"/projects/"; distance:0; content:"/repos/"; distance:0; content:"|00|--"; distance:0; fast_pattern; reference:cve,2022-36804; reference:url,attackerkb.com/topics/iJIxJ6JUow/cve-2022-36804/rapid7-analysis; classtype:attempted-user; sid:2038930; rev:1; metadata:affected_product Atlassian, attack_target Client_Endpoint, created_at 2022_09_22, cve CVE_2022_36804, deployment Perimeter, deployment SSLDecrypt, confidence Medium, signature_severity Major, tag CISA_KEV, tag Description_Generated_By_Proofpoint_Nexus, updated_at 2022_09_22;)
bytes
|00|--
  • Exploit requests are HTTP GET to /rest/api/latest/projects/{key}/repos/{slug}/archive with NULL bytes (%00) in query parameters to inject additional git-archive arguments. Look for %00 or literal null bytes in URI query strings targeting the /archive endpoint.
  • A successful exploitation attempt causes the server to return HTTP 500 containing the string 'com.atlassian.bitbucket.scm.CommandFailedException' in the response body, which can be used as a detection signal.
  • Attackers first enumerate public repositories via GET /rest/api/latest/repos or /repos?visibility=public before launching the archive endpoint exploit. Correlate these reconnaissance requests with subsequent /archive requests from the same source IP.
  • The exploit payload pattern in the URI is: /rest/api/<version>/projects/<key>/repos/<slug>/archive with the prefix parameter containing ax followed by a null byte and --exec= and --remote=origin. Regex: /rest/api/[^/]+/projects/[^/]+/repos/[^/]+/archive.*prefix=.*%00
  • Shodan query for exposed Bitbucket instances: http.component:"BitBucket"
  • ·The vulnerability requires at least read permissions to a public or private Bitbucket repository; it is not fully unauthenticated in all configurations, though public repositories require no credentials.
  • ·The Nuclei template iterates over all discovered repository slugs and project keys extracted from /rest/api/latest/repos before attempting exploitation, meaning a single scan may generate multiple /archive requests across different repo paths.
  • ·The Emerging Threats Snort rule (sid:2038930) is deployed at the perimeter and requires SSL decryption (SSLDecrypt) to detect exploitation over HTTPS.

CVSS provenance

nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vulncheck8.8HIGH
cisa8.8HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.