explaingit

wupco/gitlab-rce-demo

Analysis updated 2026-07-26

37ShellAudience · researcherComplexity · 5/5Setup · hard

TLDR

A proof-of-concept demo that shows how a real vulnerability in GitLab lets an attacker run commands on the server. It sets up a local copy of GitLab and walks through the attack step by step.

Mindmap

mindmap
  root((repo))
    What it does
      Sets up local GitLab
      Runs proof of concept attack
      Gets command access
    How it works
      Exploits Oj parser bugs
      Bypasses ASLR protection
      Attacker server connects back
    Requirements
      Linux with specific CPU
      Docker
      Command line tools
    Use cases
      Security research
      Learning about exploits
      Testing GitLab patches
    Audience
      Security researchers
      Ethical hackers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Study how a real GitLab vulnerability works in a safe, isolated environment.

USE CASE 2

Learn how memory corruption and ASLR bypass techniques function in practice.

USE CASE 3

Test whether a patched GitLab instance is immune to this specific attack.

USE CASE 4

Demonstrate a full attack chain from account creation to server access for training.

What is it built with?

ShellDockerGitLab

How does it compare?

wupco/gitlab-rce-demoberliwu/world-cup-2026-match-prediction-enginesunapp-ai/sun-to-spotify
Stars373737
LanguageShellShellShell
Setup difficultyhardmoderatemoderate
Complexity5/53/52/5
Audienceresearcherdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires a specific Linux CPU architecture, Docker, and waiting several minutes for GitLab to fully boot before the exploit can run.

No license information is provided, so default copyright restrictions apply and usage rights are unclear.

In plain English

{"i":0,"repo":"wupco/gitlab-rce-demo","stars":37,"lang":"Shell","ok":true,"char_count":1310,"text":"This repository is a self-contained demonstration of a security vulnerability in GitLab, a popular web platform for hosting and managing code. The demo sets up a fresh, isolated copy of GitLab on your own machine, creates a regular user account through the normal public web interface, and then runs a proof of concept attack against that local instance. It is intended for security research and education, not for use against any real or production system.\n\nThe underlying vulnerability involves two bugs in a piece of software called Oj, which GitLab uses to read notebook files when showing differences between versions. By carefully crafting the contents of a repository, an attacker can corrupt the internal state of the parser and eventually force the GitLab server to connect back to a machine the attacker controls. The attacker can then run commands on the GitLab server as a specific system user. A key challenge the demo handles is finding the right memory layout, which varies each time the software starts, a common protection known as ASLR.\n\nRunning the demo requires a Linux computer with a specific processor type, along with Docker and several standard command line tools. The setup script removes any previous demo environment, starts a new GitLab instance, waits for it to fully boot, and creates a test user. A fresh GitLab boot can take several minutes to complete.\n\nAfter setup, the attack is split across two terminal windows. One terminal listens for an incoming connection, while the other runs the exploit script. When the connection succeeds, the listening terminal lets you type commands that run on the GitLab server. The time it takes to find the correct memory layout varies between runs. The repository includes an image showing a successful demo run, and links to a detailed technical writeup of the research behind it."}

Copy-paste prompts

Prompt 1
Help me understand how the Oj parser vulnerability in GitLab allows an attacker to corrupt memory and get remote command execution. Walk through the attack chain step by step.
Prompt 2
I want to run the GitLab RCE demo locally. What are the exact system requirements, and how do the two terminal windows work together to execute the attack?
Prompt 3
Explain how ASLR (Address Space Layout Randomization) makes this exploit harder, and how the demo script handles finding the correct memory layout each time.
Prompt 4
I have a patched GitLab instance. How can I adapt this proof-of-concept demo to verify the Oj vulnerability is fixed on my system?

Frequently asked questions

What is gitlab-rce-demo?

A proof-of-concept demo that shows how a real vulnerability in GitLab lets an attacker run commands on the server. It sets up a local copy of GitLab and walks through the attack step by step.

What language is gitlab-rce-demo written in?

Mainly Shell. The stack also includes Shell, Docker, GitLab.

What license does gitlab-rce-demo use?

No license information is provided, so default copyright restrictions apply and usage rights are unclear.

How hard is gitlab-rce-demo to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is gitlab-rce-demo for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.