{"id":"CVE-2026-58496","summary":"ThorVG: Out-of-bounds Read in SFNT/TTF Font Loader via Memory API","details":"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 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.","aliases":["GHSA-crfw-c34f-vqrj"],"modified":"2026-11-04T07:13:46.331735690Z","published":"2026-10-27T22:18:34.301Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-125"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58496.json"},"references":[{"type":"WEB","url":"https://github.com/thorvg/thorvg/releases/tag/v1.0.7"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58496.json"},{"type":"ADVISORY","url":"https://github.com/thorvg/thorvg/security/advisories/GHSA-crfw-c34f-vqrj"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58496"},{"type":"FIX","url":"https://github.com/thorvg/thorvg/commit/1dc232a33535946b5eed5fd65e993b13226da0ca"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/thorvg/thorvg","events":[{"introduced":"0"},{"fixed":"1eef89b3ae16e7a00ccc7d8fadb493cc27f56d26"},{"fixed":"1dc232a33535946b5eed5fd65e993b13226da0ca"}],"database_specific":{"extracted_events":[{"source":"AFFECTED_FIELD","strategy":"StringRangeExpression","range":[{"introduced":"0"},{"fixed":"1.0.7"}]},{"range":[{"fixed":"1dc232a33535946b5eed5fd65e993b13226da0ca"}],"source":"REFERENCES_COMMIT"},{"original_tag":"v1.0.7","range":[{"fixed":"1eef89b3ae16e7a00ccc7d8fadb493cc27f56d26"}],"source":"REFERENCES_TAG"}]}}],"versions":["v1.0.6","v1.0.5","v1.0.4","v1.0.3","v1.0.2","v1.0.1","v1.0.0","v1.0-pre34","v1.0-pre32","v1.0-pre31","v1.0-pre30","v1.0-pre29","v1.0-pre28","v1.0-pre27","v1.0-pre26","v1.0-pre25","v1.0-pre24","v1.0-pre23","v1.0-pre22","v1.0-pre21","v1.0-pre20","v1.0-pre19","v1.0-pre18","v1.0-pre17","v1.0-pre16","v1.0-pre15","v1.0-pre14","v1.0-pre13","v1.0-pre12","v1.0-pre11","v1.0-pre9","v1.0-pre7","v1.0-pre6","v1.0-pre1","v0.11.0","v0.5.0","v0.1.0"],"database_specific":{"vanir_signatures":[{"target":{"file":"src/loaders/sfnt/tvgSfntLoader.cpp"},"deprecated":false,"digest":{"line_hashes":["287639768220389092511058304736469256369","80829983489238638394322937816548705472","33373301400547072615424060234253541173","307314945329059970593602288171327537172","12051983187325081324422695953607709934","223737380327748980507837877087274401948","168973206939507530309987043126482572022","43521806276699082719566356074543869934","133678230624537315288951113119604628342","139881332758713211999426040016828691956","23031835167858730515622901895554869678","152195747880323471384754170033269608356","326714035851332972270595134725222626585","134726990009508838888105392533348578474","293575247669116269774240628004786121581","118973932282984362586198529667490632128","103840014634972001995414671125751083418","221454376041132159744276750693837364921","10175206038402270817938625636095060918"],"threshold":0.9},"id":"CVE-2026-58496-5d9cca0c","signature_type":"Line","signature_version":"v1","source":"https://github.com/thorvg/thorvg/commit/1dc232a33535946b5eed5fd65e993b13226da0ca"},{"source":"https://github.com/thorvg/thorvg/commit/1dc232a33535946b5eed5fd65e993b13226da0ca","target":{"file":"src/loaders/sfnt/tvgSfntLoader.cpp","function":"SfntLoader::gen"},"deprecated":false,"digest":{"function_hash":"179428619017283271262187389801750542793","length":597},"id":"CVE-2026-58496-6e0c0586","signature_type":"Function","signature_version":"v1"}],"vanir_signatures_modified":"2026-11-04T07:13:46Z","source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-58496.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N"}]}