Buffer Mismanagement in GitLab Runner: CVE-2021-39947 Vulnerability

gitlab-ci-multi-runner Updated 02 Oct 2025

Summary

06/06/2022
N/A
No i
Medium
5.3

UBUNTU-CVE-2021-39947: In specific circumstances, trace file buffers in GitLab Runner versions up to 14.3.4, 14.4 to 14.4.2, and 14.5 to 14.5.2 would re-use the file descriptor 0 for multiple traces and mix the output of several jobs. Affects gitlab-ci-multi-runner versions 1.4.2+dfsg-1 – 10.5.0+dfsg-2. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

GitLab Runner is an open-source application that is used to run CI/CD jobs in GitLab. It supports multiple executors and can run jobs in various environments, making it a versatile tool for developers. The specific versions affected by this vulnerability include GitLab Runner versions up to 14.3.4, 14.4 to 14.4.2, and 14.5 to 14.5.2. The vulnerability arises from improper handling of trace file buffers, which can lead to the mixing of job outputs, potentially exposing sensitive information.

Vulnerability Detail

The vulnerability, identified as CVE-2021-39947, occurs when trace file buffers in GitLab Runner reuse file descriptor 0 for multiple traces. This can result in the output of several jobs being mixed together, which may inadvertently expose sensitive data from one job to another. The issue is particularly concerning in environments where multiple jobs are executed concurrently, as it can lead to data leakage and compromise the integrity of the CI/CD pipeline.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can limit the number of concurrent jobs running on GitLab Runner to reduce the risk of output mixing. This can be configured in the GitLab CI/CD settings by adjusting the 'concurrent' setting in the runner's configuration file.

Conclusion

CVE-2021-39947 is a significant vulnerability in GitLab Runner that can lead to the mixing of job outputs, potentially exposing sensitive information. It is crucial for users to update to the latest patched versions to mitigate this risk. Additionally, utilizing tools like Vulert can help monitor for such vulnerabilities in real-time.

See every vulnerability recorded for gitlab-ci-multi-runner →

Share this vulnerability

FAQ

CVE-2021-39947 is a vulnerability in GitLab Runner that allows for the mixing of job outputs due to improper handling of trace file buffers.

The affected versions include GitLab Runner versions up to 14.3.4, 14.4 to 14.4.2, and 14.5 to 14.5.2.

The main risk is the potential exposure of sensitive information from one job to another, which can compromise the integrity of the CI/CD pipeline.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application using the Vulert playground without any signup at Vulert Scanner.

The CVSS score of CVE-2021-39947 is 5.3, indicating a medium severity level.

Related vulnerabilities

Recent vulnerabilities recorded for gitlab-ci-multi-runner.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback