CVE-2024-38797 Out-of-bounds Read in HashPeImageByType()

Medium 4.6 Published Updated

An out-of-bounds read in EDK2 allows attackers to cause integrity loss or denial of service via corrupted network data.

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-38797?

CVE-2024-38797 is a medium-severity memory corruption vulnerability in TianoCore EDK2, published on 7 Apr 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

EDK2 contains a vulnerability in the HashPeImageByType(). A user may cause a read out of bounds when a corrupted data pointer and length are sent via an adjecent network. A successful exploit of this vulnerability may lead to a loss of Integrity and/or Availability.

Weakness: CWE-125

Which versions are affected by CVE-2024-38797?

How do I fix CVE-2024-38797?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2024-38797 being exploited?

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

Sources

Also known as DEBIAN-CVE-2024-38797, GHSA-4wjw-6xmf-44xf, OESA-2025-1503, UBUNTU-CVE-2024-38797.

Is CVE-2024-38797 in your software?

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

Check your SBOMs for free