# CVE-2026-77658: Dia: dia: stack buffer overflow in bus object via unvalidated handle count in project files

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.20% (percentile 6, 2026-11-26)
- **CWE:** CWE-121
- **Published:** 2026-08-26T12:10:07.556Z
- **Modified:** 2026-08-28T15:44:39.323Z

## Who should check

- Anyone running GNOME Dia \<= 0.98.0

## Description

A stack-based buffer overflow vulnerability exists in the Dia diagram editor when processing Network Bus objects from Dia XML project files.

In objects/network/bus.c, bus\_load() reads the number of bus handles from the file attribute "bus\_handles" using attribute\_num\_data() without validating an upper bound:

    bus-\>num\_handles = attribute\_num\_data(attr);

When a bus handle is subsequently moved, bus\_handle\_moved() allocates two temporary arrays on the stack:

    parallel = (real \*)g\_alloca(num\_handles \* sizeof(real));
    perp = (real \*)g\_alloca(num\_handles \* sizeof(real));

Because num\_handles is fully attacker-controlled via the project file, sufficiently large values (for example 262144 or higher) cause g\_alloca() to consume more stack space than the default thread stack limit (typically 8 MB on Linux), resulting in stack overflow, SIGSEGV, and potential stack frame / return-address corruption.

An attacker can embed a Bus object with an excessive bus\_handles count in a malicious .dia file. Exploitation requires the victim to open the file in Dia (file dialog, command line, or file association) and trigger handle manipulation (moving a bus handle), which exercises the vulnerable code path.

The identical g\_alloca pattern is present in objects/Misc/tree.c (copied from bus.c) and is likely vulnerable to the same class of attack via Tree objects.

Affected versions: Dia 0.98.0 and earlier versions containing this code; issue confirmed on upstream master as of 2026-08-21.
Upstream report: https://gitlab.gnome.org/GNOME/dia/-/issues/581

## Affected and fixed versions

- GNOME Dia: \<= 0.98.0 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-77658. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-77658.md
Affected: GNOME Dia <= 0.98.0
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for GNOME Dia: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-77658 being exploited?

There is no confirmed exploitation: CVE-2026-77658 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.20% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-77658?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-77658?

GNOME Dia \<= 0.98.0.

### Is there a fix for CVE-2026-77658?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-77658?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://access.redhat.com/security/cve/CVE-2026-77658>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2520890>
- other: <https://gitlab.gnome.org/GNOME/dia/-/blob/master/objects/network/bus.c>
- other: <https://gitlab.gnome.org/GNOME/dia/-/issues/581>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-77658>

HTML: <https://flawdb.com/CVE-2026-77658> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-77658>
