{"schemaVersion":3,"id":"CVE-2026-77652","aliases":["UBUNTU-CVE-2026-77652","DEBIAN-CVE-2026-77652"],"status":"published","duplicateOf":null,"title":null,"description":"A heap-based buffer overflow vulnerability exists in the Dia diagram editor WPG file format importer.\n\nIn plug-ins/wpg/wpg-import.c, the WPG import renderer allocates a fixed palette with:\n\n    ren->pPal = g_new0(WPGColorRGB, 256);\n\nWhen 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:\n\n    bRet &= (iNum16 == (int)fread(&ren->pPal[i16], sizeof(WPGColorRGB), iNum16, f));\n\nThe 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.\n\nA 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.\n\nExploitation 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.\n\nAffected component: WPG parser (plug-ins/wpg/wpg-import.c).\nAffected 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).","dates":{"published":"2026-08-26T19:21:39.936Z","modified":"2026-08-27T14:43:23.737Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.8,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","exploitability":4.6,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","exploitability":4.6,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00212,"percentile":0.10874,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.060999999999999985,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.00151},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00212,"percentile":0.10874}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00151,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00212,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00212,"percentile":0.10874}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-122","name":"Heap-based Buffer Overflow","description":"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().","type":"weakness","status":"Draft","abstraction":"Variant","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/122.html"}],"affected":[{"vendor":"debian","product":"dia","name":"dia","label":"dia","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/dia","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"dia","name":"dia","label":"dia","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/dia","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"gnome","product":"dia","name":"dia","label":"dia","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 0.98+git20260221-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 0.98+git20260221-1","eol":null,"hubHref":"/vendor/gnome/dia"}],"affectedCount":3,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://access.redhat.com/security/cve/CVE-2026-77652","label":"access.redhat.com/security/cve/CVE-2026-77652","hostname":"access.redhat.com","tags":["VDB Entry","X Refsource REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2520884","label":"bugzilla.redhat.com/show_bug.cgi?id=2520884","hostname":"bugzilla.redhat.com","tags":["Issue Tracking","X Refsource REDHAT"]},{"url":"https://gitlab.gnome.org/GNOME/dia/-/blob/master/plug-ins/wpg/wpg-import.c","label":"gitlab.gnome.org/GNOME/dia/-/blob/master/plug-ins/wpg/wpg-import.c","hostname":"gitlab.gnome.org","tags":[]},{"url":"https://gitlab.gnome.org/GNOME/dia/-/issues/580","label":"gitlab.gnome.org/GNOME/dia/-/issues/580","hostname":"gitlab.gnome.org","tags":["REPORT"]},{"url":"https://ubuntu.com/security/CVE-2026-77652","label":"ubuntu.com/security/CVE-2026-77652","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-77652","label":"www.cve.org/CVERecord?id=CVE-2026-77652","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-77652","label":"security-tracker.debian.org/tracker/CVE-2026-77652","hostname":"security-tracker.debian.org","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-08-26T19:21:39.936Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-08-27T14:43:23.737Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":31,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T07:07:29.526Z","stale":false,"partial":false}}