CVE-2024-56142 Path Traversal in pghoard

Medium 4.8 Published Updated

Attackers can exploit path traversal in pghoard to access files with the daemon's privileges, potentially disclosing sensitive information.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-56142?

CVE-2024-56142 is a medium-severity path traversal vulnerability in Aiven-Open pghoard, published on 17 Dec 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

pghoard is a PostgreSQL backup daemon and restore tooling that stores backup data in cloud object stores. A vulnerability has been discovered that could allow an attacker to acquire disk access with privileges equivalent to those of pghoard, allowing for unintended path traversal. Depending on the permissions/privileges assigned to pghoard, this could allow disclosure of sensitive information. This issue has been addressed in releases after 2.2.2a. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-22

Which versions are affected by CVE-2024-56142?

3 open source packages ship an affected version, including pghoard.

PackageAffectedFixed in
pghoard PyPIAll versions2.6.1-rc
pghoard PyPIAll versions2.6.1-rc
pghoard PyPIAll versions2.6.1-rc

How do I fix CVE-2024-56142?

Upgrade pghoard to 2.6.1-rc or later.

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

Is CVE-2024-56142 being exploited?

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

Sources

Also known as GHSA-m9hc-vxjj-4x6q, PYSEC-2026-1778.

Is CVE-2024-56142 in your software?

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

Check your SBOMs for free