CVE-2026-77652
Received Received - Intake

Heap-based Buffer Overflow in Dia WPG Parser

Vulnerability report for CVE-2026-77652, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-26

Last updated on: 2026-08-26

Assigner: Fedora Project

Description

A heap-based buffer overflow vulnerability exists in the Dia diagram editor WPG file format importer. In plug-ins/wpg/wpg-import.c, the WPG import renderer allocates a fixed palette with: ren->pPal = g_new0(WPGColorRGB, 256); When handling a WPG_COLORMAP record, the parser reads a start index (i16) and number of colors (iNum16) from the file and reads palette data with: bRet &= (iNum16 == (int)fread(&ren->pPal[i16], sizeof(WPGColorRGB), iNum16, f)); The only bounds-related check is `if (i16 >= 0 && i16 <= iSize)`, where iSize is the WPG record sizeβ€”not the palette capacity. There is no validation that i16 is less than 256 or that i16 + iNum16 does not exceed 256. A malicious WPG file can supply i16=256 and iNum16=264. That causes fread() to write 792 bytes starting at &pPal[256], while the palette buffer is only 768 bytes (256 entries Γ— 3 bytes). This overflows into adjacent heap metadata and can crash Dia (SIGABRT / malloc corruption errors) or, depending on heap layout and exploit primitives, potentially lead to arbitrary code execution. Exploitation requires convincing a user to open a crafted WPG file via Dia's file dialog, command line, or file association. No special privileges are required to deliver the file to the victim. Affected component: WPG parser (plug-ins/wpg/wpg-import.c). Affected versions: all Dia versions containing this code path (reporter tested Dia 0.98+git20260221-1; issue present on upstream master as of 2026-08-21).

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-26
Last Modified
2026-08-26
Generated
2026-08-27
AI Q&A
2026-08-27
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
gnome dia From 0.98+git20260221-1 (inc) to 2026-08-21 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-122 A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a heap-based buffer overflow in Dia's WPG file format importer. The vulnerability occurs when parsing a WPG_COLORMAP record. The code allocates a fixed 256-entry palette but fails to validate that the starting index plus number of colors stays within bounds. A crafted file can set the start index to 256 and number of colors to 264, causing a 792-byte write into a 768-byte buffer. This overflows into heap metadata and may crash Dia or enable arbitrary code execution.

Detection Guidance

This vulnerability can be detected by monitoring for crashes in Dia when opening WPG files or by analyzing network traffic for suspicious WPG file transfers. Check Dia logs for malloc corruption errors or SIGABRT signals after opening WPG files. Use tools like Valgrind to detect heap-based buffer overflows during WPG file processing.

Impact Analysis

If you open a malicious WPG file in Dia, the vulnerability could crash the application or allow an attacker to execute arbitrary code on your system. No special privileges are needed, just opening the file via Dia's interface or command line is enough.

Compliance Impact

This vulnerability does not directly affect compliance with GDPR, HIPAA, or similar standards as it is a technical flaw in a specific software component (Dia's WPG parser). However, if exploited, it could lead to arbitrary code execution, potentially compromising systems handling sensitive data. This could indirectly impact compliance by enabling data breaches or unauthorized access to protected information.

Mitigation Strategies

Immediately stop using Dia to open WPG files until a patch is available. Remove or disable the WPG import plugin if possible. Monitor for any suspicious WPG files in your environment. Consider using alternative software for diagram editing that does not have this vulnerability.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-77652. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart