☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-31180

CVE-2025-31180 Denial of Service in Gnuplot
📅 PUBLISHED: 2025-03-27 15:08 UTC 🔄 UPDATED: 2026-10-17 01:07 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.19%
👁️
0.19% probability
4.9× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Country: USA License: Commercial
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
6.2
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-31180 describes a denial-of-service vulnerability in Gnuplot, a widely used command-line graphing utility. The flaw resides in the CANVAS_text() function, which can trigger a segmentation fault (segfault) when processing specially crafted input. This leads to an abrupt crash of the application, potentially disrupting automated plotting pipelines, data analysis workflows, or any service that relies on Gnuplot for rendering. The vulnerability is currently unpatched, and no public proof-of-concept (PoC) or exploit code has been released. The EPSS score is 0.0%, indicating a very low probability of exploitation in the wild at this time. However, the lack of a patch and the potential for local or remote exploitation (depending on how Gnuplot is integrated) warrants attention from security teams.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Gnuplot is distributed as a standalone binary and is not typically managed through package registries like NPM, PyPI, Go, or Ruby. However, it is often included as a dependency in scientific computing environments, data analysis scripts, and CI/CD pipelines. Organizations should inventory their use of Gnuplot and assess the impact of a potential crash on their operations. The vulnerability does not directly affect the supply chain of these ecosystems, but any system that processes untrusted input through Gnuplot is at risk.

CVSS Breakdown & Threat Level

The CVSS score is listed as 0.0, which is unusual and likely indicates that the score has not been formally assigned by NVD. Based on the description (segfault leading to a crash), a reasonable CVSS v3.1 vector would be:

  • Attack Vector (AV): Local (L) – The attacker needs to provide input to Gnuplot, which is typically done locally. If Gnuplot is exposed via a web service, it could be Network (N).
  • Attack Complexity (AC): Low (L) – No special conditions are required.
  • Privileges Required (PR): None (N) – The attacker does not need elevated privileges.
  • User Interaction (UI): Required (R) – The victim must run Gnuplot with the malicious input.
  • Scope (S): Unchanged (U) – The crash only affects Gnuplot.
  • Confidentiality (C): None (N) – No data is exposed.
  • Integrity (I): None (N) – No data is modified.
  • Availability (A): High (H) – The application crashes, causing a denial of service.

Estimated CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H Estimated Base Score: 5.5 (Medium)

Threat Level: Medium. The vulnerability is easy to trigger but requires user interaction and only results in a denial of service. The lack of a patch and the potential for integration into automated systems elevate the risk.

Deep Dive & Mechanics

The vulnerability is located in the CANVAS_text() function within Gnuplot's source code. This function is responsible for rendering text on the canvas output device. A segmentation fault occurs when the function attempts to access memory outside of its allocated bounds, likely due to improper handling of string lengths, buffer sizes, or null pointers.

Root Cause Analysis:

  • The CANVAS_text() function likely receives a string pointer and a length parameter.
  • If the length parameter is negative, zero, or exceeds the actual buffer size, the function may read or write beyond the allocated memory.
  • Alternatively, the function may not properly validate the string pointer, leading to a dereference of a null or invalid pointer.
  • The crash is a direct result of the operating system's memory protection mechanisms (segfault) terminating the process.

Attack Vector:

  • An attacker can craft a malicious input file (e.g., a .plt script or a data file) that triggers the vulnerable code path.
  • The victim must execute Gnuplot with this file (e.g., gnuplot malicious.plt).
  • If Gnuplot is used as a backend for a web application (e.g., generating charts on-the-fly), a remote attacker could potentially trigger the crash by sending a specially crafted request.

Vulnerable vs. Patched Code

Since no official patch is available, a direct comparison cannot be made. However, based on the vulnerability type (buffer overflow/segfault), the fix would likely involve:

  • Vulnerable Code (Hypothetical):

    void CANVAS_text(char *str, int len) {
        char buffer[256];
        // No bounds checking
        memcpy(buffer, str, len);
        // ... render buffer ...
    }
    
  • Patched Code (Hypothetical):

    void CANVAS_text(char *str, int len) {
        char buffer[256];
        if (str == NULL || len <= 0 || len >= sizeof(buffer)) {
            // Handle error gracefully
            return;
        }
        memcpy(buffer, str, len);
        // ... render buffer ...
    }
    

