Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/junohea/cve-2022-36804
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingCommand and Control
GitHubjunohea/cve-2022-36804

cve-2022-36804

Python exploit for CVE-2022-36804, enabling remote command execution and file transfer on vulnerable Bitbucket Server/Data Center via crafted archive requests.

View Repository
383 months agoNot yet reviewed
Share

CVE-2022-36804 Bitbucket PoC

This repository contains a Python exploit script for Atlassian Bitbucket Server/Data Center vulnerability CVE-2022-36804. The issue is a command-injection flaw in the Git archive flow, where crafted prefix parameters can be interpreted by the server and executed as shell commands.

What is CVE-2022-36804?

CVE-2022-36804 is a Bitbucket Server/Data Center remote command execution vulnerability. It was caused by unsafe handling of the prefix value on the archive endpoint, allowing attacker-controlled data to reach a shell invocation through Git. The consequence is unauthenticated or authenticated command execution depending on the path and deployment model.

This script targets the vulnerable archive endpoint and uses a crafted request to trigger the injection.

Bitbucket versions

This PoC is intended for affected Bitbucket Server/Data Center builds covered by Atlassian advisory for CVE-2022-36804. In practice, the vulnerable range includes older 7.x/8.x Bitbucket Server/Data Center releases before the fixed versions listed by Atlassian. It is not meant for patched or upgraded builds.

Use this only against systems you own or are explicitly authorized to test.

How the script works

The script sends a request to:

/rest/api/latest/projects/{project}/repos/{repo}/archive

with a specially crafted prefix parameter that looks like:

ax%00--exec=`<command>`%00--remote=origin

The trick is to exploit the null-byte / Git command path so the server ends up executing a shell command from the archive request. The script wraps the command in gzip + base64 when needed so the output is returned compactly and decoded locally.

The script supports two main modes:

  • command execution: runs a shell command and prints output
  • file reconstruction: builds a file remotely by writing base64-encoded chunks to a destination path

Supported features / commands

Command execution

python cve-2022-36804_v5.py <url> <username> <password> -p <project> -r <repo> -c "whoami"

Options:

  • -c, --command: run a command
  • --no-encode: send the raw command without gzip+base64 wrapping
  • -p, --project: Bitbucket project key
  • -r, --repo: Bitbucket repo slug

Remote file copy / reconstruction

python cve-2022-36804_v5.py <url> <username> <password> -p <project> -r <repo> -f /path/to/local.bin -o /tmp/remote.bin

This reads a local file in chunks, base64-encodes each chunk, and uses the exploit to reconstruct it on the server at the target path.

Internal helpers supported by the script

  • gzip + base64 command wrapping for output transport
  • base64 output decoding (including gzip-compressed output)
  • file chunking and transfer with temporary file cleanup
  • robust handling of truncated output strings
  • optional raw execution mode for fire-and-forget commands

Notes

  • The script uses requests.Session with basic auth.
  • It disables certificate verification (verify = False) to simplify testing against self-signed endpoints.
  • It is a PoC and is intentionally focused on exploitation behavior rather than stealth or production hardening.

Warning

This tool is for authorized security research and controlled testing only. Using it against systems you do not own or do not have permission to test is illegal and unethical.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    837
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    536
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    424
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    355
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    294
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    276

Explore all tools

Browse our collection of tools

View all tools →