CVE-2024-5154 Cri-o: malicious container can create symlink on host

High 8.1 Published Updated

A malicious container can exploit directory traversal to create symlinks, allowing arbitrary file read and write access on the host system.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-5154?

CVE-2024-5154 is a high-severity path traversal vulnerability in Redhat Openshift Container Platform, published on 12 Jun 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

Official description

A flaw was found in cri-o. A malicious container can create a symbolic link to arbitrary files on the host via directory traversal (“../“). This flaw allows the container to read and write to arbitrary files on the host system.

Weakness: CWE-22

Which versions are affected by CVE-2024-5154?

7 open source packages ship an affected version, including github.com/cri-o/cri-o. It affects 2 products.

PackageAffectedFixed in
github.com/cri-o/cri-o GoFrom 1.28.61.28.7, 1.29.5, 1.30.1
github.com/cri-o/cri-o GoFrom 1.28.61.28.7
github.com/cri-o/cri-o GoFrom 1.28.61.28.7
github.com/cri-o/cri-o GoFrom 1.29.41.29.5
github.com/cri-o/cri-o GoFrom 1.29.41.29.5
github.com/cri-o/cri-o GoFrom 1.30.01.30.1
1 more packages
github.com/cri-o/cri-o GoFrom 1.30.01.30.1
Linux distribution packages (21)
cri-o Red Hat:openshift:4.12::el8All versions0:1.25.5-21.2.rhaos4.12.gita3eb75f.el8
cri-o-debuginfo Red Hat:openshift:4.12::el8All versions0:1.25.5-21.2.rhaos4.12.gita3eb75f.el8
cri-o-debugsource Red Hat:openshift:4.12::el8All versions0:1.25.5-21.2.rhaos4.12.gita3eb75f.el8
cri-o Red Hat:openshift:4.13::el8All versions0:1.26.5-18.2.rhaos4.13.git2e90133.el8
cri-o-debuginfo Red Hat:openshift:4.13::el8All versions0:1.26.5-18.2.rhaos4.13.git2e90133.el8
cri-o-debugsource Red Hat:openshift:4.13::el8All versions0:1.26.5-18.2.rhaos4.13.git2e90133.el8
cri-o Red Hat:openshift:4.13::el9All versions0:1.26.5-18.2.rhaos4.13.git2e90133.el9
cri-o-debuginfo Red Hat:openshift:4.13::el9All versions0:1.26.5-18.2.rhaos4.13.git2e90133.el9
cri-o-debugsource Red Hat:openshift:4.13::el9All versions0:1.26.5-18.2.rhaos4.13.git2e90133.el9
cri-o Red Hat:openshift:4.14::el8All versions0:1.27.7-3.rhaos4.14.git674563e.el8
cri-o-debuginfo Red Hat:openshift:4.14::el8All versions0:1.27.7-3.rhaos4.14.git674563e.el8
cri-o-debugsource Red Hat:openshift:4.14::el8All versions0:1.27.7-3.rhaos4.14.git674563e.el8
cri-o Red Hat:openshift:4.14::el9All versions0:1.27.7-3.rhaos4.14.git674563e.el9
cri-o-debuginfo Red Hat:openshift:4.14::el9All versions0:1.27.7-3.rhaos4.14.git674563e.el9
cri-o-debugsource Red Hat:openshift:4.14::el9All versions0:1.27.7-3.rhaos4.14.git674563e.el9
cri-o Red Hat:openshift:4.15::el8All versions0:1.28.7-2.rhaos4.15.git111aec5.el8
cri-o-debuginfo Red Hat:openshift:4.15::el8All versions0:1.28.7-2.rhaos4.15.git111aec5.el8
cri-o-debugsource Red Hat:openshift:4.15::el8All versions0:1.28.7-2.rhaos4.15.git111aec5.el8
cri-o Red Hat:openshift:4.15::el9All versions0:1.28.7-2.rhaos4.15.git111aec5.el9
cri-o-debuginfo Red Hat:openshift:4.15::el9All versions0:1.28.7-2.rhaos4.15.git111aec5.el9
cri-o-debugsource Red Hat:openshift:4.15::el9All versions0:1.28.7-2.rhaos4.15.git111aec5.el9

Products include Kubernetes Cri-O, Redhat Openshift Container Platform.

How do I fix CVE-2024-5154?

Upgrade github.com/cri-o/cri-o to a fixed version for your release line: 1.28.7, 1.29.5 or 1.30.1.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2024-5154 being exploited?

There is no known exploitation of CVE-2024-5154 in the wild and no public exploit code.

All Redhat Openshift Container Platform vulnerabilities

Sources

Also known as GHSA-j9hf-98c3-wrm8, GO-2024-2919, RHSA-2024:3676, RHSA-2024:3700, RHSA-2024:4008, RHSA-2024:4486.

Is CVE-2024-5154 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free