The patched version would include input validation to ensure the length is within acceptable bounds and that the pointer is not null.

Exploitation & Lab Setup

Red Team

Objective: Trigger a denial-of-service condition in Gnuplot.

Lab Setup:

  1. Install Gnuplot (any version) on a test system.
  2. Create a malicious input file that exploits the CANVAS_text() vulnerability.

Exploit Attempt (Hypothetical): Since no public exploit exists, the following is a theoretical approach:

  • Craft a .plt file with an extremely long string in a set label command.
  • Example:
    echo 'set label "A"*1000000 at 0,0; plot sin(x)' > exploit.plt
    gnuplot exploit.plt
    
  • If the vulnerability is triggered, Gnuplot will crash with a segmentation fault.

Expected Outcome: The gnuplot process terminates immediately, and the system logs a segfault.

Blue Team

Objective: Detect and prevent exploitation attempts.

Detection:

  • Monitor for crashes of the gnuplot process in system logs.
  • Use file integrity monitoring to detect the creation of suspicious .plt files.
  • Implement input validation in any application that passes user data to Gnuplot.

Prevention:

  • Restrict execution of Gnuplot to trusted users only.
  • Use a sandbox or container to run Gnuplot with limited privileges.
  • Apply resource limits (e.g., ulimit -v) to prevent memory exhaustion.

Indicators of Compromise (IOCs)

  • Process Crash: Segmentation fault in gnuplot process.
  • System Logs: Entries like gnuplot[PID]: segfault at IP ... in /var/log/syslog or dmesg.
  • Suspicious Files: .plt files containing extremely long strings or unusual characters.
  • Network Traffic (if applicable): HTTP requests with long query parameters or POST data that are passed to Gnuplot.

Detection Engineering

YARA Rule

rule CVE_2025_31180_Gnuplot_Crash {
    meta:
        description = "Detects potential Gnuplot input files that may trigger CVE-2025-31180"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-31180"
    strings:
        $long_string = /[A-Za-z0-9]{1000,}/  // Strings longer than 1000 characters
        $plt_header = "set label" ascii wide nocase
    condition:
        $plt_header and #long_string > 0
}

Sigma Rule

title: Gnuplot Crash via CANVAS_text Vulnerability
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects segmentation faults in the gnuplot process, indicating potential exploitation of CVE-2025-31180.
author: Valters IT
date: 2025/04/10
logsource:
    product: linux
    service: syslog
detection:
    selection:
        - EventID: 11  # Syslog event for segfault
        - Message|contains: "gnuplot"
        - Message|contains: "segfault"
    condition: selection
falsepositives:
    - Legitimate crashes due to other bugs
level: medium

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-31180 - Potential Gnuplot Crash via Long Input"; flow:to_server; content:"gnuplot"; http_uri; pcre:"/[A-Za-z0-9]{1000,}/"; classtype:attempted-dos; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Isolate Gnuplot: Run Gnuplot in a restricted environment (e.g., Docker container) with minimal privileges.
  2. Input Validation: If Gnuplot is used in a web application, implement strict input validation and length limits on any data passed to it.
  3. Monitor for Crashes: Set up alerts for segmentation faults in the gnuplot process.

Long-Term Actions:

  1. Apply Patch: Monitor the Gnuplot project for an official patch. Once released, update to the patched version immediately.
  2. Consider Alternatives: Evaluate whether Gnuplot can be replaced with a more secure alternative (e.g., Matplotlib, Plotly) for critical applications.
  3. Contribute to Fix: If your organization has the resources, consider contributing a patch to the Gnuplot project.

Workaround:

  • If patching is not possible, avoid using the canvas terminal type (set terminal canvas) or any features that call CANVAS_text().

Valters IT
DevSecOps & Cyber Threat Intelligence

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-31180/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.