CVE-2025-31177 Gnuplot: gnuplot heap-buffer overflow on utf8_copy_one

Medium 5.5 Published Updated

A heap buffer overflow in Gnuplot's utf8_copy_one function allows attackers to execute arbitrary code or cause a denial of service.

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-2025-31177?

CVE-2025-31177 is a medium-severity memory corruption vulnerability in Red Hat Enterprise Linux 6, published on 7 May 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

gnuplot is affected by a heap buffer overflow at function utf8_copy_one.

Weakness: CWE-122

Which versions are affected by CVE-2025-31177?

It affects 1 product.

Products include Gnuplot Gnuplot.

How do I fix CVE-2025-31177?

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-2025-31177 being exploited?

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

Sources

Also known as AZL-110388, DEBIAN-CVE-2025-31177, GHSA-xjcf-jhr2-9x97, UBUNTU-CVE-2025-31177.

Is CVE-2025-31177 in your software?

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

Check your SBOMs for free