ZeroHour
Help Net Securitypublished ()ingested @zeljkazorz

Patch critical flaw in Atlassian Bitbucket Server and Data Center! (CVE-2022-36804)

criticalVulnerabilityimportance 60CVE-2022-36804

Vulnerabilities mentionedAll →

CVEVulnerabilityCVSSEPSSFlagsAffectedExposurePublished
CVE-2022-36804
Command Injection RCE in Atlassian Bitbucket Server and Data Center

Multiple API endpoints in Atlassian Bitbucket Server and Data Center contain an OS command injection flaw (CWE-78, with argument injection CWE-88) that allows a remote attacker to run arbitrary commands on the server. It is triggered by sending a malicious HTTP request to an affected API endpoint and requires only read permission to any public or private Bitbucket repository, meaning most authenticated users — and users of public repositories — can trigger it. Successful exploitation yields arbitrary code execution on the Bitbucket host, exposing source code and potentially the wider system. All Bitbucket Server and Data Center releases from 7.0.0 through the listed pre-fix versions are affected, with fixes in 7.6.17, 7.17.10, 7.21.4, 8.0.3, 8.1.3, 8.2.2, and 8.3.1. The flaw is being actively exploited: CISA added it to the Known Exploited Vulnerabilities Catalog on 2022-09-30, public PoC exploits exist, and EPSS assigns a ~99.2% probability of exploitation within 30 days.

Do: Immediately upgrade Bitbucket Server/Data Center per vendor instructions to 7.6.17+, 7.17.10+, 7.21.4+, 8.0.3+, 8.1.3+, 8.2.2+, or 8.3.1+ depending on your release branch — this is a CISA KEV-listed, actively exploited vulnerability. Until patched, restrict internet-facing access to Bitbucket instances and review HTTP access and audit logs for suspicious requests to REST API endpoints, which would indicate attempted or successful exploitation.

8.899% KEV PoC ×2
  • Atlassian Bitbucket Server and Data Center 7.0.0 up to but not including 7.6.17
  • Atlassian Bitbucket Server and Data Center 7.7.0 up to but not including 7.17.10
  • Atlassian Bitbucket Server and Data Center 7.18.0 up to but not including 7.21.4
  • +4 more
largetens of thousands of internet-exposed Bitbucket Server/Data Center instances, with a substantially larger total installed base on internal networks
Full article398 words · extracted from helpnetsecurity.com · click to collapse

A critical vulnerability (CVE-2022-36804) in Atlassian Bitbucket Server and Data Center could be exploited by unauthorized attackers to execute malicious code on vulnerable instances.

CVE-2022-36804

About CVE-2022-36804

Bitbucket Server and Data Center are used by software developers around the world for source code revision control, management and hosting.

CVE-2022-36804 is a command injection vulnerability in multiple API endpoints of Bitbucket Server and Data Center.

“An attacker with access to a public repository or with read permissions to a private Bitbucket repository can execute arbitrary code by sending a malicious HTTP request,” Atlassian explained. Which subsequent actions the attacker can take depends on the permissions associated with the exploited application.

All versions of Bitbucket Server and Data Center released before versions 7.6.17, 7.17.10, 7.21.4, 8.0.3, 8.1.2, 8.2.2, and 8.3.1 are vulnerable, but Bitbucket installations hosted by Atlassian are not affected.

Fixing the issue before attackers start exploiting it

Users are advised to upgrade to their self-hosted installations to plug the security hole.

“If you have configured Bitbucket Mesh nodes, these will need to be updated with to the corresponding version of Mesh that includes the fix,” the company added.

“If you’re unable to upgrade Bitbucket, a temporary mitigation step is to turn off public repositories globally by setting feature.public.access=false as this will change this attack vector from an unauthorized attack to an authorized attack. This can not be considered a complete mitigation as an attacker with a user account could still succeed.”

CVE-2022-36804 was reported by AppSec auditor Maxwell Garret (aka TheGrandPew), who recently promised to release a PoC in late September.

Of course, nothing’s stopping attackers from reverse-engineering the provided patches to glean enough information into the flaw to create a working exploit, so users should act quickly to block this avenue of attack.

UPDATE (September 20, 2022, 07:55 a.m. ET):

Several GitHub users published PoC exploits for CVE-2022-36804, but be careful because some of them may be fake. Garret singled out one working PoC on Monday, and reiterated his plan to publish a write-up about the flaw.

UPDATE (September 21, 2022, 05:10 a.m. ET):

There’s also a Metasploit module for exploiting the flaw, and Rapid7 recommends that organizations patch their Bitbucket instances as quickly as possible using Atlassian’s guide, because this vulnerability is very likely to be exploited in the near future. “Organizations can also block network access to Bitbucket as a stop-gap solution,” they added.

Text extracted automatically; images, tables and formatting may be missing. Original: https://www.helpnetsecurity.com/2022/08/29/cve-2022-36804/