Buffer Mismanagement in GitLab Runner: CVE-2021-39947 Vulnerability
Summary
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 ↓
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.
No signup required · Results in about 60 seconds
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 →
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.
References
Related vulnerabilities
Recent vulnerabilities recorded for gitlab-ci-multi-runner.