CVE-2024-2905Rpm-ostree: world-readable /etc/shadow file
A security vulnerability has been discovered within rpm-ostree, pertaining to the /etc/shadow file in default builds having the world-readable bit enabled. This issue arises from the default permissions being set at a higher level than recommended, potentially exposing sensitive authentication data to unauthorized access.
What to do
Fixed builds are available from AlmaLinux, Red Hat: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Red Hat Enterprise Linux 10 | rpm-ostree | Fixed | 0:2025.5-1.el10 | RHBA-2025:4872 |
| Red Hat Enterprise Linux 10 | rpm-ostree-libs | Fixed | 0:2025.5-1.el10 | RHBA-2025:4872 |
| Red Hat Enterprise Linux 9 | rpm-ostree | Fixed | 0:2024.3-3.el9_4 | RHSA-2024:3823 |
| Red Hat Enterprise Linux 9 | rpm-ostree-libs | Fixed | 0:2024.3-3.el9_4 | RHSA-2024:3823 |
| Red Hat Enterprise Linux 8 | rpm-ostree | Not affected | ||
| Red Hat Enterprise Linux 8 | rpm-ostree-libs | Not affected | ||
| AlmaLinux 9 | rpm-ostree | Fixed | 2024.3-3.el9_4 | ALSA-2024:3823 |
| AlmaLinux 9 | rpm-ostree-libs | Fixed | 2024.3-3.el9_4 | ALSA-2024:3823 |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- rpm-ostree: affected: 1.2024.4
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux 9.2 Extended Update Support
- Red Hat Enterprise Linux 8
- Red Hat OpenShift Container Platform 4
Workaround: If you need to apply the fix immediately, you can run the following commands, using credentials that have administrator access to an OpenShift cluster: # List current permissions for all nodes for node in $( oc get nodes -oname) ; do echo $node ; oc debug $node -- bash -c "ls -alhZ /host/etc/*shadow*"; done # Set correct permissions for node in $( oc get nodes -oname) ; do echo $node ; oc debug $node -- chmod --verbose 0000 /host/etc/shadow /host/etc/gshadow /host/etc/shadow- /host/etc/gshadow-; done As a precaution, we recommend rotating all user credentials stored in those files.
Vendor advisories:
- https://access.redhat.com/errata/RHBA-2025:4872 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2024:3401 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2024:3823 (vendor-advisory)
References
- https://access.redhat.com/errata/RHBA-2025:4872
- https://access.redhat.com/errata/RHSA-2024:3401
- https://access.redhat.com/errata/RHSA-2024:3823
- https://access.redhat.com/security/cve/CVE-2024-2905
- https://bugzilla.redhat.com/show_bug.cgi?id=2271585
- https://github.com/coreos/rpm-ostree/security/advisories/GHSA-2m76-cwhg-7wv6
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.