CVE-2026-58496

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

Published Oct 27, 2026 CVSS 3.1 · 4.3 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Thor Vector Graphics performs a font loader routine that reads four bytes from an input buffer without confirming that the buffer contains at least that amount of data. When an undersized TrueType or SFNT font is loaded directly from memory via the public API, the loader reads past the end of the buffer. This can lead to a crash or to disclosure of adjacent heap memory, potentially leaking sensitive information or causing a denial of service.

Affected Systems

The vulnerability affects ThorVG’s vector graphics engine in any release prior to version 1.0.7. Applications that include ThorVG or link against it, such as custom UI frameworks or game engines that embed the library, are impacted when using the memory-based font loading functionality.

Risk and Exploitability

The CVSS score of 4.3 indicates low to moderate severity, and the absence of an EPSS score and exclusion from the CISA KEV catalog suggest that exploitation is unlikely at this time. The flaw can be triggered by passing malformed font data to the memory-loading API, meaning any local application that receives untrusted font input could suffer a crash or memory disclosure. Remote exploitation would require additional capabilities, such as code execution within the host process; no elevated privileges are required beyond normal use of the library. Overall, the risk is moderate, primarily posing a denial‑of‑service or information‑disclosure threat within the affected application.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade ThorVG to version 1.0.7 or later.
  • If upgrading is not yet possible, restrict the use of the memory‑based font loading API to trusted code paths and validate the size of font data before calling tvg::Text::load.
  • Implement application‑level controls to reject or sanitize malformed font files from untrusted sources.

Generated by OpenCVE AI on October 27, 2026 at 23:57 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Thorvg
Thorvg thorvg
Vendors & Products Thorvg
Thorvg thorvg
Type Values Removed Values Added
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.
Title ThorVG: Out-of-bounds Read in SFNT/TTF Font Loader via Memory API
Weaknesses CWE-125
References
Metrics cvssV3_1

{'score': 4.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 2, 2026, 7:46 PM
Reserved
Jun 30, 2026, 8:21 PM
Status
Deferred
Published
Oct 27, 2026, 11:17 PM
Modified
Nov 2, 2026, 8:17 PM
Severity
Moderate
Public date
Oct 27, 2026, 10:18 PM