{"id":"CVE-2026-58496","title":"ThorVG: Out-of-bounds Read in SFNT/TTF Font Loader via Memory API","summary":"Thor Vector Graphics (ThorVG) is a production-ready vector graphics engine. Prior to 1.0.7, the `SFNT/TTF` font loader's `SfntLoader::gen` function in `tvgSfntLoader.cpp` reads `data[0] through data[3]` to identify the font type without …","severity":"medium","cvss":4.3,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","cvssSource":"cna","cwe":["CWE-125"],"vendor":"thorvg","product":"thorvg","affected":["thorvg < 1.0.7"],"published":"2026-10-27","updated":"2026-10-27","sourceUpdated":"2026-10-27T22:18:34.301Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-58496","references":[{"url":"https://github.com/thorvg/thorvg/security/advisories/GHSA-crfw-c34f-vqrj","label":"https://github.com/thorvg/thorvg/security/advisories/GHSA-crfw-c34f-vqrj"},{"url":"https://github.com/thorvg/thorvg/commit/1dc232a33535946b5eed5fd65e993b13226da0ca","label":"https://github.com/thorvg/thorvg/commit/1dc232a33535946b5eed5fd65e993b13226da0ca"},{"url":"https://github.com/thorvg/thorvg/releases/tag/v1.0.7","label":"https://github.com/thorvg/thorvg/releases/tag/v1.0.7"}],"tags":["cve.org"],"ingestedAt":"2026-10-27T22:58:58.460Z","slug":"CVE-2026-58496","body":"## Overview\n\nThor Vector Graphics (ThorVG) is a production-ready vector graphics engine. Prior to 1.0.7, the `SFNT/TTF` font loader's `SfntLoader::gen` function in `tvgSfntLoader.cpp` reads `data[0] through data[3]` to identify the font type without first checking that the input buffer contains at least four bytes. Loading an undersized font directly from memory through public APIs such as `tvg::Text::load` causes an out-of-bounds read. Loading through a file path using `mmap` can mask the read because of page alignment; the memory-loading API directly exposes it. Depending on memory layout, a malformed short font may crash the consuming application or disclose adjacent heap memory. This issue is fixed in version 1.0.7.\n\n## Affected\n\n- `thorvg < 1.0.7`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"sunlit","depthScore":24,"depthScoreParts":{"impact":23.7,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}