Local File Ownership Vulnerability in OpenRC Package

openrc Updated 02 Oct 2025

Summary

27/10/2020
N/A
Yes i
Medium
5.5

ALPINE-CVE-2018-21269: checkpath in OpenRC through 0.42.1 might allow local users to take ownership of arbitrary files because a non-terminal path component can be a symlink. Affects openrc versions < 0.41.2-r2. Fixed in 0.41.2-r2. 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

OpenRC is an init system used in Alpine Linux and other distributions, designed to manage system services and dependencies. It provides a simple and efficient way to start, stop, and manage services, making it a vital component for system administrators. However, OpenRC versions prior to 0.42.1 are susceptible to a vulnerability that allows local users to manipulate file ownership through symlink exploitation.

Vulnerability Detail

The vulnerability, identified as ALPINE-CVE-2018-21269, arises from the 'checkpath' function in OpenRC versions up to 0.42.1. This function does not adequately handle symlinks in non-terminal path components, allowing local users to create symlinks that can redirect file operations to arbitrary locations. As a result, a malicious user could gain ownership of sensitive files, potentially leading to unauthorized access or privilege escalation. The CVSS score for this vulnerability is 5.5, indicating a moderate severity level.

How To Fix

Minimum fixed version

0.41.2-r2

This is the first release that contains the fix.

sudo apk add --upgrade openrc

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can restrict access to the affected functionality by modifying permissions on the directories where symlinks may be created, or by monitoring file changes to detect unauthorized modifications.

Conclusion

The vulnerability in OpenRC poses a significant risk to local file security, allowing unauthorized users to gain ownership of sensitive files. It is crucial for users to update to the latest patched versions to mitigate this risk. Utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.

See every vulnerability recorded for openrc →

Share this vulnerability

FAQ

The vulnerability allows local users to take ownership of arbitrary files, which can lead to unauthorized access and potential privilege escalation.

You can use the Vulert platform to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without any signup.

OpenRC versions prior to 0.42.1 are affected, specifically versions 0.41.2-r2, 0.42.1-r3, 0.42.1-r12, and 0.42.1-r20 in various Alpine Linux releases.

If immediate updates are not possible, consider implementing stricter permissions on directories and monitoring for unauthorized file changes as a temporary measure.

Detailed information can be found in the CVE report for ALPINE-CVE-2018-21269, which outlines the vulnerability's specifics and recommended actions.

Related vulnerabilities

Recent vulnerabilities recorded for openrc.

How To Fix

Minimum fixed version

0.41.2-r2

This is the first release that contains the fix.

sudo apk add --upgrade openrc

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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