CVE-2026-77652
Dia: dia: heap buffer overflow in wpg colormap parser via out-of-bounds palette index
Check your servers for CVE-2026-77652
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-77652 affects dia, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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).
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- required: a user has to do something, such as open a link or a file
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 6.57% of all scored CVEs. Scores of 28 Nov 2026.
The assessment of CISA (SSVC, 27 Aug 2026):
- Exploitation
- poc: a proof of concept is public
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-122 Heap-based Buffer Overflow
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
Dia
package
dia |
affected up to and including 0.98+git20260221-1
Other versions: unaffected
|
Is my server affected?
Find the installed version of dia and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i dia
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-77652 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-77652RHEL, Rocky, Alma, Fedora
rpm -q dia
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-77652Alpine
apk list --installed | grep -i diaWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-77652
trivy image --scanners vuln IMAGE | grep CVE-2026-77652
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://access.redhat.com/security/cve/CVE-2026-77652 access.redhat.com · vdb entry
- RHBZ#2520884 bugzilla.redhat.com · issue tracking
Exploits and proof of concept
- https://gitlab.gnome.org/GNOME/dia/-/issues/580 gitlab.gnome.org · exploit
Other references
Source: the record CVE-2026-77652 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse