Segmentation Fault Vulnerability in gnuplot: CVE-2025-31181
Summary
UBUNTU-CVE-2025-31181: A flaw was found in gnuplot. The X11_graphics() function may lead to a segmentation fault and cause a system crash. Affects gnuplot versions < 4.6.4-2ubuntu0.1~esm2. Fixed in 4.6.4-2ubuntu0.1~esm2. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
gnuplot is a portable command-line driven graphing utility that is widely used for visualizing data in various formats. It supports numerous output formats and is often utilized in scientific and academic environments for plotting mathematical functions and data sets. The vulnerability identified as CVE-2025-31181 affects multiple versions of gnuplot, which could lead to a system crash due to improper handling of graphics functions.
Vulnerability Detail
A flaw was found in gnuplot's X11_graphics() function, which may lead to a segmentation fault. This vulnerability can cause the application to crash, potentially leading to data loss or disruption of services that rely on gnuplot for graphical output. The issue arises from improper memory management within the function, making it susceptible to exploitation under certain conditions.
How To Fix
Minimum fixed version
4.6.4-2ubuntu0.1~esm2
This is the first release that contains the fix.
sudo apt-get install --only-upgrade gnuplot
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can avoid using the X11_graphics() function until the package is updated. Alternatively, consider using a different output format that does not invoke this function.
Conclusion
The vulnerability CVE-2025-31181 in gnuplot poses a significant risk due to its potential to cause segmentation faults and application crashes. Users are advised to update to the latest patched versions to mitigate this risk and ensure the stability of their systems.
See every vulnerability recorded for gnuplot →
FAQ
CVE-2025-31181 is a vulnerability in gnuplot that can cause a segmentation fault, leading to application crashes.
You can check your version of gnuplot by running 'gnuplot --version' in the terminal. Compare it with the affected versions listed in the vulnerability report.
Exploitation of this vulnerability may lead to application crashes, data loss, and disruption of services that depend on gnuplot.
Yes, you can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software using just a manifest file.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
Related vulnerabilities
Recent vulnerabilities recorded for gnuplot.